From c0f5d2c2068968822c2d1d397bf84447ae2e5642 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Thu, 25 Jun 2020 11:21:00 +0200 Subject: #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. --- sources/client.c | 2 ++ sources/rest.c | 2 ++ sources/rest.h | 1 + 3 files changed, 5 insertions(+) (limited to 'sources') 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 { -- cgit v1.2.3-18-g5258