PUT /nodes/{uuid}/mediaMount
Use this method to mount media, unmount media that was previously mounted, or enable or disable support for mounting media on a specific ThinkServer or ThinkSystem server.
Authentication
Authentication with username and password is required.
Request URL
PUT https://{management_server_IP}/nodes/{uuid}/mediaMount
where {uuid} is the UUID of a ThinkServer server. To obtain the node UUID, use the GET /nodes method.
Query parameters
None
Request body
Attributes | Required / Optional | Type | Description | ||
---|---|---|---|---|---|
action | Required | String | (ThinkServer servers only) Enable or disabled servers to support mounting media. Specify one of the following values.
|
This example enables support for mounting media on a ThinkServer server.
{
"action": "enableMountMedia"
}
Attributes | Required / Optional | Type | Description | ||
---|---|---|---|---|---|
action | Required | String | Mounts an image that was previously mounted when mount is specified If you specify this attribute, this method starts a job that runs in the background to perform the operation. The response header includes a URI in the form /tasks/{task_id} (for example, /tasks/12) that represents the job that is created to perform this request. You can use GET /tasks/{job_list} to monitor the status and progress of the job. If a job was not successfully started, refer to the response code and response body for details. Attention A successful response indicates that the request was successfully created and accepted by the management server. It does not indicate that the operation that is associated with the job was successful. | ||
domainName | Required if shareType is Samba | String | Domain name of the server on which media is located If a value is not specified, the domain name is used. | ||
mediaLocation | Required | String | Full path of the media ISO | ||
mediaServerAddress | Required | String | IP address of the server on which media is located | ||
mediaType | Required | String | (ThinkServer servers only) The media type. This can be one of the following values.
| ||
password | Required if shareType is Samba | String | Password to authenticate to the media | ||
port | Optional | Integer | Port number to use if mediaLocation is on an external web server and shareType is http or https | ||
shareType | Required | String | Share type. This can be one of the following values.
| ||
username | Required if shareType is Samba | String | User name to authenticate to the media |
This example mounts a hard disk drive on a Samba server.
{
"action": "mount",
"domainName":"192.0.2.146",
"mediaLocation":"/path/to/someiso.iso",
"mediaServerAddress": "192.0.2.146",
"mediaType" : "HD",
"password":"password",
"shareType":"samba",
"username":"JOE"
}
This example mounts an NFS server to a System x server
{
"action": "mount",
"domainName":"192.0.2.146",
"mediaLocation":"/path/to/some.iso",
"mediaServerAddress": "192.0.2.146",
"password":"password",
"shareType":"nfs",
"username":"JOE"
}
This example mounts an HTTPS server to a server
{
"action":"mount",
"domainName":"",
"mediaLocation":"/linux/SuSE/SLES15/SLE-15-SP2-Full-x86_64-GM-Media1.iso",
"mediaServerAddress":"192.0.2.146",
"mediaType":"CD",
"password":"",
"port":443,
"shareType":"https",
"username":""
}
Attributes | Required / Optional | Type | Description | ||
---|---|---|---|---|---|
action | Required | String | Unmounts an image when unmount is specified If you specify this attribute, this method starts a job that runs in the background to perform the operation. The response header includes a URI in the form /tasks/{task_id} (for example, /tasks/12) that represents the job that is created to perform this request. You can use GET /tasks/{job_list} to monitor the status and progress of the job. If a job was not successfully started, refer to the response code and response body for details. Attention A successful response indicates that the request was successfully created and accepted by the management server. It does not indicate that the operation that is associated with the job was successful. | ||
mediaType | Required | String | (ThinkServer servers only) Media type. This can be one of the following values.
| ||
UID | Required | String | (Servers other than ThinkServer only) Unique ID of the mounted media to be unmounted. If not specified, all mounted media of the specified type is unmounted. To obtain the mount media ID, use the GET /tasks/{job_list} method. |
The example unmounts a CD drive on a ThinkServer server.
{
"action": "unmount",
"mediaType" : "CD"
}
The example unmounts media with UID 597BDF4270 on a System x server.
{
"action": "unmount",
"UID" : "597BDF4270"
}
The example unmounts all media from a server.
{
"action": "unmount",
}
Response codes
Code | Description | Comments |
---|---|---|
200 | OK | The request completed successfully. |
400 | Bad Request | A query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body. |
401 | Unauthorized | The user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body. |
403 | Forbidden | The orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. Ensure that you have privileges to perform the request. |
500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response body
Attributes | Type | Description | |
---|---|---|---|
statusCode | Integer | The return code | |
statusDescription | String | Description of the return code. | |
messages | Array of objects | Information about one or more messages. | |
explanation | String | Additional information to clarify the reason for the message. | |
id | String | The message identifier of a returned message. | |
recovery | String | Recovery information | |
recoveryURL | String | ||
text | String | Message text associated with the message identifier. |
The following example is returned if the request is successful.
{
"statusCode": 403,
"statusDescription": "The request is forbidden by server.",
"messages": [{
"explanation": "The mount media request to the device has been rejected..",
"id": "FQXDM0403N",
"recovery": "Verify the request and make sure it is allowed by server."
"recoveryUrl": "",
"text": "The request is forbidden by server.",
}]
}
Give documentation feedback