Skip to main content

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

Table 1. Enable or disable support for mounting media
AttributesRequired / OptionalTypeDescription
actionRequiredString(ThinkServer servers only) Enable or disabled servers to support mounting media. Specify one of the following values.
  • enableMountMedia. Enable a mounted image.

  • disableMountMedia. Disable a mounted image.

  • reset. (ThinkSystem only) Cleans the management console and removes mounted media.

This example enables support for mounting media on a ThinkServer server.
{
"action": "enableMountMedia"
}
Table 2. Mount media
AttributesRequired / OptionalTypeDescription
actionRequiredStringMounts 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.
domainNameRequired if shareType is SambaStringDomain name of the server on which media is located

If a value is not specified, the domain name is used.

mediaLocationRequiredStringFull path of the media ISO
mediaServerAddressRequiredStringIP address of the server on which media is located
mediaTypeRequiredString(ThinkServer servers only) The media type. This can be one of the following values.
  • CD/DVD. CD drive
  • FD. Flash drive
  • HD. Disk drive
passwordRequired if shareType is SambaStringPassword to authenticate to the media
portOptionalIntegerPort number to use if mediaLocation is on an external web server and shareType is http or https
shareTypeRequiredStringShare type. This can be one of the following values.
  • ftp
  • http
  • https
  • nfs
  • samba
  • sftp
usernameRequired if shareType is SambaStringUser 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":""
}
Table 3. Unmount media
AttributesRequired / OptionalTypeDescription
actionRequiredStringUnmounts 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.
mediaTypeRequiredString(ThinkServer servers only) Media type. This can be one of the following values.
  • CD/DVD. CD drive
  • FD. Flash drive
  • HD. Disk drive
UIDRequiredString(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

CodeDescriptionComments
200OKThe request completed successfully.
400Bad RequestA 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.
401UnauthorizedThe user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body.
403ForbiddenThe 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.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

AttributesTypeDescription
statusCodeIntegerThe return code
statusDescriptionStringDescription of the return code.
messagesArray of objectsInformation about one or more messages.
 explanationStringAdditional information to clarify the reason for the message.
 idStringThe message identifier of a returned message.
 recoveryStringRecovery information
 recoveryURLString 
 textStringMessage 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.",
}]
}