summaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2020-06-25 11:21:00 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-06-26 14:36:22 +0200
commitc0f5d2c2068968822c2d1d397bf84447ae2e5642 (patch)
tree6ae065aadd107e97413238104bbd7a0ee9da5344 /sources
parentf6f1f18bd8ccb42a5cfb6531cd627e07cbb212f0 (diff)
#980 Add Virtual status
Since version 1.2.0, OpenGnsys supports ogVDI hypervisor OS. This commit a new status which indicates that clients are running ogVDI.
Diffstat (limited to 'sources')
-rw-r--r--sources/client.c2
-rw-r--r--sources/rest.c2
-rw-r--r--sources/rest.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/sources/client.c b/sources/client.c
index c93c74a..60a84cb 100644
--- a/sources/client.c
+++ b/sources/client.c
@@ -105,6 +105,8 @@ static int og_resp_probe(struct og_client *cli, json_t *data)
cli->status = OG_CLIENT_STATUS_BUSY;
else if (!strcmp(status, "OPG"))
cli->status = OG_CLIENT_STATUS_OGLIVE;
+ else if (!strcmp(status, "VDI"))
+ cli->status = OG_CLIENT_STATUS_VIRTUAL;
return status ? 0 : -1;
}
diff --git a/sources/rest.c b/sources/rest.c
index 35f3e03..b39e35a 100644
--- a/sources/rest.c
+++ b/sources/rest.c
@@ -146,6 +146,8 @@ static const char *og_client_status(const struct og_client *cli)
return "BSY";
case OG_CLIENT_STATUS_OGLIVE:
return "OPG";
+ case OG_CLIENT_STATUS_VIRTUAL:
+ return "VDI";
default:
return "OFF";
}
diff --git a/sources/rest.h b/sources/rest.h
index c8d3b68..c0c26d5 100644
--- a/sources/rest.h
+++ b/sources/rest.h
@@ -14,6 +14,7 @@ enum og_client_state {
enum og_client_status {
OG_CLIENT_STATUS_OGLIVE,
OG_CLIENT_STATUS_BUSY,
+ OG_CLIENT_STATUS_VIRTUAL,
};
enum og_cmd_type {