Hi
I'm trying to get the custom properties (product section) from a vCloud VM via the api, I can get the label and description but the value I get is undefined.
When trying to retrieve the custom proporties via vmtoolsd inside the guest os I can see the value as it should be but I need to get the value from the vCo via vCloud API.
Thanks.
Hi,
To get a value I do like this:
if ((!vApp) || !(parameterKey)) {
return null;
}
//System.log(vApp.toXml());
var productSections = vApp.getProductSections();
for each ( var productSection in productSections) {
var catList = productSection.categoryOrProperty;
var elements = catList.find(new VclProductSectionProperty()) ;
for each ( var cat in elements ) {
if ( cat.key == parameterKey ) {
return cat.valueAttrib;
}
}
}
return null;
This is inside a "getVAppCustomParameterValue" action with vApp and parameterKey as an input and a string returned.
Christophe.
Hi,
To get a value I do like this:
if ((!vApp) || !(parameterKey)) {
return null;
}
//System.log(vApp.toXml());
var productSections = vApp.getProductSections();
for each ( var productSection in productSections) {
var catList = productSection.categoryOrProperty;
var elements = catList.find(new VclProductSectionProperty()) ;
for each ( var cat in elements ) {
if ( cat.key == parameterKey ) {
return cat.valueAttrib;
}
}
}
return null;
This is inside a "getVAppCustomParameterValue" action with vApp and parameterKey as an input and a string returned.
Christophe.
Thanks!
Hi Christophe,
How do you get any information in tab Guest Properties from vApp ?
Regards,