Quantcast
Channel: VMware Communities : Discussion List - Site Recovery Manager
Viewing all articles
Browse latest Browse all 3691

StringLiteral not a StringLiteral?

$
0
0

So I'm trying to update a vRA Reservation - specifically a Custom Property item in the extension data.

 

I have fetched the vCACCAFEReservation, and it's extension data object (a vCACCAFELiteralMap). In there is an item, say 'AcctNum' which is currently set to '1234' (string I believe) and I wish to set to '0987'.

 

So I remove the item from the extension data:

 

resExtData.remove("AcctNum");

 

This works.

Then I create a new value and place in the extensionData object:

 

var newValue = vCACCAFEStringLiteral.fromString("0987");

resExtData.put("AcctNum",newValue);

 

According to the link above, .put() takes a string Key and a com.vmware.vcac.platform.content.literals.Literal value - which vCACCAFEStringLiteral.fromString() should return.


Then I update the reservation object with the modified extension data:


resObj.setExtensionData(resExtData);


That appears to work.

Then I fetch the needed REST client service object(s) to communicate with vRA:


resClient = vCACCAFEHost.createReservationClient();

resService = resClient.getReservationReservationService();

 

And this all works.

But then, I apply the updated reservation extension data to the live reservation:

 

resService.updateReservation(resObj);

 

And I get an error at that point:

 

Error in (Workflow:ActionDev / Set Reservation Data (item3)#73) Invalid custom property: AcctNum. Supported datatypes are BooleanLiteral, StringLiteral and SecureStringLiteral.

 

The Custom Property exists and I believe I'm using a proper datatype - a StringLiteral. Plus, wouldn't the previous .put() or .setExtensionData() method calls fail if it was not an acceptable format/datatype? So I'm not sure what the issue is.

 

Any help would be appreciated.


Viewing all articles
Browse latest Browse all 3691

Trending Articles



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