mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 10:20:26 +00:00
Add ip4 to iocage's listjails sysadm API call
REST Request:
-------------------------------
PUT /sysadm/iocage
{
"action" : "listjails"
}
REST Response:
-------------------------------
{
"args": {
"listjails": {
"0bf985de-ca0f-11e5-8d45-d05099728dbf": {
"boot": "off",
"ip4": "-",
"jid": "-",
"state": "down",
"tag": "test",
"type": "basejail"
}
}
}
}
WebSocket Request:
-------------------------------
{
"name" : "iocage",
"id" : "fooid",
"args" : {
"action" : "listjails"
},
"namespace" : "sysadm"
}
WebSocket Response:
-------------------------------
{
"args": {
"listjails": {
"0bf985de-ca0f-11e5-8d45-d05099728dbf": {
"boot": "off",
"ip4": "-",
"jid": "-",
"state": "down",
"tag": "test",
"type": "basejail"
}
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "sysadm-iocage.h"
|
||||
#include "sysadm-global.h"
|
||||
|
||||
|
||||
using namespace sysadm;
|
||||
|
||||
//PLEASE: Keep the functions in the same order as listed in pcbsd-general.h
|
||||
@@ -93,9 +94,10 @@ QJsonObject Iocage::listJails() {
|
||||
jail.insert("state", line.section(" ", 3, 3));
|
||||
jail.insert("tag", line.section(" ", 4, 4));
|
||||
jail.insert("type", line.section(" ", 5, 5));
|
||||
jail.insert("ip4", line.section(" ", 6, 6));
|
||||
|
||||
retObject.insert(uuid, jail);
|
||||
}
|
||||
|
||||
return retObject;
|
||||
return retObject;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user