Miq_request_id in vm context


#1

Does the miq_request_id exist only in provisionning context or can we get it in others contexts, like service or vm ones?


#2

If the VM was provisioned via CF, it should have an association to the request

 vm = MiqAeMethodService::MiqAeServiceMiqProvisionTask.all.select {|t| t.destination.present? }.first
 vm.miq_request 
 => #<MiqAeServiceServiceTemplateProvisionRequest:0x727bf94 @object=#<ServiceTemplateProvisionRequest id: 403, ... >

# other associations starting with miq_*
vm.miq_provision_request  
vm.miq_request 
vm.miq_request_id         
vm.miq_request_task       
vm.miq_request_task_id
vm.miq_request_tasks

#3

Anything that starts out as a request will have a request ID, so this includes VM and service provisioning and reconfiguring operations, as well as things like making an automation request via the RESTful API.