When deleteing a published IAAS blueprint in vRA, the blueprint will also be deleted from the catalog and all it's entitlements.
This is effectively done by setting the status column in the CAFE database to "DELETED". The correct way to do it is of course not by modifying the table, but by setting the status using the API / vRO Plugin.
Now when I use the vRO plugin like this:
var host = vCACCAFEEntitiesFinder.getHostForEntity(catalogItem); var client = host.createCatalogClient().getCatalogAdminCatalogItemService(); catalogItem.setStatus(vCACCAFEPublishStatus.DELETED); client.updateCatalogItem(catalogItem);
I recieve the error:
Changing Publish Status from PUBLISHED to DELETED is not allowed.
Obviously I'm not supposed to change the status directly from PUBLISHED to DELETED. Changeing it from RETIRED to DELETED is not allowed as well, so first disable and then delete dosn't work.
This is not only true for the vRO Plugin but also for the underlaying vRA REST API, e.g.
vcac-cli>rest put --service catalog-service --uri catalogItems/resid --data @C:\rest.json
will exit with:
Command failed java.lang.RuntimeException: Changing Publish Status from RETIRED to DELETED is not allowed.
The REST API documentation mentions this, but dosn't tell us what transitions are allowed or where to find the possible transitions:
PUT: Updates an existing CatalogItem upon the existence and validation of CatalogItem.For e.g.it validates for allowed state transitions before making the update to the catalog item.
I searched every document I found and the REST API of vRA for clues what the possible PublishStatus are and how to go from PUBLISHED to DELETED with no luck.
Is there any list of possible PublishStatus ENUMs or even an explanation what steps have to be done do change a catalog item from published to deleted (just as the UI will do when useing it)?
Thanks
Robert