Quantcast
Channel: VMware Communities : All Content - vRealize Automation Tools
Viewing all articles
Browse latest Browse all 9859

How to modify an existing Reservation using VCACCAFEReservationReservationService

$
0
0

Greetings,

I am trying to apply a Reservation Policy to an existing reservation (I'm successfully creating the Reservation Policy using the VCACCAFERervationReservationPolicyService).  It doesn't seem to matter what changes I try to make to the Reservation object (reservationPolicyId, name, etc) I always get the same error when updating.

I can make the same changes to the existing reservation through the vRA UI without any errors and everything works fine deploying to the reservation so I'm thinking the problem must lie in the way I'm trying to modified it in code:

var reservationService = cafeHost.createReservationClient().getReservationReservationService();
var reservation = reservationService.getReservation(reservationId);
reservation.setReservationPolicyId(reservationPolicyId);
reservationService.updateReservation(reservation); <<<< ERROR The compute resource with ID 3e28cf22-ef25-4db5-b773-f176ed7da74e referenced by reservation is not valid
 
Any help is greatly appreciated!

Viewing all articles
Browse latest Browse all 9859

Trending Articles