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

How to get the ResourceActionRequest from the EventManager Payload (reconfigure task)

$
0
0

This is a follow up from Looking for the right Custom Properties for event VMPSMasterWorkflow32.EVENT.ReconfigureVM

 

I expected that the payload of the request shows me the NEW configuration but it only gives me the current configuration not the one that was submitted in the request

I found what I need in the ResourceActionRequest there I have requestData which is a LiteralMap and has all the changes (see vra7 how to configure subscription for vm reconfigure action? at the end)

 

I can access the all the requests (type: ResourceActionRequest) in the system and also find (manually ) the one I want...BUT how do i get from the payload I'm given to the correct request?

All the IDs in teh payload as well as the ASD IDs do not match the ActionRequest.ID (or any request IDs I can find).

 

To get all the Requests an troll them use:

var cafeHost = Server.findAllForType("vCACCAFE:VCACHost")[0];

var reqs = vCACCAFEEntitiesFinder.getResourceActionRequests(cafeHost);

for each (req in reqs){

    System.log(req.requestData);

}

The payload gives me:

  • __api.request.id (no idea)
  • requestId (same as __api.request.id )
  • __Cafe.Root.Request.Id (CatalogRequests, the original request that build the VM)
  • __iaas_request_binding_id (Blueprint ID)
  • __asd_requestInstanceId (no idea)
  • __asd_catalogRequestId (no idea)
  • __asd_correlationId (same as __Cafe.Root.Request.Id)
  • __asd_requestTraceId (no idea)

none of these IDs match any of the IDs in the ReqourceActions

 

Anyone?


Viewing all articles
Browse latest Browse all 9859

Trending Articles



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