Tooltip shows 4 parameters for RemoveSnapshot_Task() inside IDE. Please check the image.
"_this, removeChildren, consolidate, consolidateSpecified".
In SDK 5 documentation it only shows 3 parameters "_this, removeChildren, consolidate". The last parameter is missing. Without the 4th parameter the application failed to build.
http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.wssdk.apiref.doc_50/right-pane.html
Any ideas?
Where is the problem to use the 4 parameters?
But yes, the documentation is not updated to what the API actually provides...
VMware did a bad job on VimSdk 5.
Tos2k
Thanks, The API works fine with 4 parameters. I just confused when I checked the API documentation which has only 3 parameters.
@gangan2000
Thanks for reporting this, let me look into this and I'll file a documentation bug to hopefully get this resolved as soon as the doc team can.
Thanks
This is not a documentation bug, and this is why.
The additional consolidateSpecified parameter is there because of the way C# stubs handles the optional parameters.
The API specifies the following
consolidate* | xsd:boolean | (optional) If set to true, the virtual disk associated with this snapshot will be merged with other disk if possible. Defaults to true. Since vSphere API 5.0 |
Now, in Java stubs the parameter consolidate is created as type Boolean which can be null as well.
However, in C# stubs this paramter is replaced with 2 primitive parameters of type bool instead namely consolidated and consolidatedSpecified
This behavior is purely a .Net thing and has been there for all the optional parameters even earlier, and is evident in some of the samples as well that get to call such methods with optional parameters.
I hope this clarifies the confusion you are having.
Thanks,
~ Sidharth
What a complicated and needless explanation... Its obvious that this comes from a weak design. There is NO reason to have a SDK
/API look different for Java/.NET. There is no reason to have a documentation differing from the SDK on coding level either.
The VimSdk 5 release was the most laborious release in the whole history of VimSDK, since its first release for ESX 3.5
Tos2k
Agreed with Tos2k.
To Vmware Team:
1. Please update "Developer's Setup Guide in SDK 5" also. Its outdated and not matched with the directory structures released with SDK5.
More Info:
http://communities.vmware.com/thread/333073
2. Also Update the samples (dotnet) in SDK5. The samples are based on old SDK and not reflected new SDK 5.