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

Deleting vRA 7.2 Entitlements from vRO 7.2

$
0
0

A new feature in vRA 7.2 is the ability to delete Entitlements (yaay, finally )

 

What seems to be missing is the ability to delete Entitlements using the vRA plugin in vRO.

 

Fortunately, they can be deleted directly from the vRA API

 

This bit of code can be used to create a vRO action for deleting Entitlements. 

 

I could not find anything on this topic when I searched for it, hoping this can help others

----

// Inputs to Action

// entitlementObject - vCACCAFE:Entitlement

 

//  Derive CAFE Host from Entitlement Object

var cafeHost = vCACCAFEEntitiesFinder.getHostForEntity(entitlementObject);

 

// Get Entitlement ID

var entID = entitlementObject.id

 

// Set API Endpoint and create Rest Client

var endpoint = "com.vmware.csp.core.cafe.catalog.api";

var restClient = cafeHost.createRestClient(endpoint);

 

// Create Resource URL by combining "entitlements" with the Entitlements GUID

resourceUrl = "entitlements/" + entID;

 

// Execute DELETE call

var response = restClient.delete(resourceUrl);

 

//Close REST Client Connection

restClient.close();

----


Viewing all articles
Browse latest Browse all 3691

Trending Articles