[libvirt] [PATCH 04/20] Secret manipulation step 4: Wire protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changes since the second submission:
- Update for the changed public API
- s/secret_id/uuid/g
---
 qemud/remote_dispatch_args.h       |    7 ++
 qemud/remote_dispatch_prototypes.h |   56 +++++++++++++++
 qemud/remote_dispatch_ret.h        |    6 ++
 qemud/remote_dispatch_table.h      |   40 +++++++++++
 qemud/remote_protocol.c            |  132 ++++++++++++++++++++++++++++++++++++
 qemud/remote_protocol.h            |  118 ++++++++++++++++++++++++++++++++
 qemud/remote_protocol.x            |   79 +++++++++++++++++++++-
 7 files changed, 437 insertions(+), 1 deletions(-)

diff --git a/qemud/remote_dispatch_args.h b/qemud/remote_dispatch_args.h
index 9dacfb8..dcf7ddf 100644
--- a/qemud/remote_dispatch_args.h
+++ b/qemud/remote_dispatch_args.h
@@ -117,3 +117,10 @@
     remote_domain_xml_from_native_args val_remote_domain_xml_from_native_args;
     remote_domain_xml_to_native_args val_remote_domain_xml_to_native_args;
     remote_list_defined_interfaces_args val_remote_list_defined_interfaces_args;
+    remote_list_secrets_args val_remote_list_secrets_args;
+    remote_secret_lookup_by_uuid_string_args val_remote_secret_lookup_by_uuid_string_args;
+    remote_secret_define_xml_args val_remote_secret_define_xml_args;
+    remote_secret_get_xml_desc_args val_remote_secret_get_xml_desc_args;
+    remote_secret_set_value_args val_remote_secret_set_value_args;
+    remote_secret_get_value_args val_remote_secret_get_value_args;
+    remote_secret_undefine_args val_remote_secret_undefine_args;
diff --git a/qemud/remote_dispatch_prototypes.h b/qemud/remote_dispatch_prototypes.h
index d9f6aad..647f5bb 100644
--- a/qemud/remote_dispatch_prototypes.h
+++ b/qemud/remote_dispatch_prototypes.h
@@ -513,6 +513,13 @@ static int remoteDispatchListNetworks(
     remote_error *err,
     remote_list_networks_args *args,
     remote_list_networks_ret *ret);
+static int remoteDispatchListSecrets(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_error *err,
+    remote_list_secrets_args *args,
+    remote_list_secrets_ret *ret);
 static int remoteDispatchListStoragePools(
     struct qemud_server *server,
     struct qemud_client *client,
@@ -758,6 +765,13 @@ static int remoteDispatchNumOfNetworks(
     remote_error *err,
     void *args,
     remote_num_of_networks_ret *ret);
+static int remoteDispatchNumOfSecrets(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_error *err,
+    void *args,
+    remote_num_of_secrets_ret *ret);
 static int remoteDispatchNumOfStoragePools(
     struct qemud_server *server,
     struct qemud_client *client,
@@ -772,6 +786,48 @@ static int remoteDispatchOpen(
     remote_error *err,
     remote_open_args *args,
     void *ret);
+static int remoteDispatchSecretDefineXml(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_error *err,
+    remote_secret_define_xml_args *args,
+    remote_secret_define_xml_ret *ret);
+static int remoteDispatchSecretGetValue(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_error *err,
+    remote_secret_get_value_args *args,
+    remote_secret_get_value_ret *ret);
+static int remoteDispatchSecretGetXmlDesc(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_error *err,
+    remote_secret_get_xml_desc_args *args,
+    remote_secret_get_xml_desc_ret *ret);
+static int remoteDispatchSecretLookupByUuidString(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_error *err,
+    remote_secret_lookup_by_uuid_string_args *args,
+    remote_secret_lookup_by_uuid_string_ret *ret);
+static int remoteDispatchSecretSetValue(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_error *err,
+    remote_secret_set_value_args *args,
+    void *ret);
+static int remoteDispatchSecretUndefine(
+    struct qemud_server *server,
+    struct qemud_client *client,
+    virConnectPtr conn,
+    remote_error *err,
+    remote_secret_undefine_args *args,
+    void *ret);
 static int remoteDispatchStoragePoolBuild(
     struct qemud_server *server,
     struct qemud_client *client,
diff --git a/qemud/remote_dispatch_ret.h b/qemud/remote_dispatch_ret.h
index 5376960..9d74a27 100644
--- a/qemud/remote_dispatch_ret.h
+++ b/qemud/remote_dispatch_ret.h
@@ -99,3 +99,9 @@
     remote_domain_xml_to_native_ret val_remote_domain_xml_to_native_ret;
     remote_num_of_defined_interfaces_ret val_remote_num_of_defined_interfaces_ret;
     remote_list_defined_interfaces_ret val_remote_list_defined_interfaces_ret;
+    remote_num_of_secrets_ret val_remote_num_of_secrets_ret;
+    remote_list_secrets_ret val_remote_list_secrets_ret;
+    remote_secret_lookup_by_uuid_string_ret val_remote_secret_lookup_by_uuid_string_ret;
+    remote_secret_define_xml_ret val_remote_secret_define_xml_ret;
+    remote_secret_get_xml_desc_ret val_remote_secret_get_xml_desc_ret;
+    remote_secret_get_value_ret val_remote_secret_get_value_ret;
diff --git a/qemud/remote_dispatch_table.h b/qemud/remote_dispatch_table.h
index 449786d..02d7bb5 100644
--- a/qemud/remote_dispatch_table.h
+++ b/qemud/remote_dispatch_table.h
@@ -697,3 +697,43 @@
     .args_filter = (xdrproc_t) xdr_remote_list_defined_interfaces_args,
     .ret_filter = (xdrproc_t) xdr_remote_list_defined_interfaces_ret,
 },
+{   /* NumOfSecrets => 139 */
+    .fn = (dispatch_fn) remoteDispatchNumOfSecrets,
+    .args_filter = (xdrproc_t) xdr_void,
+    .ret_filter = (xdrproc_t) xdr_remote_num_of_secrets_ret,
+},
+{   /* ListSecrets => 140 */
+    .fn = (dispatch_fn) remoteDispatchListSecrets,
+    .args_filter = (xdrproc_t) xdr_remote_list_secrets_args,
+    .ret_filter = (xdrproc_t) xdr_remote_list_secrets_ret,
+},
+{   /* SecretLookupByUuidString => 141 */
+    .fn = (dispatch_fn) remoteDispatchSecretLookupByUuidString,
+    .args_filter = (xdrproc_t) xdr_remote_secret_lookup_by_uuid_string_args,
+    .ret_filter = (xdrproc_t) xdr_remote_secret_lookup_by_uuid_string_ret,
+},
+{   /* SecretDefineXml => 142 */
+    .fn = (dispatch_fn) remoteDispatchSecretDefineXml,
+    .args_filter = (xdrproc_t) xdr_remote_secret_define_xml_args,
+    .ret_filter = (xdrproc_t) xdr_remote_secret_define_xml_ret,
+},
+{   /* SecretGetXmlDesc => 143 */
+    .fn = (dispatch_fn) remoteDispatchSecretGetXmlDesc,
+    .args_filter = (xdrproc_t) xdr_remote_secret_get_xml_desc_args,
+    .ret_filter = (xdrproc_t) xdr_remote_secret_get_xml_desc_ret,
+},
+{   /* SecretSetValue => 144 */
+    .fn = (dispatch_fn) remoteDispatchSecretSetValue,
+    .args_filter = (xdrproc_t) xdr_remote_secret_set_value_args,
+    .ret_filter = (xdrproc_t) xdr_void,
+},
+{   /* SecretGetValue => 145 */
+    .fn = (dispatch_fn) remoteDispatchSecretGetValue,
+    .args_filter = (xdrproc_t) xdr_remote_secret_get_value_args,
+    .ret_filter = (xdrproc_t) xdr_remote_secret_get_value_ret,
+},
+{   /* SecretUndefine => 146 */
+    .fn = (dispatch_fn) remoteDispatchSecretUndefine,
+    .args_filter = (xdrproc_t) xdr_remote_secret_undefine_args,
+    .ret_filter = (xdrproc_t) xdr_void,
+},
diff --git a/qemud/remote_protocol.c b/qemud/remote_protocol.c
index 7b46096..fe7e1e9 100644
--- a/qemud/remote_protocol.c
+++ b/qemud/remote_protocol.c
@@ -104,6 +104,15 @@ xdr_remote_nonnull_node_device (XDR *xdrs, remote_nonnull_node_device *objp)
 }
 
 bool_t
+xdr_remote_nonnull_secret (XDR *xdrs, remote_nonnull_secret *objp)
+{
+
+         if (!xdr_remote_nonnull_string (xdrs, &objp->uuid))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
 xdr_remote_domain (XDR *xdrs, remote_domain *objp)
 {
 
@@ -2534,6 +2543,129 @@ xdr_remote_domain_xml_to_native_ret (XDR *xdrs, remote_domain_xml_to_native_ret
 }
 
 bool_t
+xdr_remote_num_of_secrets_ret (XDR *xdrs, remote_num_of_secrets_ret *objp)
+{
+
+         if (!xdr_int (xdrs, &objp->num))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_list_secrets_args (XDR *xdrs, remote_list_secrets_args *objp)
+{
+
+         if (!xdr_int (xdrs, &objp->maxuuids))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_list_secrets_ret (XDR *xdrs, remote_list_secrets_ret *objp)
+{
+        char **objp_cpp0 = (char **) (void *) &objp->uuids.uuids_val;
+
+         if (!xdr_array (xdrs, objp_cpp0, (u_int *) &objp->uuids.uuids_len, REMOTE_SECRET_UUID_LIST_MAX,
+                sizeof (remote_nonnull_string), (xdrproc_t) xdr_remote_nonnull_string))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_secret_lookup_by_uuid_string_args (XDR *xdrs, remote_secret_lookup_by_uuid_string_args *objp)
+{
+
+         if (!xdr_remote_nonnull_string (xdrs, &objp->uuid))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_secret_lookup_by_uuid_string_ret (XDR *xdrs, remote_secret_lookup_by_uuid_string_ret *objp)
+{
+
+         if (!xdr_remote_nonnull_secret (xdrs, &objp->secret))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_secret_define_xml_args (XDR *xdrs, remote_secret_define_xml_args *objp)
+{
+
+         if (!xdr_remote_nonnull_string (xdrs, &objp->xml))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_secret_define_xml_ret (XDR *xdrs, remote_secret_define_xml_ret *objp)
+{
+
+         if (!xdr_remote_nonnull_secret (xdrs, &objp->secret))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_secret_get_xml_desc_args (XDR *xdrs, remote_secret_get_xml_desc_args *objp)
+{
+
+         if (!xdr_remote_nonnull_secret (xdrs, &objp->secret))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_secret_get_xml_desc_ret (XDR *xdrs, remote_secret_get_xml_desc_ret *objp)
+{
+
+         if (!xdr_remote_nonnull_string (xdrs, &objp->xml))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_secret_set_value_args (XDR *xdrs, remote_secret_set_value_args *objp)
+{
+        char **objp_cpp0 = (char **) (void *) &objp->value.value_val;
+
+         if (!xdr_remote_nonnull_secret (xdrs, &objp->secret))
+                 return FALSE;
+         if (!xdr_bytes (xdrs, objp_cpp0, (u_int *) &objp->value.value_len, REMOTE_SECRET_VALUE_MAX))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_secret_get_value_args (XDR *xdrs, remote_secret_get_value_args *objp)
+{
+
+         if (!xdr_remote_nonnull_secret (xdrs, &objp->secret))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_secret_get_value_ret (XDR *xdrs, remote_secret_get_value_ret *objp)
+{
+        char **objp_cpp0 = (char **) (void *) &objp->value.value_val;
+
+         if (!xdr_bytes (xdrs, objp_cpp0, (u_int *) &objp->value.value_len, REMOTE_SECRET_VALUE_MAX))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
+xdr_remote_secret_undefine_args (XDR *xdrs, remote_secret_undefine_args *objp)
+{
+
+         if (!xdr_remote_nonnull_secret (xdrs, &objp->secret))
+                 return FALSE;
+        return TRUE;
+}
+
+bool_t
 xdr_remote_procedure (XDR *xdrs, remote_procedure *objp)
 {
 
diff --git a/qemud/remote_protocol.h b/qemud/remote_protocol.h
index 2e5bc81..d15a01e 100644
--- a/qemud/remote_protocol.h
+++ b/qemud/remote_protocol.h
@@ -43,6 +43,8 @@ typedef remote_nonnull_string *remote_string;
 #define REMOTE_SECURITY_MODEL_MAX VIR_SECURITY_MODEL_BUFLEN
 #define REMOTE_SECURITY_LABEL_MAX VIR_SECURITY_LABEL_BUFLEN
 #define REMOTE_SECURITY_DOI_MAX VIR_SECURITY_DOI_BUFLEN
+#define REMOTE_SECRET_VALUE_MAX 65536
+#define REMOTE_SECRET_UUID_LIST_MAX 16384
 
 typedef char remote_uuid[VIR_UUID_BUFLEN];
 
@@ -83,6 +85,11 @@ struct remote_nonnull_node_device {
 };
 typedef struct remote_nonnull_node_device remote_nonnull_node_device;
 
+struct remote_nonnull_secret {
+        remote_nonnull_string uuid;
+};
+typedef struct remote_nonnull_secret remote_nonnull_secret;
+
 typedef remote_nonnull_domain *remote_domain;
 
 typedef remote_nonnull_network *remote_network;
@@ -1427,6 +1434,81 @@ struct remote_domain_xml_to_native_ret {
         remote_nonnull_string nativeConfig;
 };
 typedef struct remote_domain_xml_to_native_ret remote_domain_xml_to_native_ret;
+
+struct remote_num_of_secrets_ret {
+        int num;
+};
+typedef struct remote_num_of_secrets_ret remote_num_of_secrets_ret;
+
+struct remote_list_secrets_args {
+        int maxuuids;
+};
+typedef struct remote_list_secrets_args remote_list_secrets_args;
+
+struct remote_list_secrets_ret {
+        struct {
+                u_int uuids_len;
+                remote_nonnull_string *uuids_val;
+        } uuids;
+};
+typedef struct remote_list_secrets_ret remote_list_secrets_ret;
+
+struct remote_secret_lookup_by_uuid_string_args {
+        remote_nonnull_string uuid;
+};
+typedef struct remote_secret_lookup_by_uuid_string_args remote_secret_lookup_by_uuid_string_args;
+
+struct remote_secret_lookup_by_uuid_string_ret {
+        remote_nonnull_secret secret;
+};
+typedef struct remote_secret_lookup_by_uuid_string_ret remote_secret_lookup_by_uuid_string_ret;
+
+struct remote_secret_define_xml_args {
+        remote_nonnull_string xml;
+};
+typedef struct remote_secret_define_xml_args remote_secret_define_xml_args;
+
+struct remote_secret_define_xml_ret {
+        remote_nonnull_secret secret;
+};
+typedef struct remote_secret_define_xml_ret remote_secret_define_xml_ret;
+
+struct remote_secret_get_xml_desc_args {
+        remote_nonnull_secret secret;
+};
+typedef struct remote_secret_get_xml_desc_args remote_secret_get_xml_desc_args;
+
+struct remote_secret_get_xml_desc_ret {
+        remote_nonnull_string xml;
+};
+typedef struct remote_secret_get_xml_desc_ret remote_secret_get_xml_desc_ret;
+
+struct remote_secret_set_value_args {
+        remote_nonnull_secret secret;
+        struct {
+                u_int value_len;
+                char *value_val;
+        } value;
+};
+typedef struct remote_secret_set_value_args remote_secret_set_value_args;
+
+struct remote_secret_get_value_args {
+        remote_nonnull_secret secret;
+};
+typedef struct remote_secret_get_value_args remote_secret_get_value_args;
+
+struct remote_secret_get_value_ret {
+        struct {
+                u_int value_len;
+                char *value_val;
+        } value;
+};
+typedef struct remote_secret_get_value_ret remote_secret_get_value_ret;
+
+struct remote_secret_undefine_args {
+        remote_nonnull_secret secret;
+};
+typedef struct remote_secret_undefine_args remote_secret_undefine_args;
 #define REMOTE_PROGRAM 0x20008086
 #define REMOTE_PROTOCOL_VERSION 1
 
@@ -1569,6 +1651,14 @@ enum remote_procedure {
         REMOTE_PROC_DOMAIN_XML_TO_NATIVE = 136,
         REMOTE_PROC_NUM_OF_DEFINED_INTERFACES = 137,
         REMOTE_PROC_LIST_DEFINED_INTERFACES = 138,
+        REMOTE_PROC_NUM_OF_SECRETS = 139,
+        REMOTE_PROC_LIST_SECRETS = 140,
+        REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING = 141,
+        REMOTE_PROC_SECRET_DEFINE_XML = 142,
+        REMOTE_PROC_SECRET_GET_XML_DESC = 143,
+        REMOTE_PROC_SECRET_SET_VALUE = 144,
+        REMOTE_PROC_SECRET_GET_VALUE = 145,
+        REMOTE_PROC_SECRET_UNDEFINE = 146,
 };
 typedef enum remote_procedure remote_procedure;
 
@@ -1608,6 +1698,7 @@ extern  bool_t xdr_remote_nonnull_interface (XDR *, remote_nonnull_interface*);
 extern  bool_t xdr_remote_nonnull_storage_pool (XDR *, remote_nonnull_storage_pool*);
 extern  bool_t xdr_remote_nonnull_storage_vol (XDR *, remote_nonnull_storage_vol*);
 extern  bool_t xdr_remote_nonnull_node_device (XDR *, remote_nonnull_node_device*);
+extern  bool_t xdr_remote_nonnull_secret (XDR *, remote_nonnull_secret*);
 extern  bool_t xdr_remote_domain (XDR *, remote_domain*);
 extern  bool_t xdr_remote_network (XDR *, remote_network*);
 extern  bool_t xdr_remote_storage_pool (XDR *, remote_storage_pool*);
@@ -1831,6 +1922,19 @@ extern  bool_t xdr_remote_domain_xml_from_native_args (XDR *, remote_domain_xml_
 extern  bool_t xdr_remote_domain_xml_from_native_ret (XDR *, remote_domain_xml_from_native_ret*);
 extern  bool_t xdr_remote_domain_xml_to_native_args (XDR *, remote_domain_xml_to_native_args*);
 extern  bool_t xdr_remote_domain_xml_to_native_ret (XDR *, remote_domain_xml_to_native_ret*);
+extern  bool_t xdr_remote_num_of_secrets_ret (XDR *, remote_num_of_secrets_ret*);
+extern  bool_t xdr_remote_list_secrets_args (XDR *, remote_list_secrets_args*);
+extern  bool_t xdr_remote_list_secrets_ret (XDR *, remote_list_secrets_ret*);
+extern  bool_t xdr_remote_secret_lookup_by_uuid_string_args (XDR *, remote_secret_lookup_by_uuid_string_args*);
+extern  bool_t xdr_remote_secret_lookup_by_uuid_string_ret (XDR *, remote_secret_lookup_by_uuid_string_ret*);
+extern  bool_t xdr_remote_secret_define_xml_args (XDR *, remote_secret_define_xml_args*);
+extern  bool_t xdr_remote_secret_define_xml_ret (XDR *, remote_secret_define_xml_ret*);
+extern  bool_t xdr_remote_secret_get_xml_desc_args (XDR *, remote_secret_get_xml_desc_args*);
+extern  bool_t xdr_remote_secret_get_xml_desc_ret (XDR *, remote_secret_get_xml_desc_ret*);
+extern  bool_t xdr_remote_secret_set_value_args (XDR *, remote_secret_set_value_args*);
+extern  bool_t xdr_remote_secret_get_value_args (XDR *, remote_secret_get_value_args*);
+extern  bool_t xdr_remote_secret_get_value_ret (XDR *, remote_secret_get_value_ret*);
+extern  bool_t xdr_remote_secret_undefine_args (XDR *, remote_secret_undefine_args*);
 extern  bool_t xdr_remote_procedure (XDR *, remote_procedure*);
 extern  bool_t xdr_remote_message_type (XDR *, remote_message_type*);
 extern  bool_t xdr_remote_message_status (XDR *, remote_message_status*);
@@ -1846,6 +1950,7 @@ extern bool_t xdr_remote_nonnull_interface ();
 extern bool_t xdr_remote_nonnull_storage_pool ();
 extern bool_t xdr_remote_nonnull_storage_vol ();
 extern bool_t xdr_remote_nonnull_node_device ();
+extern bool_t xdr_remote_nonnull_secret ();
 extern bool_t xdr_remote_domain ();
 extern bool_t xdr_remote_network ();
 extern bool_t xdr_remote_storage_pool ();
@@ -2069,6 +2174,19 @@ extern bool_t xdr_remote_domain_xml_from_native_args ();
 extern bool_t xdr_remote_domain_xml_from_native_ret ();
 extern bool_t xdr_remote_domain_xml_to_native_args ();
 extern bool_t xdr_remote_domain_xml_to_native_ret ();
+extern bool_t xdr_remote_num_of_secrets_ret ();
+extern bool_t xdr_remote_list_secrets_args ();
+extern bool_t xdr_remote_list_secrets_ret ();
+extern bool_t xdr_remote_secret_lookup_by_uuid_string_args ();
+extern bool_t xdr_remote_secret_lookup_by_uuid_string_ret ();
+extern bool_t xdr_remote_secret_define_xml_args ();
+extern bool_t xdr_remote_secret_define_xml_ret ();
+extern bool_t xdr_remote_secret_get_xml_desc_args ();
+extern bool_t xdr_remote_secret_get_xml_desc_ret ();
+extern bool_t xdr_remote_secret_set_value_args ();
+extern bool_t xdr_remote_secret_get_value_args ();
+extern bool_t xdr_remote_secret_get_value_ret ();
+extern bool_t xdr_remote_secret_undefine_args ();
 extern bool_t xdr_remote_procedure ();
 extern bool_t xdr_remote_message_type ();
 extern bool_t xdr_remote_message_status ();
diff --git a/qemud/remote_protocol.x b/qemud/remote_protocol.x
index 8f9b6db..8f4b864 100644
--- a/qemud/remote_protocol.x
+++ b/qemud/remote_protocol.x
@@ -136,6 +136,16 @@ const REMOTE_SECURITY_LABEL_MAX = VIR_SECURITY_LABEL_BUFLEN;
  */
 const REMOTE_SECURITY_DOI_MAX = VIR_SECURITY_DOI_BUFLEN;
 
+/*
+ * Maximum size of a secret value.
+ */
+const REMOTE_SECRET_VALUE_MAX = 65536;
+
+/*
+ * Upper limit on list of secrets.
+ */
+const REMOTE_SECRET_UUID_LIST_MAX = 16384;
+
 /* UUID.  VIR_UUID_BUFLEN definition comes from libvirt.h */
 typedef opaque remote_uuid[VIR_UUID_BUFLEN];
 
@@ -176,6 +186,11 @@ struct remote_nonnull_node_device {
     remote_nonnull_string name;
 };
 
+/* A secret which may not be null. */
+struct remote_nonnull_secret {
+    remote_nonnull_string uuid;
+};
+
 /* A domain or network which may be NULL. */
 typedef remote_nonnull_domain *remote_domain;
 typedef remote_nonnull_network *remote_network;
@@ -1266,6 +1281,59 @@ struct remote_domain_xml_to_native_ret {
 };
 
 
+struct remote_num_of_secrets_ret {
+    int num;
+};
+
+struct remote_list_secrets_args {
+    int maxuuids;
+};
+
+struct remote_list_secrets_ret {
+    remote_nonnull_string uuids<REMOTE_SECRET_UUID_LIST_MAX>;
+};
+
+struct remote_secret_lookup_by_uuid_string_args {
+    remote_nonnull_string uuid;
+};
+
+struct remote_secret_lookup_by_uuid_string_ret {
+    remote_nonnull_secret secret;
+};
+
+struct remote_secret_define_xml_args {
+    remote_nonnull_string xml;
+};
+
+struct remote_secret_define_xml_ret {
+    remote_nonnull_secret secret;
+};
+
+struct remote_secret_get_xml_desc_args {
+    remote_nonnull_secret secret;
+};
+
+struct remote_secret_get_xml_desc_ret {
+    remote_nonnull_string xml;
+};
+
+struct remote_secret_set_value_args {
+    remote_nonnull_secret secret;
+    opaque value<REMOTE_SECRET_VALUE_MAX>;
+};
+
+struct remote_secret_get_value_args {
+    remote_nonnull_secret secret;
+};
+
+struct remote_secret_get_value_ret {
+    opaque value<REMOTE_SECRET_VALUE_MAX>;
+};
+
+struct remote_secret_undefine_args {
+    remote_nonnull_secret secret;
+};
+
 /*----- Protocol. -----*/
 
 /* Define the program number, protocol version and procedure numbers here. */
@@ -1424,7 +1492,16 @@ enum remote_procedure {
     REMOTE_PROC_DOMAIN_XML_TO_NATIVE = 136,
 
     REMOTE_PROC_NUM_OF_DEFINED_INTERFACES = 137,
-    REMOTE_PROC_LIST_DEFINED_INTERFACES = 138
+    REMOTE_PROC_LIST_DEFINED_INTERFACES = 138,
+
+    REMOTE_PROC_NUM_OF_SECRETS = 139,
+    REMOTE_PROC_LIST_SECRETS = 140,
+    REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING = 141,
+    REMOTE_PROC_SECRET_DEFINE_XML = 142,
+    REMOTE_PROC_SECRET_GET_XML_DESC = 143,
+    REMOTE_PROC_SECRET_SET_VALUE = 144,
+    REMOTE_PROC_SECRET_GET_VALUE = 145,
+    REMOTE_PROC_SECRET_UNDEFINE = 146
 };
 
 
-- 
1.6.2.5

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]