1. 07 4月, 2010 1 次提交
    • M
      esx: Mark error messages for translation · 028db0bf
      Matthias Bolte 提交于
      Also define ESX_ERROR and ESX_VI_ERROR in a central place, instead of
      defining them in each source file.
      
      Add ESX_ERROR and ESX_VI_ERROR to the msg_gen_function list in cfg.mk.
      
      Update po/POTFILES.in accordingly.
      028db0bf
  2. 05 4月, 2010 1 次提交
  3. 04 4月, 2010 1 次提交
    • D
      Add managed save API entry points · 15c647a9
      Daniel Veillard 提交于
      virDomainManagedSave() is to be run on a running domain. Once the call
      complete, as in virDomainSave() the domain is stopped upon completion,
      but there is no restore counterpart as any order to start the domain
      from the API would load the state from the managed file, similary if
      the domain is autostarted when libvirtd starts.
      Once a domain has restarted his managed save image is destroyed,
      basically managed save image can only exist for a stopped domain,
      for a running domain that would be by definition outdated data.
      
      * include/libvirt/libvirt.h.in src/libvirt.c src/libvirt_public.syms:
        adds the new entry points virDomainManagedSave(),
        virDomainHasManagedSaveImage() and virDomainManagedSaveRemove()
      * src/driver.h src/esx/esx_driver.c src/lxc/lxc_driver.c
        src/opennebula/one_driver.c  src/openvz/openvz_driver.c
        src/phyp/phyp_driver.c src/qemu/qemu_driver.c src/vbox/vbox_tmpl.c
        src/remote/remote_driver.c src/test/test_driver.c src/uml/uml_driver.c
        src/xen/xen_driver.c: add corresponding new internal drivers entry
        points
      15c647a9
  4. 01 4月, 2010 1 次提交
  5. 31 3月, 2010 4 次提交
    • E
      maint: remove redundant tests after virStrToLong · 9d6614df
      Eric Blake 提交于
      virStrToLong* guarantees (via strtol) that the end pointer will be set
      to the point at which parsing stopped (even on failure, this point is
      the start of the input string).
      
      * src/esx/esx_driver.c (esxGetVersion): Remove pointless
      conditional.
      * src/qemu/qemu_conf.c (qemuParseCommandLinePCI)
      (qemuParseCommandLineUSB, qemuParseCommandLineSmp): Likewise.
      * src/qemu/qemu_monitor_text.c
      (qemuMonitorTextGetMigrationStatus): Likewise.
      9d6614df
    • J
      maint: fix cpp indentation syntax-check failure · 3cda0eb4
      Jim Meyering 提交于
      * src/esx/esx_vi_types.h: Filter through cppi.
      3cda0eb4
    • M
      esx: Remove redundant semicolons · 63c0c9a7
      Matthias Bolte 提交于
      63c0c9a7
    • M
      esx: Generate most SOAP mapping and improve inheritance handling · 50723581
      Matthias Bolte 提交于
      The Python script generates the mappings based on the type descriptions
      in the esx_vi_generator.input file.
      
      This also improves the inheritance handling and allows to get rid of the
      ugly, inflexible, and error prone _base/_super approach. Now every struct
      that represents a SOAP type contains a _type member, that allows to
      recreate C++-like dynamic dispatch for "method" calls in C.
      50723581
  6. 26 3月, 2010 2 次提交
    • D
      Introduce a new virDomainUpdateDeviceFlags public API · 46a2ea36
      Daniel P. Berrange 提交于
      The current virDomainAttachDevice API can be (ab)used to change
      the media of an existing CDROM/Floppy device. Going forward there
      will be more devices that can be configured on the fly and overloading
      virDomainAttachDevice for this is not too pleasant. This patch adds
      a new virDomainUpdateDeviceFlags() explicitly just for modifying
      existing devices.
      
      * include/libvirt/libvirt.h.in: Add virDomainUpdateDeviceFlags
      * src/driver.h: Internal API for virDomainUpdateDeviceFlags
      * src/libvirt.c, src/libvirt_public.syms: Glue public API to
        driver API
      * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/opennebula/one_driver.c,
        src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/qemu/qemu_driver.c,
        src/remote/remote_driver.c, src/test/test_driver.c, src/uml/uml_driver.c,
        src/vbox/vbox_tmpl.c, src/xen/xen_driver.c, src/xenapi/xenapi_driver.c: Add
        stubs for new driver entry point
      46a2ea36
    • D
      Introduce a new public API for domain events · 44457238
      Daniel P. Berrange 提交于
      The current API for domain events has a number of problems
      
       - Only allows for domain lifecycle change events
       - Does not allow the same callback to be registered multiple times
       - Does not allow filtering of events to a specific domain
      
      This introduces a new more general purpose domain events API
      
        typedef enum {
           VIR_DOMAIN_EVENT_ID_LIFECYCLE = 0,       /* virConnectDomainEventCallback */
            ...more events later..
        }
      
        int virConnectDomainEventRegisterAny(virConnectPtr conn,
                                             virDomainPtr dom, /* Optional, to filter */
                                             int eventID,
                                             virConnectDomainEventGenericCallback cb,
                                             void *opaque,
                                             virFreeCallback freecb);
      
        int virConnectDomainEventDeregisterAny(virConnectPtr conn,
                                               int callbackID);
      
      Since different event types can received different data in the callback,
      the API is defined with a generic callback. Specific events will each
      have a custom signature for their callback. Thus when registering an
      event it is neccessary to cast the callback to the generic signature
      
      eg
      
        int myDomainEventCallback(virConnectPtr conn,
                                  virDomainPtr dom,
                                  int event,
                                  int detail,
                                  void *opaque)
        {
          ...
        }
      
        virConnectDomainEventRegisterAny(conn, NULL,
                                         VIR_DOMAIN_EVENT_ID_LIFECYCLE,
                                         VIR_DOMAIN_EVENT_CALLBACK(myDomainEventCallback)
                                         NULL, NULL);
      
      The VIR_DOMAIN_EVENT_CALLBACK() macro simply does a "bad" cast
      to the generic signature
      
      * include/libvirt/libvirt.h.in: Define new APIs for registering
        domain events
      * src/driver.h: Internal driver entry points for new events APIs
      * src/libvirt.c: Wire up public API to driver API for events APIs
      * src/libvirt_public.syms: Export new APIs
      * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/opennebula/one_driver.c,
        src/openvz/openvz_driver.c, src/phyp/phyp_driver.c,
        src/qemu/qemu_driver.c, src/remote/remote_driver.c,
        src/test/test_driver.c, src/uml/uml_driver.c,
        src/vbox/vbox_tmpl.c, src/xen/xen_driver.c,
        src/xenapi/xenapi_driver.c: Stub out new API entries
      44457238
  7. 23 3月, 2010 4 次提交
  8. 20 3月, 2010 2 次提交
  9. 17 3月, 2010 1 次提交
  10. 10 3月, 2010 1 次提交
  11. 08 3月, 2010 1 次提交
    • E
      build: consistently use C99 varargs macros · 2e56fb2b
      Eric Blake 提交于
      Prior to this patch, there was an inconsistent mix between GNU and C99.
      
      For consistency, and potential portability to other compilers, stick
      with the C99 vararg macro syntax.
      
      * src/conf/cpu_conf.c (virCPUReportError): Use C99 rather than GNU
        vararg macro syntax.
      * src/conf/domain_conf.c (virDomainReportError): Likewise.
      * src/conf/domain_event.c (eventReportError): Likewise.
      * src/conf/interface_conf.c (virInterfaceReportError): Likewise.
      * src/conf/network_conf.c (virNetworkReportError): Likewise.
      * src/conf/node_device_conf.h (virNodeDeviceReportError): Likewise.
      * src/conf/secret_conf.h (virSecretReportError): Likewise.
      * src/conf/storage_conf.h (virStorageReportError): Likewise.
      * src/esx/esx_device_monitor.c (ESX_ERROR): Use C99 rather than
        GNU vararg macro syntax.
      * src/esx/esx_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_interface_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_network_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_secret_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_storage_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_util.c (ESX_ERROR): Likewise.
      * src/esx/esx_vi.c (ESX_VI_ERROR): Likewise.
      * src/esx/esx_vi_methods.c (ESX_VI_ERROR): Likewise.
      * src/esx/esx_vi_types.c (ESX_VI_ERROR): Likewise.
      * src/esx/esx_vmx.c (ESX_ERROR): Likewise.
      * src/util/hostusb.c (usbReportError): Use C99 rather than GNU
        vararg macro syntax.
      * src/util/json.c (virJSONError): Likewise.
      * src/util/macvtap.c (ReportError): Likewise.
      * src/util/pci.c (pciReportError): Likewise.
      * src/util/stats_linux.c (virStatsError): Likewise.
      * src/util/util.c (virUtilError): Likewise.
      * src/util/xml.c (virXMLError): Likewise.
      * src/xen/proxy_internal.c (virProxyError): Use C99 rather than
        GNU vararg macro syntax.
      * src/xen/sexpr.c (virSexprError): Likewise.
      * src/xen/xen_driver.c (xenUnifiedError): Likewise.
      * src/xen/xen_hypervisor.c (virXenError): Likewise.
      * src/xen/xen_inotify.c (virXenInotifyError): Likewise.
      * src/xen/xend_internal.c (virXendError): Likewise.
      * src/xen/xm_internal.c (xenXMError): Likewise.
      * src/xen/xs_internal.c (virXenStoreError): Likewise.
      * src/cpu/cpu.h (virCPUReportError): Use C99 rather than GNU
        vararg macro syntax.
      * src/datatypes.c (virLibConnError): Likewise.
      * src/interface/netcf_driver.c (interfaceReportError): Likewise.
      * src/libvirt.c (virLibStreamError): Likewise.
      * src/lxc/lxc_conf.h (lxcError): Likewise.
      * src/network/bridge_driver.c (networkReportError): Likewise.
      * src/nodeinfo.c (nodeReportError): Likewise.
      * src/opennebula/one_conf.h (oneError): Likewise.
      * src/openvz/openvz_conf.h (openvzError): Likewise.
      * src/phyp/phyp_driver.c (PHYP_ERROR): Likewise.
      * src/qemu/qemu_conf.h (qemuReportError): Likewise.
      * src/remote/remote_driver.c (errorf): Likewise.
      * src/security/security_driver.h (virSecurityReportError): Likewise.
      * src/test/test_driver.c (testError): Likewise.
      * src/uml/uml_conf.h (umlReportError): Likewise.
      * src/vbox/vbox_driver.c (vboxError): Likewise.
      * src/vbox/vbox_tmpl.c (vboxError): Likewise.
      2e56fb2b
  12. 03 3月, 2010 3 次提交
    • E
      esx: don't ignore failure on close · a8464c51
      Eric Blake 提交于
      Another warning caught by coverity.  Continue to perform best-effort
      closing and resource release, but warn the caller about the failure.
      
      * src/esx/esx_driver.c (esxClose): Return an error on failure to close.
      a8464c51
    • D
      Wire up internal entry points for virDomainAbortJob API · 0d8aa35f
      Daniel P. Berrange 提交于
      This provides the internal glue for the driver API
      
      * src/driver.h: Internal API contract
      * src/libvirt.c, src/libvirt_public.syms: Connect public API
        to driver API
      * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/opennebula/one_driver.c,
        src/openvz/openvz_driver.c, src/phyp/phyp_driver.c,
        src/qemu/qemu_driver.c, src/remote/remote_driver.c,
        src/test/test_driver.c src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
        src/xen/xen_driver.c: Stub out entry points
      0d8aa35f
    • D
      Stub out internal driver entry points for job processing · 92bd859a
      Daniel P. Berrange 提交于
      The internal glue layer for the new pubic API
      
      * src/driver.h: Define internal driver API contract
      * src/libvirt.c, src/libvirt_public.syms: Wire up public
        API to internal driver API
      * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/opennebula/one_driver.c,
        src/openvz/openvz_driver.c, src/phyp/phyp_driver.c,
        src/qemu/qemu_driver.c, src/remote/remote_driver.c,
        src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
        src/xen/xen_driver.c: Stub new entry point
      92bd859a
  13. 12 2月, 2010 1 次提交
  14. 10 2月, 2010 1 次提交
  15. 09 2月, 2010 3 次提交
  16. 05 2月, 2010 2 次提交
  17. 27 1月, 2010 1 次提交
  18. 26 1月, 2010 1 次提交
  19. 18 1月, 2010 4 次提交
  20. 09 1月, 2010 2 次提交
  21. 07 1月, 2010 3 次提交
    • M
      esx: Fix 'vpx' MAC address range and allow arbitrary MAC addresses · 96ceb124
      Matthias Bolte 提交于
      The MAC addresses with 00:50:56 prefix are split into several ranges:
      
        00:50:56:00:00:00 - 00:50:56:3f:ff:ff  'static' range (manually assigned)
        00:50:56:80:00:00 - 00:50:56:bf:ff:ff  'vpx' range (assigned by a VI Client)
      
      Erroneously the 'vpx' range was assumed to be larger and to occupy the
      remaining addresses of the 00:50:56 prefix that are not part of the 'static'
      range.
      
      00:50:56 was used as prefix for generated MAC addresses, this is not possible
      anymore, because there are gaps in the allowed ranges. Therefore, change the
      prefix to 00:0c:29 which is the prefix for auto generated MAC addresses anyway.
      
      Allow arbitrary MAC addresses to be used and set the checkMACAddress VMX option
      to false in case the MAC address doesn't fall into any predefined range.
      
      * docs/drvesx.html.in: update website accordingly
      * src/esx/esx_driver.c: set the auto generation prefix to 00:0c:29
      * src/esx/esx_vmx.c: fix MAC address range handling and allow arbitrary MAC
        addresses
      * tests/vmx2xml*, tests/xml2vmx*: add some basic MAC address range tests
      96ceb124
    • M
    • M
      esx: Fix and improve the libcurl debug callback · d9734072
      Matthias Bolte 提交于
      The data passed to the callback is not guaranteed to be zero terminated,
      take care of that by coping the data and adding a zero terminator.
      
      Also dump the data for other types than CURLINFO_TEXT.
      
      Set CURLOPT_VERBOSE to 1 so the debug callback is called when enabled.
      d9734072