VMware Cloud Community
Najtsob
Enthusiast
Enthusiast
Jump to solution

VI.net Toolkit documentation

I only found this poor developer's guide.

http://www.vmware.com/support/developer/windowstoolkit/wintk10/doc/viwin_devg.pdf

Where can I get some more documentation. I want list of all classes and functions and what they do, etc. Also I need to know if  certain function is thread safe and so on.

Thank you for your help.

0 Kudos
1 Solution

Accepted Solutions
ykalchev
VMware Employee
VMware Employee
Jump to solution

Hi,

As you correctly noticed VMware.Vim assembly that comes with PowerCLI is wraper for web services based SDK.

The most important additional classes that comes with VMware.Vim assembly are VimClient and VimBase classes.

ViewBase is the base class for the client-side types called Views. A View is populated with the  currents state of a managed object. The most intresting method in this class is UpdateViewData.

VimClient is the entry point to all operations, responsible for maintaining sessions, login/logout, retrieving and searching  views. I recommend you to take a look to all methods of this class - you'll using it a lot.

The help reference for this additional classes are available in vShere SDK for .Net API Reference.chm file available in the PowerCLI installation folder.

For all other classes and methods you should look at VMware vSphere 4.1 API Reference Documentation. All classes,  properties and methods are available in VMware.Vim assembly. The only difference is in managed object's method signature - all methods does not have first ManagedObjectReference parameter since it's already available in the view class and it's passed automatically i.e:

Vim.VirtualMachine vmView = new Vim.VirtualMachine(client, vmMoRef);

vmView.RebootGuest()

instead of

vmView.RebootGuest(vmView.MoRef)

Hope this will help you starting using VMware.Vim assembly

Regards,

Yasen Kalchev

PowerCLI Dev team

Yasen Kalchev, vSM Dev Team

View solution in original post

0 Kudos
8 Replies
harkamal
Expert
Expert
Jump to solution

use object browser in visual studio. vmware.vimautomation.dll has got all classes/methods etc.

also download the sdk, there are tons of examples in c# java and api docs as well.

hope this helps.

Najtsob
Enthusiast
Enthusiast
Jump to solution

Do you have direct download link for SDK ? I really didn't find something like you describing.

0 Kudos
Najtsob
Enthusiast
Enthusiast
Jump to solution

Ok, I checked link and for example I can't find following function "FindEntityView(...)"

Is this from different SDK ?

using VMware.Vim;

NameValueCollection filter = new NameValueCollection();

filter.Add("Summary.vm", VMId);

VirtualMachine vm = (VirtualMachine)client.FindEntityView(typeof(VirtualMachine), null, filter, null);

0 Kudos
harkamal
Expert
Expert
Jump to solution

Assembly is vmware.vim

Explore the assembly using Visual Studio Object Browser and navigate to class VimClient. There you find methods like connect/disconnect/findEntityView

Cheers

0 Kudos
Najtsob
Enthusiast
Enthusiast
Jump to solution

OK, now I understands.

VMware.Vim assembly that comes with PowerCLI is wraper for web services based SDK.

Where can I get more technical details about functions from VMware.Vim assembly ? All code examples I from this link

http://www.vmware.com/download/download.do?downloadGroup=VSDK41 are for web services SDK.

I need something for VMware.Vim assembly.

Thank you for all your help.

0 Kudos
ykalchev
VMware Employee
VMware Employee
Jump to solution

Hi,

As you correctly noticed VMware.Vim assembly that comes with PowerCLI is wraper for web services based SDK.

The most important additional classes that comes with VMware.Vim assembly are VimClient and VimBase classes.

ViewBase is the base class for the client-side types called Views. A View is populated with the  currents state of a managed object. The most intresting method in this class is UpdateViewData.

VimClient is the entry point to all operations, responsible for maintaining sessions, login/logout, retrieving and searching  views. I recommend you to take a look to all methods of this class - you'll using it a lot.

The help reference for this additional classes are available in vShere SDK for .Net API Reference.chm file available in the PowerCLI installation folder.

For all other classes and methods you should look at VMware vSphere 4.1 API Reference Documentation. All classes,  properties and methods are available in VMware.Vim assembly. The only difference is in managed object's method signature - all methods does not have first ManagedObjectReference parameter since it's already available in the view class and it's passed automatically i.e:

Vim.VirtualMachine vmView = new Vim.VirtualMachine(client, vmMoRef);

vmView.RebootGuest()

instead of

vmView.RebootGuest(vmView.MoRef)

Hope this will help you starting using VMware.Vim assembly

Regards,

Yasen Kalchev

PowerCLI Dev team

Yasen Kalchev, vSM Dev Team
0 Kudos