1. 15 6月, 2010 1 次提交
    • E
      remote: protocol implementation for virDomainCreateWithFlags · 6c83e7ca
      Eric Blake 提交于
      Define the wire format for the new virDomainCreateWithFlags
      API, and implement client and server side of marshaling code.
      
      * daemon/remote.c (remoteDispatchDomainCreateWithFlags): Add
      server side dispatch for virDomainCreateWithFlags.
      * src/remote/remote_driver.c (remoteDomainCreateWithFlags)
      (remote_driver): Client side serialization.
      * src/remote/remote_protocol.x
      (remote_domain_create_with_flags_args)
      (remote_domain_create_with_flags_ret)
      (REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS): Define wire format.
      * daemon/remote_dispatch_args.h: Regenerate.
      * daemon/remote_dispatch_prototypes.h: Likewise.
      * daemon/remote_dispatch_table.h: Likewise.
      * src/remote/remote_protocol.c: Likewise.
      * src/remote/remote_protocol.h: Likewise.
      * src/remote_protocol-structs: Likewise.
      6c83e7ca
  2. 07 5月, 2010 1 次提交
  3. 30 4月, 2010 2 次提交
    • D
      Add support for another explicit IO error event · 34dcbbb4
      Daniel P. Berrange 提交于
      This introduces a new event type
      
         VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
      
      This event is the same as the previous VIR_DOMAIN_ID_IO_ERROR
      event, but also includes a string describing the cause of
      the event.
      
      Thus there is a new callback definition for this event type
      
      typedef void (*virConnectDomainEventIOErrorReasonCallback)(virConnectPtr conn,
                                                                 virDomainPtr dom,
                                                                 const char *srcPath,
                                                                 const char *devAlias,
                                                                 int action,
                                                                 const char *reason,
                                                                 void *opaque);
      
      This is currently wired up to the QEMU block IO error events
      
      * daemon/remote.c: Dispatch IO error events to client
      * examples/domain-events/events-c/event-test.c: Watch for
        IO error events
      * include/libvirt/libvirt.h.in: Define new IO error event ID
        and callback signature
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Extend API to handle IO error events
      * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
        for block IO errors and emit a libvirt IO error event
      * src/remote/remote_driver.c: Receive and dispatch IO error
        events to application
      * src/remote/remote_protocol.x: Wire protocol definition for
        IO error events
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c: Watch for BLOCK_IO_ERROR event
        from QEMU monitor
      34dcbbb4
    • D
      Remote protocol impl for virDomainGetBlockInfo · 84a3269a
      Daniel P. Berrange 提交于
      * daemon/remote.c: Server side dispatcher
      * daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h,
        daemon/remote_dispatch_ret.h, daemon/remote_dispatch_table.h: Update
        with new API
      * src/remote/remote_driver.c: Client side dispatcher
      * src/remote/remote_protocol.c, src/remote/remote_protocol.h: Update
      * src/remote/remote_protocol.x: Define new wire protocol
      84a3269a
  4. 27 4月, 2010 1 次提交
    • M
      cygwin: Handle differences in the XDR implementation · d707c866
      Matthias Bolte 提交于
      Cygwin's XDR implementation defines xdr_u_int64_t instead of
      xdr_uint64_t and lacks IXDR_PUT_INT32/IXDR_GET_INT32.
      
      Alter the IXDR_GET_LONG regex in rpcgen_fix.pl so it doesn't destroy
      the #define IXDR_GET_INT32 IXDR_GET_LONG in remote_protocol.x.
      
      Also fix the remote_protocol.h regex in rpcgen_fix.pl.
      d707c866
  5. 14 4月, 2010 1 次提交
  6. 05 4月, 2010 1 次提交
  7. 04 4月, 2010 1 次提交
    • D
      Implement remote protocol for managed save · 7a3da17a
      Daniel Veillard 提交于
      * src/remote/remote_protocol.x src/remote/remote_protocol.h
        src/remote/remote_protocol.c src/remote/remote_driver.c: add the entry
        points in the remote driver
      * daemon/remote.c daemon/remote_dispatch_args.h
        daemon/remote_dispatch_prototypes.h daemon/remote_dispatch_table.h:
        and implement the daemon counterpart
      7a3da17a
  8. 27 3月, 2010 1 次提交
  9. 26 3月, 2010 8 次提交
    • D
      Remote protocol impl for virDomainUpdateDeviceFlags · ee9083ab
      Daniel P. Berrange 提交于
      This defines the wire format for the new virDomainUpdateDeviceFlags()
      API, and implements the server & client side of the marshalling code.
      
      * daemon/remote.c: Server side dispatch for virDomainUpdateDeviceFlags
      * src/remote/remote_driver.c: Client side serialization for
        virDomainUpdateDeviceFlags
      * src/remote/remote_protocol.x: Define wire format for
        virDomainUpdateDeviceFlags
      * daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h,
        daemon/remote_dispatch_table.h, src/remote/remote_protocol.c,
        src/remote/remote_protocol.h: Re-generate code
      ee9083ab
    • D
      Add domain events for graphics network clients · 987e31ed
      Daniel P. Berrange 提交于
      This introduces a new event type
      
         VIR_DOMAIN_EVENT_ID_GRAPHICS
      
      The same event can be emitted in 3 scenarios
      
        typedef enum {
            VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = 0,
            VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE,
            VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT,
        } virDomainEventGraphicsPhase;
      
      Connect/disconnect are triggered at socket accept/close.
      The initialize phase is immediately after the protocol
      setup and authentication has completed. ie when the
      client is authorized and about to start interacting with
      the graphical desktop
      
      This event comes with *a lot* of potential information
      
       - IP address, port & address family of client
       - IP address, port & address family of server
       - Authentication scheme (arbitrary string)
       - Authenticated subject identity. A subject may have
         multiple identities with some authentication schemes.
         For example, vencrypt+sasl results in a x509dname
         and saslUsername identities.
      
      This results in a very complicated callback :-(
      
         typedef enum {
            VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4,
            VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6,
         } virDomainEventGraphicsAddressType;
      
         struct _virDomainEventGraphicsAddress {
             int family;
             const char *node;
             const char *service;
         };
         typedef struct _virDomainEventGraphicsAddress virDomainEventGraphicsAddress;
         typedef virDomainEventGraphicsAddress *virDomainEventGraphicsAddressPtr;
      
         struct _virDomainEventGraphicsSubject {
            int nidentity;
            struct {
                const char *type;
                const char *name;
            } *identities;
         };
         typedef struct _virDomainEventGraphicsSubject virDomainEventGraphicsSubject;
         typedef virDomainEventGraphicsSubject *virDomainEventGraphicsSubjectPtr;
      
         typedef void (*virConnectDomainEventGraphicsCallback)(virConnectPtr conn,
                                                               virDomainPtr dom,
                                                               int phase,
                                                               virDomainEventGraphicsAddressPtr local,
                                                               virDomainEventGraphicsAddressPtr remote,
                                                               const char *authScheme,
                                                               virDomainEventGraphicsSubjectPtr subject,
                                                               void *opaque);
      
      The wire protocol is similarly complex
      
         struct remote_domain_event_graphics_address {
           int family;
           remote_nonnull_string node;
           remote_nonnull_string service;
         };
      
         const REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX = 20;
      
         struct remote_domain_event_graphics_identity {
           remote_nonnull_string type;
           remote_nonnull_string name;
         };
      
         struct remote_domain_event_graphics_msg {
           remote_nonnull_domain dom;
           int phase;
           remote_domain_event_graphics_address local;
           remote_domain_event_graphics_address remote;
           remote_nonnull_string authScheme;
           remote_domain_event_graphics_identity subject<REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX>;
         };
      
      This is currently implemented in QEMU for the VNC graphics
      protocol, but designed to be usable with SPICE graphics in
      the future too.
      
      * daemon/remote.c: Dispatch graphics events to client
      * examples/domain-events/events-c/event-test.c: Watch for
        graphics events
      * include/libvirt/libvirt.h.in: Define new graphics event ID
        and callback signature
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Extend API to handle graphics events
      * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
        for VNC events and emit a libvirt graphics event
      * src/remote/remote_driver.c: Receive and dispatch graphics
        events to application
      * src/remote/remote_protocol.x: Wire protocol definition for
        graphics events
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c: Watch for VNC_CONNECTED,
        VNC_INITIALIZED & VNC_DISCONNETED events from QEMU monitor
      987e31ed
    • D
      Add support for an explicit IO error event · 71d793fa
      Daniel P. Berrange 提交于
      This introduces a new event type
      
         VIR_DOMAIN_EVENT_ID_IO_ERROR
      
      This event includes the action that is about to be taken
      as a result of the watchdog triggering
      
        typedef enum {
           VIR_DOMAIN_EVENT_IO_ERROR_NONE = 0,
           VIR_DOMAIN_EVENT_IO_ERROR_PAUSE,
           VIR_DOMAIN_EVENT_IO_ERROR_REPORT,
        } virDomainEventIOErrorAction;
      
      In addition it has the source path of the disk that had the
      error and its unique device alias. It does not include the
      target device name (/dev/sda), since this would preclude
      triggering IO errors from other file backed devices (eg
      serial ports connected to a file)
      
      Thus there is a new callback definition for this event type
      
      typedef void (*virConnectDomainEventIOErrorCallback)(virConnectPtr conn,
                                                           virDomainPtr dom,
                                                           const char *srcPath,
                                                           const char *devAlias,
                                                           int action,
                                                           void *opaque);
      
      This is currently wired up to the QEMU block IO error events
      
      * daemon/remote.c: Dispatch IO error events to client
      * examples/domain-events/events-c/event-test.c: Watch for
        IO error events
      * include/libvirt/libvirt.h.in: Define new IO error event ID
        and callback signature
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Extend API to handle IO error events
      * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
        for block IO errors and emit a libvirt IO error event
      * src/remote/remote_driver.c: Receive and dispatch IO error
        events to application
      * src/remote/remote_protocol.x: Wire protocol definition for
        IO error events
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c: Watch for BLOCK_IO_ERROR event
        from QEMU monitor
      71d793fa
    • D
      Add support for an explicit watchdog event · c5728cd6
      Daniel P. Berrange 提交于
      This introduces a new event type
      
         VIR_DOMAIN_EVENT_ID_WATCHDOG
      
      This event includes the action that is about to be taken
      as a result of the watchdog triggering
      
       typedef enum {
           VIR_DOMAIN_EVENT_WATCHDOG_NONE = 0,
           VIR_DOMAIN_EVENT_WATCHDOG_PAUSE,
           VIR_DOMAIN_EVENT_WATCHDOG_RESET,
           VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF,
           VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN,
           VIR_DOMAIN_EVENT_WATCHDOG_DEBUG,
       } virDomainEventWatchdogAction;
      
      Thus there is a new callback definition for this event type
      
       typedef void (*virConnectDomainEventWatchdogCallback)(virConnectPtr conn,
                                                             virDomainPtr dom,
                                                             int action,
                                                             void *opaque);
      
      * daemon/remote.c: Dispatch watchdog events to client
      * examples/domain-events/events-c/event-test.c: Watch for
        watchdog events
      * include/libvirt/libvirt.h.in: Define new watchdg event ID
        and callback signature
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Extend API to handle watchdog events
      * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
        for watchdogs and emit a libvirt watchdog event
      * src/remote/remote_driver.c: Receive and dispatch watchdog
        events to application
      * src/remote/remote_protocol.x: Wire protocol definition for
        watchdog events
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c: Watch for WATCHDOG event
        from QEMU monitor
      c5728cd6
    • D
      Add support for an explicit RTC change event · 32e6ac9c
      Daniel P. Berrange 提交于
      This introduces a new event type
      
         VIR_DOMAIN_EVENT_ID_RTC_CHANGE
      
      This event includes the new UTC offset measured in seconds.
      Thus there is a new callback definition for this event type
      
       typedef void (*virConnectDomainEventRTCChangeCallback)(virConnectPtr conn,
                                                              virDomainPtr dom,
                                                              long long utcoffset,
                                                              void *opaque);
      
      If the guest XML configuration for the <clock> is set to
      offset='variable', then the XML will automatically be
      updated with the new UTC offset value. This ensures that
      during migration/save/restore the new offset is preserved.
      
      * daemon/remote.c: Dispatch RTC change events to client
      * examples/domain-events/events-c/event-test.c: Watch for
        RTC change events
      * include/libvirt/libvirt.h.in: Define new RTC change event ID
        and callback signature
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Extend API to handle RTC change events
      * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
        for RTC changes and emit a libvirt RTC change event
      * src/remote/remote_driver.c: Receive and dispatch RTC change
        events to application
      * src/remote/remote_protocol.x: Wire protocol definition for
        RTC change events
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c: Watch for RTC_CHANGE event
        from QEMU monitor
      32e6ac9c
    • D
      Add support for an explicit guest reboot event · 86132734
      Daniel P. Berrange 提交于
      The reboot event is not a normal lifecycle event, since the
      virtual machine on the host does not change state. Rather the
      guest OS is resetting the virtual CPUs. ie, the QEMU process
      does not restart. Thus, this does not belong in the current
      lifecycle events callback.
      
      This introduces a new event type
      
          VIR_DOMAIN_EVENT_ID_REBOOT
      
      It takes no parameters, besides the virDomainPtr, so it can
      use the generic callback signature.
      
      * daemon/remote.c: Dispatch reboot events to client
      * examples/domain-events/events-c/event-test.c: Watch for
        reboot events
      * include/libvirt/libvirt.h.in: Define new reboot event ID
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Extend API to handle reboot events
      * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
        for reboots and emit a libvirt reboot event
      * src/remote/remote_driver.c: Receive and dispatch reboot
        events to application
      * src/remote/remote_protocol.x: Wire protocol definition for
        reboot events
      86132734
    • D
      Rename domain lifecycle event message · d51638d0
      Daniel P. Berrange 提交于
      To avoid confusion, rename the current REMOTE_PROC_DOMAIN_EVENT
      message to REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE. This does not
      cause ABI problems, since the names are only relevant at the source
      code level. On the wire they encoding is a plain integer whose
      value does not change
      
      * src/remote/remote_protocol.x: Rename REMOTE_PROC_DOMAIN_EVENT
        to REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE.
      * daemon/remote.c, src/remote/remote_driver.c: Update code for
        renamed event
      d51638d0
    • D
      Remote driver & daemon impl of new event API · 097e07a6
      Daniel P. Berrange 提交于
      This wires up the remote driver to handle the new events APIs.
      The public API allows an application to request a callback filters
      events to a specific domain object, and register multiple callbacks
      for the same event type. On the wire there are two strategies for
      this
      
       - Register multiple callbacks with the remote daemon, each
         with filtering as needed
       - Register only one callback per event type, with no filtering
      
      Both approaches have potential inefficiency. In the first scheme,
      the same event gets sent over the wire many times if multiple
      callbacks are registered. With the second scheme, unneccessary
      events get sent over the wire if a per-domain filter is set on
      the client. The second scheme is far easier to implement though,
      so this patch takes that approach.
      
      * daemon/dispatch.h: Don't export remoteRelayDomainEvent since it
        is no longer needed for unregistering callbacks, instead the
        unique callback ID is used
      * daemon/libvirtd.c, daemon/libvirtd.h: Track and unregister
        callbacks based on callback ID, instead of function pointer
      * daemon/remote.c: Switch over to using virConnectDomainEventRegisterAny
        instead of legacy virConnectDomainEventRegister function. Refactor
        remoteDispatchDomainEventSend() to cope with arbitrary event types
      * src/driver.h, src/driver.c: Move verify() call into source file
        instead of header, to avoid polluting the global namespace with
        the verify function name
      * src/remote/remote_driver.c: Implement new APIs for event
        registration. Refactor processCallDispatchMessage() to cope
        with arbitrary incoming event types. Merge remoteDomainQueueEvent()
        into processCallDispatchMessage() to avoid duplication of code.
        Rename remoteDomainReadEvent() to remoteDomainReadEventLifecycle()
      * src/remote/remote_protocol.x: Define wire format for the new
        virConnectDomainEventRegisterAny and virConnectDomainEventDeregisterAny
        functions
      097e07a6
  10. 20 3月, 2010 2 次提交
  11. 03 3月, 2010 2 次提交
    • D
      Remote driver implementation for the virDomainAbortJob APi · b1a7ebfd
      Daniel P. Berrange 提交于
      This defines the wire protocol for the new API
      
      * src/remote/remote_protocol.x: Wire protocol definition
      * src/remote/remote_driver.c,daemon/remote.c: Client and server
        side implementation
      * daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h,
        daemon/remote_dispatch_table.h, src/remote/remote_protocol.c,
        src/remote/remote_protocol.h: Re-generate from remote_protocol.x
      b1a7ebfd
    • D
      Remote driver implmentation of job info API · b85a5340
      Daniel P. Berrange 提交于
      * src/remote/remote_protocol.x: Define wire protocol format
        for virDomainGetJobInfo API
      * src/remote/remote_driver.c, daemon/remote.c: Implement client
        and server marshalling code for virDomainGetJobInfo()
      * daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h
        daemon/remote_dispatch_ret.h, daemon/remote_dispatch_table.h,
        src/remote/remote_protocol.c, src/remote/remote_protocol.h: Rebuild
        files from src/remote/remote_protocol.x
      b85a5340
  12. 12 2月, 2010 1 次提交
  13. 09 2月, 2010 1 次提交
    • J
      Wire protocol format · daeb6f6b
      Jim Fehlig 提交于
      Definition of wire protocol format for
      virDomain{Attach,Detach}DeviceFlags.
      daeb6f6b
  14. 20 12月, 2009 1 次提交
    • A
      Add domainMemoryStats support to remote driver · 841d5035
      Adam Litke 提交于
      Use a dynamically sized xdr_array to pass memory stats on the wire.  This
      supports the addition of future memory stats and reduces the message size
      since only supported statistics are returned.
      
      * src/remote/remote_protocol.x: provide defines for the new entry point
      * src/remote/remote_driver.c daemon/remote.c: implement the client and
        server side
      * daemon/remote_dispatch_args.h daemon/remote_dispatch_prototypes.h
        daemon/remote_dispatch_ret.h daemon/remote_dispatch_table.h
        src/remote/remote_protocol.c src/remote/remote_protocol.h: generated
        stubs
      841d5035
  15. 18 12月, 2009 1 次提交
    • J
      CPU flags wire protocol format and server side · 3a2881fa
      Jiri Denemark 提交于
      * src/remote/remote_protocol.x: update with new entry point
      * daemon/remote.c: add the new server dispatcher
      * daemon/remote_dispatch_args.h daemon/remote_dispatch_prototypes.h
        daemon/remote_dispatch_ret.h daemon/remote_dispatch_table.h
        src/remote/remote_protocol.c src/remote/remote_protocol.h: regenerated
      3a2881fa
  16. 12 11月, 2009 1 次提交
    • C
      Add virConnectGetLibvirtVersion API · ce4c0bf5
      Cole Robinson 提交于
      There is currently no way to determine the libvirt version of a remote
      libvirtd we are connected to. This is a useful piece of data to enable
      feature detection.
      ce4c0bf5
  17. 11 11月, 2009 1 次提交
    • D
      Implmentation of new APIs to checking state/persistence of objects · cabc2cc9
      Daniel P. Berrange 提交于
      This implements the virConnectIsSecure, virConnectIsEncrypted,
      virDomainIsPersistent, virDomainIsActive, virNetworkIsActive,
      virNetworkIsPersistent, virStoragePoolIsActive,
      virStoragePoolIsPersistent, virInterfaceIsActive APIs in
      (nearly) all drivers. Exceptions are:
      
       phyp: missing domainIsActive/Persistent
       esx: missing domainIsPersistent
       opennebula: missing domainIsActive/Persistent
      
      * src/remote/remote_protocol.x: Define remote wire ABI for newly
        added APIs.
      * daemon/remote_dispatch*.h: Re-generated from remote_protocol.x
      * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/network/bridge_driver.c,
        src/opennebula/one_driver.c, src/openvz/openvz_conf.c,
        src/openvz/openvz_driver.c, src/phyp/phyp_driver.c,
        src/remote/remote_driver.c, src/storage/storage_driver.c,
        src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
        src/xen/xen_driver.c, src/xen/xen_driver.h, src/xen/xen_inotify.c,
        src/xen/xen_inotify.h: Implement all the new APIs where possible
      cabc2cc9
  18. 09 10月, 2009 1 次提交
    • D
      Remove unneccessary uri_in parameter from virMigratePrepareTunnel · f6c66d01
      Daniel P. Berrange 提交于
      Since virMigratePrepareTunnel() is used for migration over the
      native libvirt connection, there is never any need to pass the
      target URI to this method.
      
      * daemon/remote.c, src/driver.h, src/libvirt.c, src/libvirt_internal.h,
        src/qemu/qemu_driver.c, src/remote/remote_driver.c,
        src/remote/remote_protocol.c, src/remote/remote_protocol.h,
        src/remote/remote_protocol.x: Remove 'uri_in' parameter from
        virMigratePrepareTunnel() method
      f6c66d01
  19. 02 10月, 2009 1 次提交
  20. 29 9月, 2009 1 次提交
    • D
      Helper functions for processing data streams in libvirtd · 11573f3e
      Daniel P. Berrange 提交于
      Defines the extensions to the remote protocol for generic
      data streams. Adds a bunch of helper code to the libvirtd
      daemon for working with data streams.
      
      * daemon/Makefile.am: Add stream.c/stream.h to build
      * daemon/stream.c, qemud/stream.h: Generic helper functions for
        creating new streams, associating streams with clients, finding
        existing streams for a client and removing/deleting streams.
      * src/remote/remote_protocol.x: Add a new 'REMOTE_STREAM' constant
        for the 'enum remote_message_type' for encoding stream data
        in wire messages. Add a new 'REMOTE_CONTINUE' constant to
        'enum remote_message_status' to indicate further data stream
        messsages are expected to follow.  Document how the
        remote_message_header is used to encode data streams
      * src/remote/remote_protocol.h: Regenerate
      * daemon/dispatch.c: Remove assumption that a error message
        sent to client is always type=REMOTE_REPLY. It may now
        also be type=REMOTE_STREAM. Add convenient method for
        sending outgoing stream data packets. Log and ignore
        non-filtered incoming stream packets. Add a method for
        serializing a stream error message
      * daemon/dispatch.h:  Add API for serializing stream errors
        and sending stream data packets
      * daemon/qemud.h: Add struct qemud_client_stream for tracking
        active data streams for clients. Tweak filter function
        operation so that it accepts a client object too.
      * daemon/qemud.c: Refactor code for free'ing message objects
        which have been fully transmitted into separate method.
        Release all active streams when client shuts down. Change
        filter function to be responsible for queueing the message
      11573f3e
  21. 21 9月, 2009 2 次提交
    • D
      Move remote protocol definition into src/remote/ · 634736a7
      Daniel P. Berrange 提交于
      When making changes to the remote protocol, src/ is always built
      first, so rpcgen should live there, to avoid having to run make
      in the 'daemon/' directory before building src/
      
      * src/Makefile.am: Add rules for rpcgen, and drop -I../daemon from
        remote client build
      * daemon/Makefile.am: Add -I../src/remote/ to libvirtd build
        and remove rpcgen rules
      * daemon/libvirtd.c: Adapt include of remote_driver.h taking
        into account new -I flag
      * daemon/remote_protocol.c, daemon/remote_protocol.h,
        daemon/remote_protocol.x: Move to src/remote/
      * daemon/rpcgen_fix.pl: Move to src/remote/rpcgen_fix.pl
      634736a7
    • D
      Rename qemud/ directory to daemon/ · 5c2a1ae8
      Daniel P. Berrange 提交于
      * qemud/: Rename to daemon/
      * Makefile.am, configure.in, src/Makefile.am, src/remote_internal.c,
        tests/Makefile.am, tests/eventtest.c: s/qemud/daemon/ where needed
      5c2a1ae8
  22. 15 9月, 2009 2 次提交
    • D
      Add usage type/id as a public API property of virSecret · a2a30038
      Daniel P. Berrange 提交于
      * include/libvirt/libvirt.h, include/libvirt/libvirt.h.in: Add
        virSecretGetUsageType, virSecretGetUsageID and virLookupSecretByUsage
      * python/generator.py: Mark virSecretGetUsageType, virSecretGetUsageID
        as not throwing exceptions
      * qemud/remote.c: Implement dispatch for virLookupSecretByUsage
      * qemud/remote_protocol.x: Add usage type & ID as attributes of
        remote_nonnull_secret. Add RPC calls for new public APIs
      * qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
        qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
        qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
      * src/datatypes.c, src/datatypes.h: Add usageType and usageID as
        properties of virSecretPtr
      * src/driver.h: Add virLookupSecretByUsage driver entry point
      * src/libvirt.c: Implement virSecretGetUsageType, virSecretGetUsageID
        and virLookupSecretByUsage
      * src/libvirt_public.syms: Export virSecretGetUsageType, virSecretGetUsageID
        and virLookupSecretByUsage
      * src/remote_internal.c: Implement virLookupSecretByUsage entry
      * src/secret_conf.c, src/secret_conf.h: Remove the
        virSecretUsageType enum, now in public API. Make volume
        path mandatory when parsing XML
      * src/secret_driver.c: Enforce usage uniqueness when defining secrets.
        Implement virSecretLookupByUsage api method
      * src/virsh.c: Include usage for secret-list command
      a2a30038
    • D
      Fix UUID handling in secrets/storage encryption APIs · 47e7a258
      Daniel P. Berrange 提交于
      Convert all the secret/storage encryption APIs / wire format to
      handle UUIDs in raw format instead of non-canonical printable
      format. Guarentees data format correctness.
      
      * docs/schemas/storageencryption.rng: Make UUID mandatory for a secret
        and validate fully
      * docs/schemas/secret.rng: Fully validate UUID
      * include/libvirt/libvirt.h, include/libvirt/libvirt.h.in, Add
        virSecretLookupByUUID and virSecretGetUUID. Make
        virSecretGetUUIDString follow normal API design pattern
      * python/generator.py: Skip generation of virSecretGetUUID,
        virSecretGetUUIDString and virSecretLookupByUUID
      * python/libvir.c, python/libvirt-python-api.xml: Manual impl
        of virSecretGetUUID,virSecretGetUUIDString and virSecretLookupByUUID
      * qemud/remote.c: s/virSecretLookupByUUIDString/virSecretLookupByUUID/
        Fix get_nonnull_secret/make_nonnull_secret to use unsigned char
      * qemud/remote_protocol.x: Fix remote_nonnull_secret to use a
        remote_uuid instead of remote_nonnull_string for UUID field.
        Rename REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING to
        REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING and make it take an
        remote_uuid  value
      * qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
        qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
        qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
      * src/datatypes.h, src/datatypes.c: Store UUID in raw format instead
        of printable. Change virGetSecret to use raw format UUID
      * src/driver.h: Rename virDrvSecretLookupByUUIDString to
        virDrvSecretLookupByUUID and use raw format UUID
      * src/libvirt.c: Add virSecretLookupByUUID and virSecretGetUUID
        and re-implement virSecretLookupByUUIDString and
        virSecretGetUUIDString in terms of those
      * src/libvirt_public.syms: Add virSecretLookupByUUID and
        virSecretGetUUID
      * src/remote_internal.c: Rename remoteSecretLookupByUUIDString
        to remoteSecretLookupByUUID. Fix typo in args for
        remoteSecretDefineXML impl. Use raw UUID format for
        get_nonnull_secret and make_nonnull_secret
      * src/storage_encryption_conf.c, src/storage_encryption_conf.h:
        Storage UUID in raw format, and require it to be present in
        XML. Use UUID parser to validate.
      * secret_conf.h, secret_conf.c: Generate a UUID if none is provided.
        Storage UUID in raw format.
      * src/secret_driver.c: Adjust to deal with raw UUIDs. Save secrets
        in a filed with printable UUID, instead of base64 UUID.
      * src/virsh.c: Adjust for changed public API contract of
        virSecretGetUUIDString.
      * src/storage_Backend.c: DOn't undefine secret we just generated
        upon successful volume creation. Fix to handle raw UUIDs. Generate
        a non-clashing UUID
      * src/qemu_driver.c: Change to use lookupByUUID instead of
        lookupByUUIDString
      47e7a258
  23. 02 9月, 2009 1 次提交
    • M
      Secret manipulation libvirtd wire protocol & remote dispatcher · 0de63c67
      Miloslav Trmač 提交于
      * qemud/remote_protocol.x: Define wire protocol for secrets public
        APIs
      * qemud/remote_protocol.h, qemud/remote_protocol.c,
        qemud/remote_dispatch_table.h, qemud/remote_dispatch_ret.h,
        qemud/remote_dispatch_prototypes.h, qemud/remote_dispatch_args.h:
        Re-generate from updated protocol definition
      * qemud/remote.c: Implement RPC dispatchers for new secrets APIs
      0de63c67
  24. 16 7月, 2009 3 次提交
    • L
      Implement the new virinterface functions · d4ad29be
      Laine Stump 提交于
      * src/driver.h: add new driver functions virDrvNumOfDefinedInterfaces
        and virDrvListDefinedInterfaces
      * src/libvirt.c: implements the entry points, calling new driver
        functions
      * qemud/remote.c qemud/remote_dispatch_args.h qemud/remote_protocol.[chx]
        qemud/remote_dispatch_prototypes.h qemud/remote_dispatch_ret.h
        qemud/remote_dispatch_table.h src/remote_internal.c: implement the
        client/server side of the RPC
      d4ad29be
    • D
      Rename 'direction' to 'type' in remote_message_header · 27944fac
      Daniel P. Berrange 提交于
      The 'remote_message_header' struct has a mis-leadingly named
      field 'direction'. It is really a reflection of the type of
      message, and some types can be sent in either direction. Thus
      the field is more accurately named 'type'. No function change.
      
      * qemud/remote_protocol.x: Rename 'direction' to 'type' in
        'remote_message_header. Write better docs describing the
        message header field semantics & usage
      * qemud/remote_protocol.c, qemud/remote_protocol.h: Regenerate
      * qemud/remote.c, qemud/dispatch.c, src/remote_internal.c
        Update to reflect rename of 'direction' to 'type'
      27944fac
    • D
      Change code generator to give async event messages their own postfix · aa23d432
      Daniel P. Berrange 提交于
      The naming convention for structs used in the RPC layer is for
      incoming requests to be called XXXX_args, and the associated
      outgoing reply to be called XXXX_ret.  Asynchronously emitted
      messages (eg events) are re-using the XXXX_ret naming scheme.
      This patch changes that such that async messages are XXXX_msg,
      and stops adding entries for them in the dispatch table, avoiding
      the need for a dummy no-op implementation.
      
      * qemud/remote.c: Remove dummy remoteDispatchDomainEvent, no
        longer required. Update to replace remote_domain_event_ret
        with xdr_remote_domain_event_msg
      * qemud/remote_protocol.x: Rename remote_domain_event_ret to
        remote_domain_event_msg
      * qemud/remote_generate_stubs.pl: Adding handling for new
        XXX_msg structs.
      * src/remote_internal.c: Rename remote_domain_event_ret to
        remote_domain_event_msg
      * qemud/remote_dispatch_prototypes.h, qemud/remote_dispatch_ret.h,
        qemud/remote_dispatch_table.h, qemud/remote_protocol.h,
        qemud/remote_protocol.c: auto-regenerate
      aa23d432
  25. 29 5月, 2009 1 次提交
  26. 21 5月, 2009 1 次提交