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:
parent
6761ee21cc
commit
fa94c63b4f
1 changed files with 6 additions and 1 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue