Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

vCAC plug-in, unable to access properties via vCACEntity.getProperties()

$
0
0

Per the vCAC plug-in documentation I'm able to retrieve vCAC entities:

 

http://pubs.vmware.com/orchestrator-plugins/index.jsp?topic=/com.vmware.using.vcac.plugin.doc_51/GUID-E53805FF-CE6D-4806-9CC3-B5089065C940.html

 

var modelName = 'ManagementModelEntities.svc';
var entitySetName = 'VirtualMachines';
var headers = null;
var properties = {};
//Read a list of entities
var entities = vCACEntityManager.readModelEntitiesByCustomFilter(vcacHost.id, modelName, entitySetName, properties, headers);
System.log(entities[0]);

 

produces:

 

DynamicWrapper (Instance) : [VCACEntity]-[class com.vmware.o11n.plugin.dynamicops.model.Entity] -- VALUE : org.odata4j.core.OEntities$OEntityAtomImpl@4ee0228f[title=,categoryTerm=DynamicOps.ManagementModel.VirtualMachine,entitySet=EdmEntitySet[VirtualMachines,org.odata4j.edm.EdmEntityType$Builder$1@66bef5fc],entityType=EdmEntityType[DynamicOps.ManagementModel.VirtualMachine,alias=null],entityKey=(guid'a1bb7904-02e2-4050-9cbf-013ec80cda90'),properties=[OProperty[VirtualMachineID,EdmSimpleType[Edm.Guid],a1bb7904-02e2-4050-9cbf-013ec80cda90], OProperty[VirtualMachineName,EdmSimpleType[Edm.String],NWCROOTCA01], OProperty[Expires,EdmSimpleType[Edm.DateTime],null], OProperty[InitiatorType,EdmSimpleType[Edm.String],Registered], OProperty[Notes,EdmSimpleType[Edm.String],Provisioned by VMware vCAC], OProperty[GuestOS,EdmSimpleType[Edm.String],Microsoft Windows Server 2012 (64-bit)], OProperty[VMUniqueID,EdmSimpleType[Edm.String],420577d2-c0bb-386b-f8fb-2891b6703c1c], OProperty[PlatformDetails,EdmSimpleType[Edm.String],On], OProperty[VMCreationDate,EdmSimpleType[Edm.DateTime],2013-01-28T00:13:20.000], OProperty[VMDeleteDate,EdmSimpleType[Edm.DateTime],null], OProperty[LastLoggedDate,EdmSimpleType[Edm.DateTime],null], OProperty[LastLoggedUser,EdmSimpleType[Edm.String],null], OProperty[LastPowerOffDate,EdmSimpleType[Edm.DateTime],null], OProperty[LastPowerOnDate,EdmSimpleType[Edm.DateTime],2013-01-28T00:13:22.000], OProperty[OwnerExists,EdmSimpleType[Edm.Boolean],true], OProperty[UsageIndex,EdmSimpleType[Edm.Int32],null], OProperty[UsageIndexIgnoreBy,EdmSimpleType[Edm.String],null], OProperty[IsDeleted,EdmSimpleType[Edm.Boolean],false], OProperty[IsMissing,EdmSimpleType[Edm.Boolean],false], OProperty[IsRogue,EdmSimpleType[Edm.Boolean],false], OProperty[IsRunning,EdmSimpleType[Edm.Boolean],true], OProperty[RecCreationTime,EdmSimpleType[Edm.DateTime],2013-03-05T23:12:29.380], OProperty[RecDeleteTime,EdmSimpleType[Edm.DateTime],null], OProperty[RecUpdateTime,EdmSimpleType[Edm.DateTime],2013-04-06T00:11:20.283], OProperty[Flags,EdmSimpleType[Edm.Int64],32], OProperty[Text1,EdmSimpleType[Edm.String],null], OProperty[Text2,EdmSimpleType[Edm.String],null], OProperty[VMCPUs,EdmSimpleType[Edm.Int32],2], OProperty[VMTotalMemoryMB,EdmSimpleType[Edm.Int64],4096], OProperty[VMTotalStorageGB,EdmSimpleType[Edm.Int64],50], OProperty[GuestOSFamily,EdmSimpleType[Edm.String],windows8Server64Guest], OProperty[VirtualMachineState,EdmSimpleType[Edm.String],On], OProperty[CurrentTask,EdmSimpleType[Edm.String],null], OProperty[IsTemplate,EdmSimpleType[Edm.Boolean],false], OProperty[VMDNSName,EdmSimpleType[Edm.String],NWCROOTCA01.sov.local], OProperty[VMUsedStorageGB,EdmSimpleType[Edm.Decimal],50.00], OProperty[FileLevelCloneImageName,EdmSimpleType[Edm.String],null], OProperty[VMInitialUsedSpace,EdmSimpleType[Edm.Decimal],0.00], OProperty[VMEstimatedUsedSpace,EdmSimpleType[Edm.Decimal],50.00], OProperty[ExpireDays,EdmSimpleType[Edm.Int32],2], OProperty[StoragePath,EdmSimpleType[Edm.String],FC_Datastore_04_DBs], OProperty[ConnectToVdi,EdmSimpleType[Edm.Boolean],false], OProperty[BlueprintType,EdmSimpleType[Edm.Byte],1], OProperty[MachineType,EdmSimpleType[Edm.Byte],0], OProperty[IsManaged,EdmSimpleType[Edm.Boolean],true], OProperty[IsComponent,EdmSimpleType[Edm.Boolean],false]],links=[ORelatedEntityLink[rel=http://schemas.microsoft.com/ado/2007/08/dataservices/related/Host,title=Host,href=VirtualMachines(guid'a1bb7904-02e2-4050-9cbf-013ec80cda90')/Host], ORelatedEntityLink[rel=http://schemas.microsoft.com/ado/2007/08/dataservices/related/HostReservation,title=HostReservation,href=VirtualMachines(guid'a1bb7904-02e2-4050-9cbf-013ec80cda90')/HostReservation], ORelatedEntityLink[rel=http://schemas.microsoft.com/ado/2007/08/dataservices/related/ResourcePool,title=ResourcePool,href=VirtualMachines(guid'a1bb7904-02e2-4050-9cbf-013ec80cda90')/ResourcePool], ORelatedEntityLink[rel=http://schemas.microsoft.com/ado/2007/08/dataservices/related/VirtualMachineTemplate,title=VirtualMachineTemplate,href=VirtualMachines(guid'a1bb7904-02e2-4050-9cbf-013ec80cda90')/VirtualMachineTemplate], ORelatedEntitiesLink[rel=http://schemas.microsoft.com/ado/2007/08/

...

 

 

However, if I attempt to access the properties (via entity[0].getProperties() or entity[0].getProperty('VirtualMachineName'), I get a java.lang.NullPointerException.


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>