Resource URL: /platform/<<version=1>>/storagepool/nodepools

    Overview: This resource applies the standard collection pattern to OneFS
              storage node pools.

     Methods: GET, POST

********************************************************************************

Method GET: List all node pools.

       URL: GET /platform/<<version=1>>/storagepool/nodepools

There are no query arguments for this method.

GET response body schema:
{
  "type": "object", 
  "properties": {
    "nodepools": {
      "items": {
        "type": "object", 
        "properties": {
          "name": {
            "required": true, 
            "type": "string", 
            "description": "The node pool name."
          }, 
          "lnns": {
            "items": {
              "type": "integer"
            }, 
            "required": true, 
            "type": "array", 
            "description": "The nodes that are part of this node pool."
          }, 
          "l3_status": {
            "enum": [
              "l3", 
              "storage", 
              "migrating"
            ], 
            "type": "string", 
            "description": "'storage' if the 'l3' option is disabled. If the l3 option is enabled, 'migrating' if any SSDs in this node pool have not yet been migrated to L3. If all SSDs have been migrated, 'l3'.", 
            "required": true
          }, 
          "manual": {
            "required": true, 
            "type": "boolean", 
            "description": "Whether or not the node pool is manually managed."
          }, 
          "id": {
            "required": true, 
            "type": "integer", 
            "description": "The system ID given to the node pool."
          }, 
          "usage": {
            "required": true, 
            "type": "object", 
            "description": "Total pool usage.", 
            "properties": {
              "virtual_hot_spare_bytes": {
                "required": true, 
                "type": "string", 
                "description": "Bytes reserved for virtual hot spare in the pool."
              }, 
              "avail_bytes": {
                "required": true, 
                "type": "string", 
                "description": "Available free bytes remaining in the pool when virtual hot spare is taken into account."
              }, 
              "avail_ssd_bytes": {
                "required": true, 
                "type": "string", 
                "description": "Available free bytes remaining in the pool on SSD drives when virtual hot spare is taken into account."
              }, 
              "free_ssd_bytes": {
                "required": true, 
                "type": "string", 
                "description": "Free bytes remaining in the pool on SSD drives."
              }, 
              "free_bytes": {
                "required": true, 
                "type": "string", 
                "description": "Free bytes remaining in the pool."
              }, 
              "total_ssd_bytes": {
                "required": true, 
                "type": "string", 
                "description": "Total bytes used in the pool on SSD drives."
              }, 
              "total_bytes": {
                "required": true, 
                "type": "string", 
                "description": "Total bytes used in the pool."
              }, 
              "balanced": {
                "required": true, 
                "type": "boolean", 
                "description": "Whether or not the pool usage is currently balanced."
              }
            }
          }, 
          "protection_policy": {
            "type": "string", 
            "description": "The underlying protection policy."
          }, 
          "l3": {
            "required": true, 
            "type": "boolean", 
            "description": "Use SSDs in this node pool for L3 cache."
          }, 
          "tier": {
            "required": true, 
            "type": [
              "string", 
              "integer", 
              "null"
            ], 
            "description": "The name (if named) or system ID of the node pool's tier, if it is in a tier. Otherwise null."
          }, 
          "can_enable_l3": {
            "required": true, 
            "type": "boolean", 
            "description": "Indicates if enabling L3 is possible. L3 cannot be enabled if there are unprovisioned drives."
          }
        }
      }, 
      "type": "array"
    }, 
    "total": {
      "type": "integer", 
      "description": "Total number of items available."
    }
  }
}

********************************************************************************

Method POST: Create a new node pool.

        URL: POST /platform/<<version=1>>/storagepool/nodepools

There are no query arguments for this method.

Required POST request body fields:
name, lnns

POST request body schema:
{
  "type": "object", 
  "properties": {
    "tier": {
      "required": false, 
      "type": [
        "string", 
        "integer", 
        "null"
      ], 
      "description": "The name or ID of the node pool's tier, if it is in a tier."
    }, 
    "protection_policy": {
      "required": false, 
      "type": "string", 
      "description": "The node pool protection policy."
    }, 
    "l3": {
      "required": false, 
      "type": "boolean", 
      "description": "Use SSDs in this node pool for L3 cache."
    }, 
    "name": {
      "required": true, 
      "type": "string", 
      "description": "The node pool name."
    }, 
    "lnns": {
      "items": {
        "type": "integer"
      }, 
      "required": true, 
      "type": "array", 
      "description": "The nodes that are part of this node pool."
    }
  }
}

POST response body schema:
{
  "type": "object", 
  "properties": {
    "id": {
      "required": true, 
      "type": "integer", 
      "description": "The system ID of the new object."
    }
  }
}
