Hi All,
Trying to exportVapp. I am not able to find the HttpNfcLeaseState Enum from the .net Vim25Service2005.dll.
Error 1 The name 'HttpNfcLeaseState' does not exist in the current context.
It is not VI SDK 2.5. It is VI SDK 4.0.
Rajesh Kamal.
I'm not a C# expert by any means, but you may want to provide a snippet of your code.
From what I understand from ExportVM or ExportVApp when called you'll get a back a reference to HttpNfcLease from there, if successful you'll get an array of URLs on where you can download the files/etc. Did you check to see if you had any errors when executing the command and checking to see if you received an error within the return value?
Take a look here for more info: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.HttpNfcLease.html
You can also play with this by pointing your browser to vCenter server and using the MOB to make a call to a test vApp and seeing the results.
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
Cannot Refer to HttpNfcLeaseState Enum from the .net stubs
Most of the Enums are properties of Data Objects.
Most of the Enums are a seperate class with no references.
But I find only HttpNfcLease Enum as a property of a Managed Object.
Ex:
1. Task - Managed Object
2. TaskInfo - Data Object
3. TaskInfoState - Enum
TaskInfoState(Enum) is a property of TaskInfo(Data Object).
TaskInfo(DataObject) is a property of Task(Managed Object).
Can a Managed Object(HttpNfcLease) contain Enum(HttpNfcLeaseState) as a property?
Rajesh Kamal
Can a Managed Object(HttpNfcLease) contain Enum(HttpNfcLeaseState) as a property?
Yes, if you take a look at the API docs, you need to drill into the HttpNfcLease which is returned by ExportVApp/ExportVM as a managed object, once you get the reference you'll be able to access the state property which is an enum as you noted earlier.
my $nfc_mo_ref= <return_object> my $nfclease = Vim::get_view(mo_ref => $nfc_mo_ref); print $HttpNfcLease->state->val;
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
I think info property of HttpNfcLease is a DataObject.
I do not find any other Managed Object property having an Enum except HttpNfcLease's HttpNfcLeaseState.
Rajesh Kamal.