Re: [PATCH 2/5] list: Implement RPC calls for virConnectListAllSecrets

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

 



On 09/14/12 10:38, Osier Yang wrote:
The RPC generator doesn't support returning list of object yet, this patch
do the work manually.

s/do/does/


   * daemon/remote.c:
     Implemente the server side handler remoteDispatchConnectListAllSecrets.

s/Implemente/Implement/


   * src/remote/remote_driver.c:
     Add remote driver handler remoteConnectListAllSecrets.

   * src/remote/remote_protocol.x:
     New RPC procedure REMOTE_PROC_CONNECT_LIST_ALL_SECRETS and
     structs to represent the args and ret for it.

   * src/remote_protocol-structs: Likewise.
---
  daemon/remote.c              |   54 +++++++++++++++++++++++++++++++++++
  src/remote/remote_driver.c   |   64 ++++++++++++++++++++++++++++++++++++++++++
  src/remote/remote_protocol.x |   13 ++++++++-
  src/remote_protocol-structs  |   12 ++++++++
  4 files changed, 142 insertions(+), 1 deletions(-)


...

diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 46269c8..1fc7f25 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -2619,6 +2619,16 @@ struct remote_connect_list_all_nwfilters_ret {
      unsigned int ret;
  };

+struct remote_connect_list_all_secrets_args {
+    int need_results;
+    unsigned int flags;
+};
+
+struct remote_connect_list_all_secrets_ret {
+    remote_nonnull_secret secrets<>;
+    unsigned int ret;
+};
+
  /*----- Protocol. -----*/

  /* Define the program number, protocol version and procedure numbers here. */
@@ -2955,7 +2965,8 @@ enum remote_procedure {
      REMOTE_PROC_CONNECT_LIST_ALL_NETWORKS = 283, /* skipgen skipgen priority:high */
      REMOTE_PROC_CONNECT_LIST_ALL_INTERFACES = 284, /* skipgen skipgen priority:high */
      REMOTE_PROC_CONNECT_LIST_ALL_NODE_DEVICES = 285, /* skipgen skipgen priority:high */
-    REMOTE_PROC_CONNECT_LIST_ALL_NWFILTERS = 286 /* skipgen skipgen priority:high */
+    REMOTE_PROC_CONNECT_LIST_ALL_NWFILTERS = 286, /* skipgen skipgen priority:high */
+    REMOTE_PROC_CONNECT_LIST_ALL_SECRETS = 287 /* skipgen skipgen priority:high */

      /*
       * Notice how the entries are grouped in sets of 10 ?
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index a465cf3..86416ad 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -2078,6 +2078,17 @@ struct remote_connect_list_all_nwfilters_ret {
          } filters;
          u_int                      ret;
  };
+struct remote_list_all_secrets_args {
+        int                        need_results;
+        u_int                      flags;
+};
+struct remote_list_all_secrets_ret {
+        struct {
+                u_int              secrets_len;
+                remote_nonnull_network * secrets_val;

I think I raised this in the last version too. This should be remote_nonnull_secret instead of remote_nonnull_network.

+        } secrets;
+        u_int                      ret;
+};
  enum remote_procedure {
          REMOTE_PROC_OPEN = 1,
          REMOTE_PROC_CLOSE = 2,
@@ -2365,4 +2376,5 @@ enum remote_procedure {
          REMOTE_PROC_CONNECT_LIST_ALL_INTERFACES = 284,
          REMOTE_PROC_CONNECT_LIST_ALL_NODE_DEVICES = 285,
          REMOTE_PROC_CONNECT_LIST_ALL_NWFILTERS = 286,
+        REMOTE_PROC_CONNECT_LIST_ALL_SECRETS = 287,
  };


ACK if you fix the commit message and change the struct type in src/remote_protocol-structs.

Peter



--
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]