1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

api: return node UUIDs for 'nodes' action

This commit is contained in:
Steffen Vogel 2019-10-30 02:39:25 +01:00 committed by Steffen Vogel
parent 6761ee21cc
commit fa94c63b4f

View file

@ -21,6 +21,7 @@
*********************************************************************************/
#include <jansson.h>
#include <uuid/uuid.h>
#include <villas/super_node.hpp>
#include <villas/node.h>
@ -47,8 +48,12 @@ public:
for (size_t i = 0; i < vlist_length(nodes); i++) {
struct node *n = (struct node *) vlist_at(nodes, i);
json_t *json_node = json_pack("{ s: s, s: s, s: i, s: { s: i }, s: { s: i } }",
char uuid[37];
uuid_unparse(n->uuid, uuid);
json_t *json_node = json_pack("{ s: s, s: s, s: s, s: i, s: { s: i }, s: { s: i } }",
"name", node_name_short(n),
"uuid", uuid,
"state", state_print(n->state),
"affinity", n->affinity,
"in",