2020-03-18 17:24:33 +08:00
|
|
|
/*
|
|
|
|
|
* v1_node_status.h
|
|
|
|
|
*
|
|
|
|
|
* NodeStatus is information about the current status of a node.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _v1_node_status_H_
|
|
|
|
|
#define _v1_node_status_H_
|
|
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include "../external/cJSON.h"
|
|
|
|
|
#include "../include/list.h"
|
|
|
|
|
#include "../include/keyValuePair.h"
|
2020-06-20 09:41:15 +08:00
|
|
|
#include "../include/binary.h"
|
|
|
|
|
|
|
|
|
|
typedef struct v1_node_status_t v1_node_status_t;
|
|
|
|
|
|
2020-03-18 17:24:33 +08:00
|
|
|
#include "v1_attached_volume.h"
|
|
|
|
|
#include "v1_container_image.h"
|
|
|
|
|
#include "v1_node_address.h"
|
|
|
|
|
#include "v1_node_condition.h"
|
|
|
|
|
#include "v1_node_config_status.h"
|
|
|
|
|
#include "v1_node_daemon_endpoints.h"
|
2024-10-12 03:18:38 +00:00
|
|
|
#include "v1_node_features.h"
|
2024-05-18 13:20:54 +00:00
|
|
|
#include "v1_node_runtime_handler.h"
|
2020-03-18 17:24:33 +08:00
|
|
|
#include "v1_node_system_info.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct v1_node_status_t {
|
|
|
|
|
list_t *addresses; //nonprimitive container
|
|
|
|
|
list_t* allocatable; //map
|
|
|
|
|
list_t* capacity; //map
|
|
|
|
|
list_t *conditions; //nonprimitive container
|
|
|
|
|
struct v1_node_config_status_t *config; //model
|
|
|
|
|
struct v1_node_daemon_endpoints_t *daemon_endpoints; //model
|
2024-10-12 03:18:38 +00:00
|
|
|
struct v1_node_features_t *features; //model
|
2020-03-18 17:24:33 +08:00
|
|
|
list_t *images; //nonprimitive container
|
|
|
|
|
struct v1_node_system_info_t *node_info; //model
|
2022-06-05 18:16:17 +00:00
|
|
|
char *phase; // string
|
2024-05-18 13:20:54 +00:00
|
|
|
list_t *runtime_handlers; //nonprimitive container
|
2020-03-18 17:24:33 +08:00
|
|
|
list_t *volumes_attached; //nonprimitive container
|
|
|
|
|
list_t *volumes_in_use; //primitive container
|
|
|
|
|
|
2025-02-11 19:36:46 +00:00
|
|
|
int _library_owned; // Is the library responsible for freeing this object?
|
2020-03-18 17:24:33 +08:00
|
|
|
} v1_node_status_t;
|
|
|
|
|
|
2025-02-11 19:36:46 +00:00
|
|
|
__attribute__((deprecated)) v1_node_status_t *v1_node_status_create(
|
2020-03-18 17:24:33 +08:00
|
|
|
list_t *addresses,
|
|
|
|
|
list_t* allocatable,
|
|
|
|
|
list_t* capacity,
|
|
|
|
|
list_t *conditions,
|
|
|
|
|
v1_node_config_status_t *config,
|
|
|
|
|
v1_node_daemon_endpoints_t *daemon_endpoints,
|
2024-10-12 03:18:38 +00:00
|
|
|
v1_node_features_t *features,
|
2020-03-18 17:24:33 +08:00
|
|
|
list_t *images,
|
|
|
|
|
v1_node_system_info_t *node_info,
|
2022-06-05 18:16:17 +00:00
|
|
|
char *phase,
|
2024-05-18 13:20:54 +00:00
|
|
|
list_t *runtime_handlers,
|
2020-03-18 17:24:33 +08:00
|
|
|
list_t *volumes_attached,
|
|
|
|
|
list_t *volumes_in_use
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
void v1_node_status_free(v1_node_status_t *v1_node_status);
|
|
|
|
|
|
|
|
|
|
v1_node_status_t *v1_node_status_parseFromJSON(cJSON *v1_node_statusJSON);
|
|
|
|
|
|
|
|
|
|
cJSON *v1_node_status_convertToJSON(v1_node_status_t *v1_node_status);
|
|
|
|
|
|
|
|
|
|
#endif /* _v1_node_status_H_ */
|
|
|
|
|
|