Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 198737

Re: I need help with Actions after upgrade of vRO

$
0
0

The dunes path has changed for objects in the vCenter plug-in. As Illiav said the plug-in was completely redone and is one reason why accessing objects through the full dunes path is not a good idea.

 

You need to change your find to this (I have bolded the relevant part):

 

var dunesId =

"dunes://service.dunes.ch/CustomSDKObject?id='" +

vc.id +

",id:" +

id +

"'&dunesName='VC:" +

type +

"'";

foundObjects.push(dunesId);

 

You should also be doing a System.isNotFound() before adding it to the vm array when doing Server.fromUri(dunesId); as the return type is NotFound from that method (rather than null or undefined) you are getting the error on .split instead of simply accessing the .name property of vm1 or vm2.

 

As for when you attempted to do System.log(vm1.name) and got the parsing error, I'm assuming you tried to put inside the var lexicographical =  instantiation which is one statement split across four lines (notice the commas).

 

Finally, as an aside, this whole thing is a nightmare to read and you should really redo your entire approach if you can.


Viewing all articles
Browse latest Browse all 198737

Trending Articles



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