Skip to main content

POST– Initiate CD media image redirection

Note
  1. Make sure RMedia configuration is enabled in BMC. If not, enable it through Web UI or refer to POST – Enable the Remote Media.

  2. Make sure CD instance collection is more than 1, refer to GET – Virtual Media Collection. If there isn’t CD instance or only 1 CD instance, initiating CD media image redirection action will fail.

Request

POST https://{{ip}}/redfish/v1/Managers/{{manager_instance}}/VirtualMedia/{{CD_instance}}/Actions/VirtualMedia.InsertMedia
Content-Type: application/json

Request example

NFS

{
"Image": "//10.0.125.169/home/tamil/images/images/ubuntu-14.04.1-desktop-amd64.iso",
"TransferProtocolType": "NFS",
}

CIFS

{
"Image": "//<sys_ip>/home/test/images/javatools.iso",
"TransferProtocolType": "CIFS",
"UserName": "<sys_username>",
"Password": "<sys_password>"
}

Response

For success, the response status is 202 with a message body. For Error Responses, please refer to Error Response.
{
"@odata.context": "/redfish/v1/$metadata#Task.Task(Description,TaskState,Name,Id)",
"@odata.id": "/redfish/v1/TaskService/Tasks/1",
"@odata.type": "#Task.v1_4_2.Task",
"Description": "Task for InsertMedia Action",
"Id": "1",
"Name": "InsertMedia Action",
"TaskState": "New"
}
  1. After a successful post call, using the TaskID check the TaskState in "/redfish/v1/TaskService/Tasks/<taskid>"and verify the value of "RedirectionStatus" OEM property in GET "/redfish/v1/Managers/Self/VirtualMedia/<cd_instance>".

  2. Once Task created Auditlog will be generated for InsertMedia Post Action.

  3. The Task is aborted due to an error, "TaskState"property value will be "Exception" and an appropriate error message will be displayed in the response of the Corresponding Task "/redfish/v1/TaskService/Tasks/<taskid>".