Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Fix a number of property wsdl_types #176

Merged

Conversation

agrare
Copy link
Contributor

@agrare agrare commented Feb 15, 2020

A few properties have a wsdl_type that doesn't match the vim25 wsdl declaration. This leads to issues with deserialization because for example when an attribute should be a string it is a more complex type like HostPortGroup but doesn't have any actual information in it.

This was the same issue as #151, instead of fixing only the ones that were causing our errors I wrote a quick script to compare the wsdl_types in the vmodl.db and the vim-types.xsd file.

It isn't in a state that I'd consider distributable but here is the script that I used to identify the properties with the wrong types, https://gist.github.com/agrare/1632469372df5d68a068afe5367679f5

#177 is a much better script which uses soap4r-ng to parse any wsdl file and all imports and includes.

I used vim-types.xsd from from 6.7U3.

@agrare
Copy link
Contributor Author

agrare commented Feb 15, 2020

This is the list of properties that were different from the wsdl file using the script from #177

HostProxySwitch.pnic xsd:string doesn't match PhysicalNic
HostMultipathInfoLogicalUnit.lun xsd:string doesn't match ScsiLun
HostMultipathInfoPath.adapter xsd:string doesn't match HostHostBusAdapter
HostMultipathInfoPath.lun xsd:string doesn't match HostMultipathInfoLogicalUnit
HostOpaqueSwitch.pnic xsd:string doesn't match PhysicalNic
HostPlugStoreTopologyAdapter.adapter xsd:string doesn't match HostHostBusAdapter
HostPlugStoreTopologyAdapter.path xsd:string doesn't match HostPlugStoreTopologyPath
HostPlugStoreTopologyPath.adapter xsd:string doesn't match HostPlugStoreTopologyAdapter
HostPlugStoreTopologyPath.target xsd:string doesn't match HostPlugStoreTopologyTarget
HostPlugStoreTopologyPath.device xsd:string doesn't match HostPlugStoreTopologyDevice
HostPlugStoreTopologyDevice.lun xsd:string doesn't match ScsiLun
HostPlugStoreTopologyDevice.path xsd:string doesn't match HostPlugStoreTopologyPath
HostPlugStoreTopologyPlugin.device xsd:string doesn't match HostPlugStoreTopologyDevice
HostPlugStoreTopologyPlugin.claimedPath xsd:string doesn't match HostPlugStoreTopologyPath
HostPortGroup.vswitch xsd:string doesn't match HostVirtualSwitch
HostVMotionNetConfig.selectedVnic xsd:string doesn't match HostVirtualNic
HostVirtualNic.port xsd:string doesn't match HostPortGroupPort
VirtualNicManagerNetConfig.selectedVnic xsd:string doesn't match HostVirtualNic

@agrare
Copy link
Contributor Author

agrare commented Feb 15, 2020

@jrgarcia I'm thinking about getting that script to the point where you can point it at a wsdl dir and have it check the vmodl.db and adding it to ./devel. Do you think that's worth it?

@jrgarcia
Copy link
Contributor

Hey @agrare, I'll take a look and review this change on Monday (I've got a pretty full weekend with family), but this sounds amazing! Don't feel pressured at all to write a proper script for this, but if you'd like to, that would help immensely and I'd absolutely accept it. 🎉 Thanks for all you do with rbvmomi!

A few properties have a wsdl_type that doesn't match the vim25 wsdl
declaration.  This leads to issues with deserialization because for
example when an attribute should be a string it is a more complex type
like HostPortGroup but doesn't have any actual information in it.
@agrare agrare force-pushed the fix_vmodl_wsdl_type_mismatches branch from f43d1a1 to 8ca03a6 Compare February 16, 2020 14:30
@jrgarcia jrgarcia merged commit dec5fba into vmware-archive:master Mar 10, 2020
@agrare agrare deleted the fix_vmodl_wsdl_type_mismatches branch March 10, 2020 19:39
@agrare
Copy link
Contributor Author

agrare commented Mar 10, 2020

Thanks @jrgarcia !

@agrare
Copy link
Contributor Author

agrare commented Mar 23, 2020

Hey @jrgarcia if you don't have a larger release planned that this would get rolled up into would you mind cutting a release for this change? This bug is blocking our upgrade from 2.0.1

Thanks!

@jrgarcia
Copy link
Contributor

@agrare I don't have anything planned currently. I was out for a few days and just got back in. I'll see if I can get to it today and if not I'll do it first thing tomorrow. Sorry about that!

@jrgarcia
Copy link
Contributor

@agrare v2.3.1 has been released. I hope this helps with your upgrade!

@agrare
Copy link
Contributor Author

agrare commented Mar 24, 2020

It absolutely did @jrgarcia ! All green now thanks a lot

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants