-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to import ova #7
Comments
by debugging more I see that configSpec is missing in the spec params of ImportVApp method, not sure is it causing the issue |
I think i see the issue. You are attempting to create new objects with types from Until then you will need to fully build the specs with javascript objects and it is best to include the type as documented here https://github.com/bhoriuchi/soap-connect/blob/development/src/client/types.js#L47-L51 since the soap library does a best match on the types if the type is not explicitly defined which can lead to incorrect types. |
I can add more info on this issue: In version 1.1.1 of this package we used to get the attributes returned by the vCenter and that is missing in v2 because of which, when we chain the response of createImportSpec Params to ImportVapp we see an err |
@DrigerG which attributes are those? Also this is definitely because the package now uses a custom soap library instead of node-soap which i found to be problematic and slow due do no wsdl caching features. I'd like to get the code you are running to reproduce as well if you wouldnt mind commenting here or opening another issue. |
I was able to work around the issue by doing the below steps to the returned importSpec:
This is due the fact I mentioned in the above comment.. Since the attributes are lost, the lib resorts to detecting the xsi types which sometimes turns out to be wrong. There are some minor bugs in the extendedType logics too. Anyway thanks @bhoriuchi for this wonderful package ! |
@bhoriuchi About the attributes: in v1 @nagavenkatab code returns the importSpecParams with xsi:type attribute, however no such attribute is returned in v2 |
@DrigerG thanks! it looks like i need to figure out why the attributes are getting lost. And any suggestions on how to improve the extendedType logic is welcome. I admittedly am not an expert with soap/wsdl and do not devote a lot of time to this project. |
One top of the head logical flaw I saw was the extendedType closest match was comparing the intersection length with the parentType to begin with, which is kinda wrong. Thats what happens in the above case when it encounters ImportSpec. say I pass 3 params |
@bhoriuchi would you mind If we push some pull requests to fix any bugs we see ? |
@DrigerG yes please! I'll try to add some contributing guidelines so people know this project is open to PRs. |
@bhoriuchi Thanks ! |
@DrigerG what do you think about bringing all the code from the soap client |
@bhoriuchi I agree 100 percent. v1.1.1 is simpler to debug and faster to develop because its in a single project |
I just used v1 to generate @nagavenkatab's ImportSpec and used it in V2 after some xsi label massaging and the import works perfectly !!! May be we need to revisit v2's attribute returning capability |
@DrigerG I'm going to add the soap-connect code in and set up a lint config and a framework for tests in the development branch so that there are some initial guidelines for that stuff. |
@DrigerG I have updated the lib to include the soap client code, added an eslintrc, test example, and basic contributing guide. feel free to submit PRs. |
the master seems to have this issue now:
|
building with rollup has always been problematic. i have switched the build to just use babel. it will now build to |
I trying to import ova using ova file and the script fails with the below error
2017-11-24T10:24:27.388Z error vpxd[7F996F9F3700] [Originator@6876 sub=SoapAdapter]
--> Required property id is missing from data object of type OvfConsumerOstNode
-->
--> while parsing serialized DataObject of type vim.OvfConsumer.OstNode
--> at line 11, column 8
-->
--> while parsing property "instantiationOst" of static type OvfConsumerOstNode
-->
--> while parsing serialized DataObject of type vim.ImportSpec
--> at line 7, column 6
-->
--> while parsing call information for method ImportVApp
--> at line 5, column 4
-->
--> while parsing SOAP body
--> at line 4, column 2
-->
--> while parsing SOAP envelope
--> at line 2, column 0
-->
--> while parsing HTTP request for method importVApp
--> on object of type vim.ResourcePool
--> at line 1, column 0
2017-11-24T10:24:31.053Z info vpxd[7F996F8F1700] [Originator@6876 sub=vpxLro opID=2dc64d86] [VpxLRO] -- BEGIN task-internal-18777 -- SessionManager -- vim.SessionManager.sessionIsActive -- 520abc27-ebc2-2ccc-42bf-864790e61a93(52ef17e8-51fb-0da9-5fca-d490400cd24d)
Below is the code
The text was updated successfully, but these errors were encountered: