Nodeclasses: GET

Gets details about node classes in the IBM Spectrum Scale™ cluster.

Availability

Available on all IBM Spectrum Scale editions.

Description

The GET nodeclasses request gets information about all node classes and the nodes that are part of each node class. For more information about the fields in the data structures that are returned, see the topics mmcrnodeclass command, mmdelnodeclass command, mmchnodeclass command, and mmlsnodeclass command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/nodeclasses
where
nodeclasses
Specifies nodes classes as the resource of this GET call. Required.

Request headers

Content-Type: application/json
Accept: application/json

Request data

No request data.

Request parameters

The following parameters can be used in the request URL to customize the request:
Table 1. List of request parameters
Parameter name Description and applicable keywords Required/optional
fields Comma separated list of fields to be included in response. ':all:' selects all available fields. Optional.
filter Filter objects by expression. For example, 'status=HEALTHY,entityType=FILESET' Optional.

Response data

{  
  "status": {
      "code":ReturnCode",
      "message":"ReturnMessage"
   },
   "paging": 
    {
    "next": "URL"
    },
   nodeClasses: [
      { 
          "nodeclassName": "Name", 
          "members": "[node1Name, node2Name, node3Name]", 
          "type": "SYSTEM | USER"
      }
        ]
}
For more information about the fields in the following data structures, see the links at the end of this topic.
"status":
Return status.
"message": "ReturnMessage",
The return message.
"code": ReturnCode
The return code.
"paging"
The URL to retrieve the next page. Paging is enabled when more than 1000 objects are returned by the query.
"nodeClasses":
"nodeclassName":"Name"
The name of the node class.
"members":"List of nodes"
The list of nodes that are part of the node class.
"type": "SYSTEM | USER"
Indicates whether the node class is system-defined or user-defined.

Examples

The following example gets information about the node classes that are available in the cluster.

Request URL:
curl -k -u admin:admin001 -X GET --header 'accept:application/json' 
'https://198.51.100.1:443/scalemgmt/v2/nodeclasses'
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.

The nodeclasses array returns 10 objects in the following example. Each object contains details about one node class.

{
  "nodeclasses" : [ {
    "nodeclassName" : "aixNodes",
    "type" : "SYSTEM"
  }, {
    "nodeclassName" : "all",
    "type" : "SYSTEM"
  }, {
    "nodeclassName" : "cesNodes",
    "type" : "SYSTEM"
  }, {
    "nodeclassName" : "clientLicense",
    "type" : "SYSTEM"
  }, {
    "nodeclassName" : "clientNodes",
    "type" : "SYSTEM"
  }, {
    "nodeclassName" : "cnfsNodes",
    "type" : "SYSTEM"
  }, {
    "nodeclassName" : "disabledCnfsNodes",
    "type" : "SYSTEM"
  }, {
    "nodeclassName" : "enabledCnfsNodes",
    "type" : "SYSTEM"
  }, {
    "nodeclassName" : "GUI_MGMT_SERVERS",
    "type" : "USER"
  }, {
    "nodeclassName" : "GUI_SERVERS",
    "type" : "USER"
  }, ],
  "status" : {
    "code" : 200,
    "message" : "The request finished successfully"
  }
}