Resource URL: /platform/<<version=3>>/upgrade/cluster/patch/patches

    Overview: This resource applies the standard collection pattern to OneFS
              patches.

     Methods: GET, POST

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

Method GET: List all patches.

       URL: GET /platform/<<version=3>>/upgrade/cluster/patch/patches

Query arguments:
  sort=<string> The field that will be used for sorting.
limit=<integer> Return no more than this many results at once (see resume).
local=<boolean> Whether to view patches on the local node only.
     dir=<enum> Where <enum> is one of ASC, DESC.  The direction of the sort.
resume=<string> Continue returning results from previous call using this token
                (token should come from the previous call, resume cannot be
                used with other options).

GET response body schema:
{
  "type": "object", 
  "properties": {
    "total": {
      "type": "integer", 
      "description": "Total number of items available."
    }, 
    "patches": {
      "items": {
        "type": "object", 
        "description": "A software patch that can be applied to OneFS.", 
        "properties": {
          "comment": {
            "type": "string", 
            "description": "A long comment about the patch."
          }, 
          "files": {
            "items": {
              "path": {
                "type": "string", 
                "description": "The path of the file."
              }, 
              "md5": {
                "type": "string", 
                "description": "The md5 checksum of the file."
              }
            }, 
            "type": "array", 
            "description": "The files contained in this patch."
          }, 
          "description": {
            "type": "string", 
            "description": "A short description of the patch."
          }, 
          "dependencies": {
            "items": "string", 
            "type": "array", 
            "description": "Other patches that this patch depends on."
          }, 
          "status": {
            "type": "string", 
            "description": "The intallation status of this patch on the cluster."
          }, 
          "conflicts": {
            "items": "string", 
            "type": "array", 
            "description": "Other patches that this patch conflicts with."
          }, 
          "nodes": {
            "items": "integer", 
            "type": "array", 
            "description": "The nodes that this patch is installed on."
          }, 
          "id": {
            "type": "string", 
            "description": "A unique identifier for the patch."
          }, 
          "name": {
            "type": "string", 
            "description": "The name of the patch."
          }
        }
      }, 
      "type": "array"
    }, 
    "resume": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options)."
    }
  }
}

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

Method POST: Install a patch.

        URL: POST /platform/<<version=3>>/upgrade/cluster/patch/patches

Query arguments:
 rolling=<boolean> Whether to install the patch on one node at a time. Defaults
                   to true.
override=<boolean> Whether to ignore patch system validation and force the
                   installation.

Required POST request body fields:
patch

POST request body schema:
{
  "type": "object", 
  "description": "A software patch that can be applied to OneFS.", 
  "properties": {
    "location": {
      "type": "string", 
      "description": "The path location of the patch file."
    }, 
    "patch": {
      "required": true, 
      "type": "string", 
      "description": "The name or path of the patch to install."
    }
  }
}

POST response body schema:
{
  "type": "object", 
  "properties": {
    "id": {
      "required": true, 
      "type": "string", 
      "description": "ID of created item that can be used to refer to item in the collection-item resource path."
    }
  }
}
