1. 03 5月, 2016 6 次提交
    • E
      include: admin: export connection transport constants · 15500e92
      Erik Skultety 提交于
      We have to expose some constants, in order for the client object transport
      field to make sense.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      15500e92
    • E
      rpc: virnetserver: Support retrieval of a list of clients · 04bab54d
      Erik Skultety 提交于
      For now, the list copy is done simply by locking the whole server, walking the
      original and increasing the refcount on each object. We may want to change
      the list to a lockable object (like list of domains) later in the future if
      we discover some performance issues related to locking the whole server in
      order to walk the whole list of clients, possibly issuing some 'ForEach'
      callback.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      04bab54d
    • E
      rpc: gendispatch: Tune it to support client structure · 4bd43074
      Erik Skultety 提交于
      Now that libvirt-admin supports another client-side object and provided that
      we want to generate as many both client-side and server-side RPC dispatchers,
      support for this needs to be added to gendispatch.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      4bd43074
    • 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 34 次提交