VMware Cloud Community
SamWolf
Enthusiast
Enthusiast

Custom Parameters Error.

Hello,

In an attempt to strip and reassign a vCloud:VM's custom parameters I have run into a snag around there addition of new parameters.

With the input of a vCloud:VM my workflow goes through the process of stripping away any and all custom parameters. (These is successful)

Once stripped the new parameters are polled from various sources. (Again this completes successfully evidence in variable tab.)

Finally comes the reassignment. My call to addVMCustomParameters looks like:

                    System.getModule("com.vmware.library.vCloud.vApp.VM").addVMCustomParameter(VM,"Datacenter", "Description", String, "DC LABEL", false, Datacenter);

And the error this line produces is:

                    Bad request: Unknown OVF type 'org.mozilla.javascript.IdFunctionObject@585c31f3'.; majorErrorCode=400; minorErrorCode=BAD_REQUEST; vendorSpecificErrorCode=null; (Dynamic Script Module name : addVMCustomParameter#4)

What is strange is that the workflow fails on its error and stops executing but when I re-run the workflow my removal process picks up the newly assigned value which was shown as failing and removes it.

Thanks for your help,

0 Kudos
4 Replies
SamWolf
Enthusiast
Enthusiast

Is there anyone that can touch on this?

0 Kudos
iiliev
VMware Employee
VMware Employee

Forwarded this discussion to the developers working on vCloud plug-in to take a look.

Jinnie
VMware Employee
VMware Employee

Hello,

It seems that the parameterType parameter is incorrect.

It must be a string, and you are providing a JS object.

Valid values are "int", "string", "boolean". String (as object) is not.

You can see the "Add a custom parameter to a virtual machine" workflow for reference.

Best regards!

SamWolf
Enthusiast
Enthusiast

Thanks for the input Jinnie

I have pursued another avenue to solve my problem which seems successful so I will close this off

Thanks.

0 Kudos