Hi All,
How to get "Status Detail" from a catalogItemRequest object. I have a ASD service which invokes catalog Item blueprint. The ASD service loops through till catalogItemRequest status is "STOPPED". If the state is "Failed" then need to get "Status Detail" as why it failed from the request. The status detail is displayed in VCAC portal for the request.
Any help appreciated.
Thanks
Well you can definitely get it from a REST call to the catalog-service (.../catalog-service/api/consumer/requests/{requestID} )... and the catalog-service is exposed through the plugin, so you don't have to setup a REST host endpoint and get an Authorized bearer token to get at it.
The problem I have found in general is that the Status Details for IaaS Blueprint requests are horribly bad at presenting real value.
"requestCompletion": {
"requestCompletionState": "FAILED",
"completionDetails": "Request failed: *SERVERNAME* not found, and possibly deleted before provisioning finished."
},
I think requests are also exposed through the plugin script task classes. Let me see if I can find something.
Can you use "state"?
"state": "PROVIDER_FAILED"
Then you could use CatalogItemRequest.state.value()
(I assume you already have your object instance.)
Still digging for the status detail.
yourRequestInstanceObject.getRequestCompletion().getCompletionDetails()
That's it...
If you want to use STATE.... here are all the possibilities...
<xs:simpleType name="requestState">
<xs:restriction base="xs:string">
<xs:enumeration value="UNSUBMITTED"/>
<xs:enumeration value="SUBMITTED"/>
<xs:enumeration value="DELETED"/>
<xs:enumeration value="PENDING_PRE_APPROVAL"/>
<xs:enumeration value="PRE_APPROVAL_SEND_ERROR"/>
<xs:enumeration value="PRE_APPROVED"/>
<xs:enumeration value="PRE_REJECTED"/>
<xs:enumeration value="IN_PROGRESS"/>
<xs:enumeration value="PROVIDER_SEND_ERROR"/>
<xs:enumeration value="PROVIDER_COMPLETED"/>
<xs:enumeration value="PROVIDER_FAILED"/>
<xs:enumeration value="PENDING_POST_APPROVAL"/>
<xs:enumeration value="POST_APPROVAL_SEND_ERROR"/>
<xs:enumeration value="POST_APPROVED"/>
<xs:enumeration value="POST_REJECTION_RECEIVED"/>
<xs:enumeration value="ROLLBACK_ERROR"/>
<xs:enumeration value="POST_REJECTED"/>
<xs:enumeration value="SUCCESSFUL"/>
<xs:enumeration value="FAILED"/>
</xs:restriction>
</xs:simpleType>
Thanks Sean. Where did you get this information?
So for every service in your environment, you can get to the REST documentation for the service by directing your browser to...
https://your-vRA-URL/<service-name>/api/docs/index.html
On that page is the .xsd file that defines the permitted elements and attributes.
e.g.
https://your-vRA-URL/catalog-service/api/docs/vcac-service-catalog-rest-schema.xsd