1. 12 2月, 2013 1 次提交
    • O
      remote: Wire up the remote protocol · 39758e75
      Osier Yang 提交于
      Like virNodeDeviceCreateXML, virNodeDeviceLookupSCSIHostByWWN
      has to be treated specially when generating the RPC codes. Also
      new rules are added in fixup_name to keep the name SCSIHostByWWN.
      39758e75
  2. 05 1月, 2013 1 次提交
    • J
      api: Add API to tunnel a guest channel via stream · d52add46
      John Eckersberg 提交于
      This patch adds a new API, virDomainOpenChannel, that uses streams to
      connect to a virtio channel on a guest.  This creates a secure
      communication channel between a guest and a libvirt client.
      
      This behaves the same as virDomainOpenConsole, except on channels
      instead of console/serial/parallel devices.
      d52add46
  3. 29 11月, 2012 1 次提交
  4. 28 11月, 2012 1 次提交
  5. 02 11月, 2012 1 次提交
    • E
      cpumap: optimize for clients that don't need online count · 3d0130cb
      Eric Blake 提交于
      It turns out that calling virNodeGetCPUMap(conn, NULL, NULL, 0)
      is both useful, and with Viktor's patches, common enough to
      optimize.  Since this interface hasn't been released yet, we
      can change the RPC call.
      
      A bit more background on the optimization - learning the cpu count
      is a single file read (/sys/devices/system/cpu/possible), but
      learning the number of online cpus can possibly trigger a file
      read per cpu, depending on the age of the kernel, and all wasted
      if the caller passed NULL for both arguments.
      
      * src/nodeinfo.c (nodeGetCPUMap): Avoid bitmap when not needed.
      * src/remote/remote_protocol.x (remote_node_get_cpu_map_args):
      Supply two separate flags for needed arguments.
      * src/remote/remote_driver.c (remoteNodeGetCPUMap): Update
      caller.
      * daemon/remote.c (remoteDispatchNodeGetCPUMap): Likewise.
      * src/remote_protocol-structs: Regenerate.
      3d0130cb
  6. 24 10月, 2012 1 次提交
  7. 15 10月, 2012 1 次提交
    • M
      Add support for SUSPEND_DISK event · 7ba5defb
      Martin Kletzander 提交于
      This patch adds support for SUSPEND_DISK event; both lifecycle and
      separated.  The support is added for QEMU, machines are changed to
      PMSUSPENDED, but as QEMU sends SHUTDOWN afterwards, the state changes
      to shut-off.  This and much more needs to be done in order for libvirt
      to work with transient devices, wake-ups etc.  This patch is not
      aiming for that functionality.
      7ba5defb
  8. 21 9月, 2012 1 次提交
  9. 18 9月, 2012 2 次提交
    • L
      network: implement RPC calls for virNetworkUpdate · 7a99b0ab
      Laine Stump 提交于
      This is very short, because almost everything is autogenerated. All
      that's needed are:
      
      * src/remote/remote_driver.c: add pointer to autogenerated
          remoteNetworkUpdate to the function table for the remote
          network driver.
      
      * src/remote/remote_protocol.x: add the "args" struct and add one more
          item to the remote_procedure enum for this function.
      
      * src/remote_protocol-struct: update to match remote_protocol.x
      7a99b0ab
    • E
      blockjob: add blockcommit support to rpc · 85edb0c8
      Eric Blake 提交于
      Relatively straightforward.  Our decision to make block job
      speed a long keeps haunting us on new API.
      
      * src/remote/remote_protocol.x (remote_domain_block_commit_args):
      New struct.
      * src/remote/remote_driver.c (remote_driver): Enable it.
      * src/remote_protocol-structs: Regenerate.
      * src/rpc/gendispatch.pl (long_legacy): Exempt another bandwidth.
      85edb0c8
  10. 17 9月, 2012 4 次提交
    • O
      node_memory: Wire up the RPC protocol · 00792722
      Osier Yang 提交于
      * src/rpc/gendispatch.pl: (virNodeSetMemoryParameters is the
        the special one which needs a connection object as the first
        argument, improve the generator to support it).
      * daemon/remote.c: (Implement the server side handler for
        virDomainGetMemoryParameters)
      * src/remote/remote_driver.c: (Implement the client side handler
        for virDomainGetMemoryParameters)
      * src/remote/remote_protocol.x: (New RPC procedures for the two
        new APIs and structs to represent the args and ret for it)
      * src/remote_protocol-structs: Likewise
      00792722
    • O
      list: Implement RPC calls for virConnectListAllSecrets · 86737407
      Osier Yang 提交于
      The RPC generator doesn't support returning list of object yet, this patch
      does the work manually.
      
        * daemon/remote.c:
          Implement the server side handler remoteDispatchConnectListAllSecrets.
      
        * 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.
      86737407
    • O
      list: Implement RPC calls for virConnectListAllNWFilters · 3f47ff8b
      Osier Yang 提交于
      The RPC generator doesn't support returning list of object yet, this patch
      do the work manually.
      
        * daemon/remote.c:
          Implemente the server side handler remoteDispatchConnectListAllNWFilters.
      
        * src/remote/remote_driver.c:
          Add remote driver handler remoteConnectListAllNWFilters.
      
        * src/remote/remote_protocol.x:
          New RPC procedure REMOTE_PROC_CONNECT_LIST_ALL_NWFILTERS and
          structs to represent the args and ret for it.
      
        * src/remote_protocol-structs: Likewise.
      3f47ff8b
    • O
      list: Implement RPC calls for virConnectListAllNodeDevices · 4230b6c1
      Osier Yang 提交于
      The RPC generator doesn't support returning list of object yet, this patch
      does the work manually.
      
        * daemon/remote.c:
          Implemente the server side handler remoteDispatchConnectListAllNodeDevices.
      
        * src/remote/remote_driver.c:
          Add remote driver handler remoteConnectListAllNodeDevices.
      
        * src/remote/remote_protocol.x:
          New RPC procedure REMOTE_PROC_CONNECT_LIST_ALL_INTERFACES and
      4230b6c1
  11. 12 9月, 2012 1 次提交
    • O
      list: Implemente RPC calls for virConnectListAllInterfaces · 65741d84
      Osier Yang 提交于
      The RPC generator doesn't support returning list of object yet, this patch
      do the work manually.
      
        * daemon/remote.c:
          Implemente the server side handler remoteDispatchConnectListAllInterfaces.
      
        * src/remote/remote_driver.c:
          Add remote driver handler remoteConnectListAllInterfaces.
      
        * src/remote/remote_protocol.x:
          New RPC procedure REMOTE_PROC_CONNECT_LIST_ALL_INTERFACES and
          structs to represent the args and ret for it.
      
        * src/remote_protocol-structs: Likewise.
      65741d84
  12. 11 9月, 2012 1 次提交
    • O
      list: Implement RPC calls for virConnectListAllNetworks · eff8a8db
      Osier Yang 提交于
      The RPC generator doesn't support returning list of object, this patch
      do the work manually.
      
      * daemon/remote.c:
        Implemente the server side handler remoteDispatchConnectListAllNetworks.
      
      * src/remote/remote_driver.c:
        Add remote driver handler remoteConnectListAllNetworks.
      
      * src/remote/remote_protocol.x:
        New RPC procedure REMOTE_PROC_CONNECT_LIST_ALL_NETWORKS and
        structs to represent the args and ret for it.
      
      * src/remote_protocol-structs: Likewise.
      eff8a8db
  13. 10 9月, 2012 1 次提交
    • O
      list: Implement RPC calls for virStoragePoolListAllVolumes · a8bac1c0
      Osier Yang 提交于
      The RPC generator doesn't returning support list of object, this
      patch do the work manually.
      
        * daemon/remote.c:
          Implemente the server side handler remoteDispatchStoragePoolListAllVolumes
      
        * src/remote/remote_driver.c:
          Add remote driver handler remoteStoragePoolListAllVolumes
      
        * src/remote/remote_protocol.x:
          New RPC procedure REMOTE_PROC_STORAGE_POOL_LIST_ALL_VOLUMES and
          structs to represent the args and ret for it.
      
        * src/remote_protocol-structs: Likewise.
      a8bac1c0
  14. 06 9月, 2012 1 次提交
    • O
      list: Implement the RPC calls for virConnectListAllStoragePools · 17fd0088
      Osier Yang 提交于
      The RPC generator doesn't support returning list of object, this patch does
      the work manually.
      
        * daemon/remote.c:
          Implement the server side handler remoteDispatchConnectListAllStoragePools
      
        * src/remote/remote_driver.c:
          Add remote driver handler remoteConnectListAllStoragePools.
      
        * src/remote/remote_protocol.x:
          New RPC procedure REMOTE_PROC_CONNECT_LIST_ALL_STORAGE_POOLS and
          structs to represent the args and ret for it.
      
        * src/remote_protocol-structs: Likewise.
      17fd0088
  15. 22 8月, 2012 1 次提交
  16. 21 8月, 2012 1 次提交
  17. 27 7月, 2012 1 次提交
    • E
      maint: avoid regression on copyright listings · 3ad13c92
      Eric Blake 提交于
      Commit f9ce7dad tried to kill uses of a raw street address, but
      missed a few instances.  Automate things so we don't introduce
      new problems in the future.
      
      * cfg.mk (sc_copyright_address): New rule.
      (exclude_file_name_regexp--sc_copyright_address): Add exemption.
      * bootstrap.conf: Adjust offenders.
      * build-aux/augeas-gentest.pl: Likewise.
      * examples/systemtap/events.stp: Likewise.
      * examples/systemtap/qemu-monitor.stp: Likewise.
      * examples/systemtap/rpc-monitor.stp: Likewise.
      * src/dtrace2systemtap.pl: Likewise.
      * src/esx/esx_vi_generator.py: Likewise.
      * src/hyperv/hyperv_wmi_generator.py: Likewise.
      * src/remote/qemu_protocol.x: Likewise.
      * src/remote/remote_protocol.x: Likewise.
      * src/rpc/gensystemtap.pl: Likewise.
      * src/rpc/virnetprotocol.x: Likewise.
      * tests/object-locking.ml: Likewise.
      * tools/virt-xml-validate.in: Likewise.
      3ad13c92
  18. 21 7月, 2012 1 次提交
  19. 14 7月, 2012 1 次提交
    • D
      Define public API for receiving guest memory balloon events · 7ed6d7dd
      Daniel P. Berrange 提交于
      When the guest changes its memory balloon applications may want
      to know what the new value is, without having to periodically
      poll on XML / domain info. Introduce a "balloon change" event
      to let apps see this
      
      * include/libvirt/libvirt.h.in: Define the
        virConnectDomainEventBalloonChangeCallback callback
        and VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE constant
      * python/libvirt-override-virConnect.py,
        python/libvirt-override.c: Wire up helpers for new event
      * daemon/remote.c: Helper for serializing balloon event
      * examples/domain-events/events-c/event-test.c,
        examples/domain-events/events-python/event-test.py: Add
        example of balloon event usage
      * src/conf/domain_event.c, src/conf/domain_event.h: Handling
        of balloon events
      * src/remote/remote_driver.c: Add handler of balloon events
      * src/remote/remote_protocol.x: Define wire protocol for
        balloon events
      * src/remote_protocol-structs: Likewise.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      7ed6d7dd
  20. 20 6月, 2012 1 次提交
    • E
      list: provide RPC call for snapshots · dbb564f8
      Eric Blake 提交于
      The generator doesn't handle lists of virDomainSnapshotPtr, so
      this commit requires a bit more work than some RPC additions.
      
      * src/remote/remote_protocol.x
      (REMOTE_PROC_DOMAIN_LIST_ALL_SNAPSHOTS)
      (REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_ALL_CHILDREN): New RPC calls,
      with corresponding structs.
      * daemon/remote.c (remoteDispatchDomainListAllSnapshots)
      (remoteDispatchDomainSnapshotListAllChildren): New functions.
      * src/remote/remote_driver.c (remoteDomainListAllSnapshots)
      (remoteDomainSnapshotListAllChildren): Likewise.
      * src/remote_protocol-structs: Regenerate.
      dbb564f8
  21. 19 6月, 2012 1 次提交
    • P
      remote: implement remote protocol for virConnectListAllDomains() · 9c9de4e6
      Peter Krempa 提交于
      This patch wires up the RPC protocol handlers for
      virConnectListAllDomains(). The RPC generator has no support for the way
      how virConnectListAllDomains() returns the results so the handler code
      had to be done manually.
      
      The new api is handled by REMOTE_PROC_CONNECT_LIST_ALL_DOMAINS, with
      number 273 and marked with high priority.
      9c9de4e6
  22. 12 6月, 2012 1 次提交
    • E
      snapshot: RPC for new query APIs · a2bc4a0c
      Eric Blake 提交于
      Pretty straightforward.
      
      * src/remote/remote_protocol.x
      (remote_domain_snapshot_is_current_args)
      (remote_domain_snapshot_is_current_ret)
      (remote_domain_snapshot_has_metadata_args)
      (remote_domain_snapshot_has_metadata_ret): New structs.
      (REMOTE_PROC_DOMAIN_SNAPSHOT_IS_CURRENT)
      (REMOTE_PROC_DOMAIN_SNAPSHOT_HAS_METADATA): New RPC calls.
      * src/remote/remote_driver.c (remote_driver): Call them.
      * src/remote_protocol-structs: Regenerate.
      a2bc4a0c
  23. 05 6月, 2012 1 次提交
    • M
      rpc: Size up RPC limits · eb635de1
      Michal Privoznik 提交于
      Since we are allocating RPC buffer dynamically, we can increase limits
      for max. size of RPC message and RPC string. This is needed to cover
      some corner cases where libvirt is run on such huge machines that their
      capabilities XML is 4 times bigger than our current limit. This leaves
      users with inability to even connect.
      eb635de1
  24. 23 3月, 2012 3 次提交
    • O
      Add support for the suspend event · 487c0633
      Osier Yang 提交于
      This patch introduces a new event type for the QMP event
      SUSPEND:
      
          VIR_DOMAIN_EVENT_ID_PMSUSPEND
      
      The event doesn't take any data, but considering there might
      be reason for wakeup in future, the callback definition is:
      
      typedef void
      (*virConnectDomainEventSuspendCallback)(virConnectPtr conn,
                                              virDomainPtr dom,
                                              int reason,
                                              void *opaque);
      
      "reason" is unused currently, always passes "0".
      487c0633
    • O
      Add support for the wakeup event · 57ddcc23
      Osier Yang 提交于
      This patch introduces a new event type for the QMP event
      WAKEUP:
      
          VIR_DOMAIN_EVENT_ID_PMWAKEUP
      
      The event doesn't take any data, but considering there might
      be reason for wakeup in future, the callback definition is:
      
      typedef void
      (*virConnectDomainEventWakeupCallback)(virConnectPtr conn,
                                             virDomainPtr dom,
                                             int reason,
                                             void *opaque);
      
      "reason" is unused currently, always passes "0".
      57ddcc23
    • O
      Add support for event tray moved of removable disks · a26a1969
      Osier Yang 提交于
      This patch introduces a new event type for the QMP event
      DEVICE_TRAY_MOVED, which occurs when the tray of a removable
      disk is moved (i.e opened or closed):
      
          VIR_DOMAIN_EVENT_ID_TRAY_CHANGE
      
      The event's data includes the device alias and the reason
      for tray status' changing, which indicates why the tray
      status was changed. Thus the callback definition for the event
      is:
      
      enum {
          VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN = 0,
          VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE,
      
      \#ifdef VIR_ENUM_SENTINELS
          VIR_DOMAIN_EVENT_TRAY_CHANGE_LAST
      \#endif
      } virDomainEventTrayChangeReason;
      
      typedef void
      (*virConnectDomainEventTrayChangeCallback)(virConnectPtr conn,
                                                 virDomainPtr dom,
                                                 const char *devAlias,
                                                 int reason,
                                                 void *opaque);
      a26a1969
  25. 27 2月, 2012 1 次提交
  26. 02 2月, 2012 2 次提交
    • E
      block rebase: wire up remote protocol · 8ee8fd65
      Eric Blake 提交于
      Nice and simple.
      
      * src/remote/remote_protocol.x (REMOTE_PROC_DOMAIN_BLOCK_REBASE):
      New RPC.
      * src/remote/remote_driver.c (remote_driver): Wire it up.
      * src/remote_protocol-structs: Regenerate.
      8ee8fd65
    • P
      API: Add api to set and get domain metadata · c471e55e
      Peter Krempa 提交于
      This patch adds API to modify domain metadata for running and stopped
      domains. The api supports changing description, title as well as the
      newly added <metadata> element. The API has support for storing data in
      the metadata element using xml namespaces.
      
      * include/libvirt/libvirt.h.in
      * src/libvirt_public.syms
              - add function headers
              - add enum to select metadata to operate on
              - export functions
      * src/libvirt.c
              - add public api implementation
      * src/driver.h
              - add driver support
      * src/remote/remote_driver.c
      * src/remote/remote_protocol.x
              - wire up the remote protocol
      * include/libvirt/virterror.h
      * src/util/virterror.c
              - add a new error message note that metadata for domain are
              missing
      c471e55e
  27. 01 2月, 2012 2 次提交
    • J
      Remote protocol for virDomainGetDiskErrors · 342fc56f
      Jiri Denemark 提交于
      342fc56f
    • E
      resize: slightly alter signature · 055bbf45
      Eric Blake 提交于
      Our existing virDomainBlockResize takes an unsigned long long
      argument; if that command is later taught a DELTA and SHRINK flag,
      we cannot change its type without breaking API (but at least such
      a change would be ABI compatible).  Meanwhile, the only time a
      negative size makes sense is if both DELTA and SHRINK are used
      together, but if we keep the argument unsigned, applications can
      pass the positive delta amount by which they would like to shrink
      the system, and have the flags imply the negative value.  So,
      since this API has not yet been released, and in the interest of
      consistency with existing API, we swap virStorageVolResize to
      always pass an unsigned value.
      
      * include/libvirt/libvirt.h.in (virStorageVolResize): Use unsigned
      argument.
      * src/libvirt.c (virStorageVolResize): Likewise.
      * src/driver.h (virDrvStorageVolUpload): Adjust clients.
      * src/remote/remote_protocol.x (remote_storage_vol_resize_args):
      Likewise.
      * src/remote_protocol-structs: Regenerate.
      Suggested by Daniel P. Berrange.
      055bbf45
  28. 29 1月, 2012 1 次提交
  29. 28 1月, 2012 2 次提交
  30. 26 1月, 2012 1 次提交
    • M
      storage: Support different wiping algorithms · adb99a05
      Michal Privoznik 提交于
      Currently, we support only filling a volume with zeroes on wiping.
      However, it is not enough as data might still be readable by
      experienced and equipped attacker. Many technical papers have been
      written, therefore we should support other wiping algorithms.
      adb99a05
  31. 24 1月, 2012 1 次提交
    • D
      Add new virDomainShutdownFlags API · 0b7ddf9e
      Daniel P. Berrange 提交于
      Add a new API virDomainShutdownFlags and define:
      
          VIR_DOMAIN_SHUTDOWN_DEFAULT        = 0,
          VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = (1 << 0),
          VIR_DOMAIN_SHUTDOWN_GUEST_AGENT    = (1 << 1),
      
      Also define some flags for the reboot API
      
          VIR_DOMAIN_REBOOT_DEFAULT        = 0,
          VIR_DOMAIN_REBOOT_ACPI_POWER_BTN = (1 << 0),
          VIR_DOMAIN_REBOOT_GUEST_AGENT    = (1 << 1),
      
      Although these two APIs currently have the same flags, using
      separate enums allows them to expand separately in the future.
      
      Add stub impls of the new API for all existing drivers
      0b7ddf9e