-
Notifications
You must be signed in to change notification settings - Fork 175
Add a script to verify vmodl.db from a wsdl file #177
Add a script to verify vmodl.db from a wsdl file #177
Conversation
64adfe1
to
d549352
Compare
7f5ee3c
to
9c4cd11
Compare
@agrare Is this using the stdlib |
Hey @jrgarcia this is using soap4r-ng (https://github.com/rubyjedi/soap4r), this was the only wsdl parser that I found that would follow the xsd:import and xsd:include directives and works on rubies at least as new as 2.5.7 which is what I have locally |
05cbd81
to
f454cf1
Compare
a5e9ddd
to
851b664
Compare
With #176 merged running this script results in 0 incorrect wsdl_types for the vsphere-ws and spbm service WSDLs |
I could see this being added to CI as well, so that if someone makes a PR with updates to the wsdl file it will immediately fail the PR. |
Yeah that would be nice, my goal is to actually turn this into a rake task that will actually generate the whole vmodl file repeatably. |
07636c4
to
899eae4
Compare
899eae4
to
63eef3e
Compare
63eef3e
to
dfcc80b
Compare
@jrgarcia I think now that we are on newer rubies, this one is ready to go. |
I'll revisit this at some point this week. Thanks for the nudge! |
Hey @agrare! I'd love to accept this now that we've dropped those nasty, old Ruby versions. Can you do me a favor and add |
@jrgarcia Its a deal ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This script parses the main vimService.wsdl and iterates through all of the ComplexTypes and checks that the params in the vmodl.db match the types from the WSDL.
It uses soap4r-ng which appears to be the only ruby soap wsdl parser that handles xsd:import/include directives which the VIM wsdls use extensively. This saved me a lot of manual parsing and recursive xml walking.
Example: