Files
sysadm/tests/api-test.sh
Kris Moore 97e8af86cf New API call for lifepreserver. This one lists the replication
targets on a system

While here, update api-test.sh to save response to /tmp/api-response, so we dont
need to always cut-n-paste

REST Request:
-------------------------------
PUT /sysadm/lifepreserver
{
   "action" : "listreplication"
}

REST Response:
-------------------------------
{
    "args": {
        "listreplication": {
            "tank1->192.168.0.9": {
                "dataset": "tank1",
                "frequency": "22",
                "host": "192.168.0.9",
                "port": "22",
                "rdset": "tank/backups",
                "user": "backups"
            }
        }
    }
}

WebSocket Request:
-------------------------------
{
   "namespace" : "sysadm",
   "args" : {
      "action" : "listreplication"
   },
   "id" : "fooid",
   "name" : "lifepreserver"
}

WebSocket Response:
-------------------------------
{
  "args": {
    "listreplication": {
      "tank1->192.168.0.9": {
        "dataset": "tank1",
        "frequency": "22",
        "host": "192.168.0.9",
        "port": "22",
        "rdset": "tank/backups",
        "user": "backups"
      }
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-01-15 10:40:03 -05:00

2.7 KiB
Executable File