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

Extensibility Script missing information

$
0
0

I did an inplace upgrade of vRO to 7.3.  Prior to that I was able to pull information from extensibility and use it on my customization scripts. However since the upgrade many values are now returning NULL.

 

Working Script pre-vRO 7.3:

var executionContext = System.getContext();

 

System.log("BlueprintName: " + payload.get("blueprintName")) ;

System.log("ComponentId: " + payload.get("componentId")) ;

System.log("ComponentTypeId: " + payload.get("componentTypeId")) ;

System.log("EndpointId: " + payload.get("endpointId")) ;

System.log("RequestId: " + payload.get("requestId")) ;

System.log("VirtualMachineEvent: " + payload.get("virtualMachineEvent")) ;

System.log("WorkflowNextState: " + payload.get("workflowNextState")) ;

 

var lifecycleState = payload.get("lifecycleState") ;

System.log("State: " + lifecycleState.get("state")) ;

System.log("Phase: " + lifecycleState.get("phase")) ;

System.log("Event: " + lifecycleState.get("event")) ;

 

var machine = payload.get("machine") ;

System.log("ID: " + machine.get("id")) ;

System.log("Name: " + machine.get("name")) ;

System.log("ExternalReference: " + machine.get("externalReference")) ;

System.log("Owner: " + machine.get("owner")) ;

System.log("Type: " + machine.get("type")) ;

System.log("Properties: " + machine.get("properties")) ;

 

var vCACVmProperties = machine.get("properties") ;

if (vCACVmProperties != null) {

  var log = "";

  log += "vCAC VM properties :\n";

  var array = new Array();

 

Now, that script returns the following:

2017-08-18 12:32:16.402] [I] BlueprintName: Windows 2012 R2 Server

[2017-08-18 12:32:16.403] [I] ComponentId: w2k12prod

[2017-08-18 12:32:16.404] [I] ComponentTypeId: Infrastructure.CatalogItem.Machine.Virtual.vSphere

[2017-08-18 12:32:16.405] [I] EndpointId: af7a34a4-cdfa-43f3-893d-3490bab38d67

[2017-08-18 12:32:16.406] [I] RequestId: ab543770-0c8c-41b7-87b9-2bdc988d5d47

[2017-08-18 12:32:16.407] [I] VirtualMachineEvent: null

[2017-08-18 12:32:16.408] [I] WorkflowNextState: null

[2017-08-18 12:32:16.409] [I] State: VMPSMasterWorkflow32.MachineProvisioned

[2017-08-18 12:32:16.410] [I] Phase: POST

[2017-08-18 12:32:16.411] [I] Event: null

[2017-08-18 12:32:16.412] [I] ID: f8cefb94-b08d-473c-b6b4-552ce19f4490

[2017-08-18 12:32:16.413] [I] Name: xxxxxxxxx

[2017-08-18 12:32:16.414] [I] ExternalReference: vm-39152

[2017-08-18 12:32:16.415] [I] Owner: xxxxxxxxx

[2017-08-18 12:32:16.416] [I] Type: 0

[2017-08-18 12:32:16.417] [I] Properties: null

[2017-08-18 12:32:16.418] [E] Error in (Workflow:Adding the server DNS / Scriptable task (item1)#41) TypeError: Cannot call method "get" of null

[2017-08-18 12:32:16.430] [E] Workflow execution stack:

***

item: 'Adding the server DNS/item1', state: 'failed', business state: 'null', exception: 'TypeError: Cannot call method "get" of null (Workflow:Adding the server DNS / Scriptable task (item1)#41)'

workflow: 'Adding the server DNS' (d30146ed-b02f-4818-8340-b55409a57485)

 

Some of the information comes back normally while others return a null value, including the IP address.  When I look in vCenter the VM shows the IP correctly.  Has anyone seen this?  Any workarounds?

 

Thanks


Viewing all articles
Browse latest Browse all 6251

Trending Articles



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