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

Java Scripts in VRO action

$
0
0

Hi ,

 

I created a java script which will to get network profile value as string .  but it is not working .i am not getting any value return .

 

==============================================================================

if (clusterName == null || tenantName == null) return ;

var networkProfiles ;

 

var host = vCACCAFEHostManager.getDefaultHostForTenant(tenantName, true);

var reservations = vCACCAFEEntitiesFinder.getReservations(host);

 

var res;

for each (reservation in reservations) {

if (reservation.name == "Res-" + clusterName) res = reservation;

}

 

var data = res.getExtensionData();

 

var reservationNetworks = data.get("reservationNetworks");

for each(network in reservationNetworks.getValue()) {

if(network.getValue().get("networkProfile").label.indexOf('BUN') == 0) {

        var backupNetworkProfile = network.getValue().get("networkProfile").label;

        break

   

}

 

return networkProfiles;

}

 

 

 

Previously i was able to get value as Array not as a string . Can someone help ?


Viewing all articles
Browse latest Browse all 6251

Trending Articles



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