Filesystems/{filesystemPath}/loopbackDevice/attach/{fileName}/nodes/{name}: POST
Attaches a loopback file to a specified node.
Availability
Available on all IBM Storage Scale editions.
Description
The POST /scalemgmt/v2/filesystems/{filesystemPath}/loopbackDevice/attach/{fileName}/nodes/{name} request attaches a loopback file to a specified node.
Request URL
https://<IP address or host name of API server>:<port>/scalemgmt/v2/filesystems/{filesystemPath}/loopbackDevice/attach/{fileName}/nodes/{name}
where- nodes/{name}
- Specifies the node to which the loopback file is attached. Required.
Request headers
Content-Type: application/json
Accept: application/json
Request parameters
The following parameters can be used in the request URL to customize the
request:
Parameter name | Description and applicable keywords | Required/optional |
---|---|---|
filesystemPath | The location of the file system. | Required. |
fileName | The name of the loopback file that is attached to the node. | Required. |
name | The name of node to which the loopback file is attached. | Required. |
Note: Path traversal is restricted in the parameters. Invalid values for
fileName, name, or filesystemPath
results in errors.
Request data
No request data.
Response data
{
"jobs" : [ {
"jobId" : Id of job,
"status" : Job status,
"submitted" : Date and time,
"completed" : Date and time,
"runtime" : Sequence,
"request" : {
"type" : Request type,
"url" : Request URL
},
"result" : {
"progress" : [ ],
"commands" : [ ],
"stdout" : ,
"stderr" : [ ],
"exitCode" : },
"pids" : [ ]
} ],
"status" : {
"code" : Status code,
"message" : Status message
}
}
- "status":
- Return status.
- "message": "ReturnMessage",
- The return message.
- "code": ReturnCode
- The return code.
- "jobs":
- An array of elements that describe jobs. Each element describes one job.
- "result"
-
- "commands":"String'
- Array of commands that are run in this job.
- "progress":"String'
- Progress information for the request.
- "exitCode":"Exit code"
- Exit code of command. Zero is success and nonzero denotes failure.
- "stderr":"Error"
- CLI messages from stderr.
- "stdout":"String"
- CLI messages from stdout.
- "request"
-
- "type":"{GET | PUT | PUT | DELETE}"
- HTTP request type.
- "url":"URL"
- The URL through which the job is submitted.
- "data":" "
- Optional.
- "jobId":"ID",
- The unique ID of the job.
- "submitted":"Time"
- The time at which the job was submitted.
- "completed":Time"
- The time at which the job was completed.
- "status":"RUNNING | COMPLETED | FAILED"
- Status of the job.
Examples
The following API command attaches the file t1.
Request URL:
curl -k -u admin:admin001 -X POST --header 'content-type:application/json' --header 'accept:application/json''https://198.51.100.1:443/scalemgmt/v2/filesystems/gpfs/fs1/loopbackDevice/attach/t1/nodes/scale-41.openstacklocal’
The request URL with no field or filter parameter returns only the
details that uniquely identify the object.Response data:
Note: In the JSON data that is returned, the return code indicates whether the
command is successful. The response code 200 indicates that the command successfully retrieved the
information. Error code 400 represents an
invalid request and 500 represents internal server error.
{
"jobs" : [ {
"jobId" : 1000000000020,
"status" : "COMPLETED",
"submitted" : "2021-10-27 02:33:49,898",
"completed" : "2021-10-27 02:33:50,653",
"runtime" : 755,
"request" : {
"type" : "POST",
"url" : "/scalemgmt/v2/filesystems/%2Fgpfs%2Ffs1/loopbackDevice/attach/t1/nodes/scale-41.openstacklocal"
},
"result" : {
"progress" : [ ],
"commands" : [ ],
"stdout" : [ "info: /dev/loop0\n" ],
"stderr" : [ ],
"exitCode" : 0
},
"pids" : [ ]
} ],
"status" : {
"code" : 200,
"message" : "The request finished successfully."
}
}