1. 03 5月, 2016 3 次提交
    • E
      admin: Introduce virAdmClient client-side object · 324945d9
      Erik Skultety 提交于
      Besides ID, the object also stores static data like connection transport and
      connection timestamp, since once obtained a list of all clients connected to a
      server, from user's perspective, it would be nice to know whether a given
      client is remote or local only and when did it connect to the daemon.
      Along with the object introduction, all necessary client-side methods necessary
      to work with the object are added as well.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      324945d9
    • E
      rpc: virnetserverclient: Introduce new attribute conn_time to client · a32135b3
      Erik Skultety 提交于
      Besides ID, libvirt should provide several parameters to help the user
      distinguish two clients from each other. One of them is the connection
      timestamp. This patch also adds a testcase for proper JSON formatting of the
      new attribute too (proper formatting of older clients that did not support
      this attribute yet is included in the existing tests) - in order to
      testGenerateJSON to work, a mock of time_t time(time_t *timer) needed to be
      created.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      a32135b3
    • E
      rpc: virnetserverclient: Identify clients by an integer ID · 5841d64d
      Erik Skultety 提交于
      Admin API needs a way of addressing specific clients. Unlike servers, which we
      are happy to address by names both because its name reflects its purpose (to
      some extent) and we only have two of them (so far), naming clients doesn't make
      any sense, since a) each client is an anonymous, i.e. not recognized after a
      disconnect followed by a reconnect, b) we can't predict what kind of requests
      it's going to send to daemon, and c) the are loads of them comming and going,
      so the only viable option is to use an ID which is of a reasonably wide data
      type.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      5841d64d
  2. 02 5月, 2016 37 次提交