Fixed a bug where a response was not being returned on the mountbe API call. Updated example below.

REST Request:
-------------------------------
PUT /sysadm/beadm
{
   "action" : "mountbe",
   "be" : "green",
   "mountpoint" : "/tmp/mountdir"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "name" : "beadm",
   "args" : {
      "action" : "mountbe",
      "be" : "green",
      "mountpoint" : "/tmp/mountdir"
   },
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "mountbe": {
      "be": "green",
      "mountpoint": "/tmp/mountdir"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
This commit is contained in:
JoshDW19
2016-02-11 13:14:16 -05:00
parent cb64b84ed0
commit a95927e28d

View File

@@ -201,8 +201,8 @@ QJsonObject BEADM::listBEs() {
retObject.insert("error", output.at(i));
return retObject;
}
if ( output.at(i).indexOf("Mounted successfully")) {
retObject.insert("mountpoint", output.at(i).section("'",1,1));
if ( output.at(i).indexOf("Mounted successfully") != -1) {
retObject.insert("mountpoint", output.at(i).section("\'",1,1));
}
}
retObject.insert("be", be);