1. 27 4月, 2011 1 次提交
    • M
      esx: Fix dynamic dispatch for CastFromAnyType functions · 4a9019af
      Matthias Bolte 提交于
      This was broken by the refactoring in ac1e6586. It resulted in a
      segfault for 'virsh vol-dumpxml' and related volume functions.
      
      Before the refactoring all users of the ESX_VI__TEMPLATE__DISPATCH
      macro dispatched on the item type, as the item is the input to all those
      functions.
      
      Commit ac1e6586 made the dynamically dispatched CastFromAnyType
      functions use this macro too, but this functions dispatched on the
      actual type of the AnyType object. The item is the output of the
      CastFromAnyType functions.
      
      This difference was missed in the refactoring, making CastFromAnyType
      functions dereferencing the item pointer that is NULL at the time of
      the dispatch.
      4a9019af
  2. 16 4月, 2011 1 次提交
  3. 14 4月, 2011 3 次提交
  4. 13 1月, 2011 1 次提交
  5. 07 1月, 2011 1 次提交
  6. 11 12月, 2010 1 次提交
    • M
      esx: Improve error reporting for failed tasks · 2a151699
      Matthias Bolte 提交于
      Instead of just reporting that a task failed get the
      localized message from the TaskInfo error and include
      it in the reported error message.
      
      Implement minimal deserialization support for the
      MethodFault type in order to obtain the actual fault
      type.
      
      For example, this changes the reported error message
      when trying to create a volume with zero size from
      
        Could not create volume
      
      to
      
        Could not create volume: InvalidArgument - A specified parameter was not correct.
      
      Not perfect yet, but better than before.
      2a151699
  7. 10 11月, 2010 1 次提交
  8. 03 8月, 2010 1 次提交
  9. 30 7月, 2010 1 次提交
    • E
      esx: silence spurious compiler warning · 2c216d95
      Eric Blake 提交于
      * src/esx/esx_vi_types.c (_DESERIALIZE_NUMBER)
      (ESX_VI__TEMPLATE__DESERIALIZE_NUMBER): Add range check to shut up
      gcc 4.5.0 regarding long long.
      2c216d95
  10. 14 7月, 2010 1 次提交
  11. 27 5月, 2010 1 次提交
    • M
      esx: Simplify goto usage · 041aac86
      Matthias Bolte 提交于
      Eliminate almost all backward jumps by replacing this common pattern:
      
      int
      some_random_function(void)
      {
          int result = 0;
          ...
      
        cleanup:
          <unconditional cleanup code>
          return result;
      
        failure:
          <cleanup code in case of an error>
          result = -1;
          goto cleanup
      }
      
      with this simpler pattern:
      
      int
      some_random_function(void)
      {
          int result = -1;
          ...
          result = 0;
      
        cleanup:
          if (result < 0) {
              <cleanup code in case of an error>
          }
      
          <unconditional cleanup code>
          return result;
      }
      
      Add a bool success variable in functions that don't have a int result
      that can be used for the new pattern.
      
      Also remove some unnecessary memsets in error paths.
      041aac86
  12. 20 5月, 2010 2 次提交
  13. 21 4月, 2010 1 次提交
  14. 09 4月, 2010 1 次提交
    • M
      esx: Add domain snapshot support · 1aaa9091
      Matthias Bolte 提交于
      Fix invalid code generating in esx_vi_generator.py regarding deep copy
      types that contain enum properties.
      
      Add strptime and timegm to bootstrap.conf. Both are used to convert a
      xsd:dateTime to calendar time.
      
      Add a testcase of the xsd:dateTime conversion.
      1aaa9091
  15. 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
  16. 31 3月, 2010 2 次提交
  17. 23 3月, 2010 1 次提交
    • M
      esx: Generate method mappings via macros · d304352b
      Matthias Bolte 提交于
      This is actually a consequence of the reworked required parameter
      checking: Unify the required parameter check into a Validate function
      instead of doing it separately im the (de)serialization part.
      
      The required parameter checking for the mapped methods parameter was
      done in the (de)serialize functions before. Now it's explicitly done
      in the mapped method itself.
      d304352b
  18. 10 3月, 2010 1 次提交
  19. 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
  20. 09 2月, 2010 1 次提交
  21. 26 1月, 2010 1 次提交
  22. 18 1月, 2010 1 次提交
  23. 19 12月, 2009 2 次提交
    • M
      7cdedde2
    • M
      esx: Add automatic question handling · f66d5745
      Matthias Bolte 提交于
      Questions can block tasks, to handle them automatically the driver can answers
      them with the default answer. The auto_answer query parameter allows to enable
      this automatic question handling.
      
      * src/esx/README: add a detailed explanation for automatic question handling
      * src/esx/esx_driver.c: add automatic question handling for all task related
        driver functions
      * src/esx/esx_util.[ch]: add handling for the auto_answer query parameter
      * src/esx/esx_vi.[ch], src/esx/esx_vi_methods.[ch], src/esx/esx_vi_types.[ch]:
        add new VI API methods and types and additional helper functions for
        automatic question handling
      f66d5745
  24. 15 11月, 2009 1 次提交
  25. 23 9月, 2009 4 次提交
    • M
      ESX add esxDomainDefineXML() · 49faa15e
      Matthias Bolte 提交于
      A given domain XML gets converted to a VMX config, uploaded to the host
      and registered as new virtual machine.
      
      * src/esx/esx_driver.c: refactor datastore related path parsing into
        esxUtil_ParseDatastoreRelatedPath()
      * src/esx/esx_util.[ch]: add esxUtil_ParseDatastoreRelatedPath()
      * src/esx/esx_vi.[ch]: add esxVI_Context_UploadFile(), add datastores to
        the traversal in esxVI_BuildFullTraversalSpecList(), add
        esxVI_LookupDatastoreByName()
      * src/esx/esx_vi_methods.[ch]: add esxVI_RegisterVM_Task()
      * src/esx/esx_vi_types.c: make some error message more verbose
      * src/esx/esx_vmx.[ch]: add esxVMX_AbsolutePathToDatastoreRelatedPath()
        to convert a path into a datastore related path, add esxVMX_ParseFileName()
        to convert from VMX path format to domain XML path format, extend the other
        parsing function to be datastore aware, add esxVMX_FormatFileName() to
        convert from domain XML path format to VMX path format, fix VMX ethernet
        entry formating
      * tests/esxutilstest.c: add test for esxUtil_ParseDatastoreRelatedPath()
      * tests/vmx2xmldata/*: update domain XML files to use datastore related paths
      * tests/xml2vmxdata/*: update domain XML files to use datastore related paths,
        update VMX files to use absolute paths
      49faa15e
    • M
      ESX Whitespace cleanup · 0d4d04e5
      Matthias Bolte 提交于
      0d4d04e5
    • M
      ESX add x86_64 detection based on the CPUID · 15b0c4ff
      Matthias Bolte 提交于
      * src/esx/esx_driver.c: add esxSupportsLongMode() and update esxCapsInit()
      * src/esx/esx_vi.[ch]: Add AnyType handling for lists
      * src/esx/esx_vi_types.c: bind VI type HostCpuIdInfo
      15b0c4ff
    • M
      ESX Add esxNodeGetFreeMemory() · ecd93b75
      Matthias Bolte 提交于
      * src/esx/esx_driver.c: add esxNodeGetFreeMemory(), cache IP address
      * src/esx/esx_vi.[ch]: refactor resource pool query into esxVI_GetResourcePool()
      * src/esx/esx_vi_types.[ch]: bind VI type ResourcePoolResourceUsage
      ecd93b75
  26. 05 9月, 2009 1 次提交
    • M
      ESX: make esxVI_GetVirtualMachineIdentity() robust · 1f8988b5
      Matthias Bolte 提交于
      * src/esx/esx_driver.c: add configStatus to the requested properties
        to check it in esxVI_GetVirtualMachineIdentity()
      * src/esx/esx_vi.[ch]: add esxVI_GetManagedEntityStatus()
        and use it in esxVI_GetVirtualMachineIdentity()
      * src/esx/esx_vi_types.[ch]: add VI type esxVI_ManagedEntityStatus
      1f8988b5
  27. 31 7月, 2009 1 次提交
    • D
      Enable ESX driver build on Mingw32 · 84e96866
      Daniel P. Berrange 提交于
      * autobuild.sh, mingw32-libvirt.spec.in: Enable esx on mingw32
      * src/esx/esx_driver.c: Define AI_ADDRCONFIG if not set
      * src/esx/esx_util.c, src/esx/esx_vi_types.c: Always use
        %lld & friends, since gnulib guarentees we have these
        and not the target's own variants
      84e96866
  28. 24 7月, 2009 1 次提交
    • M
      First version of the driver for VMWare ESX · e2aeee68
      Matthias Bolte 提交于
      * src/esx/esx_*.[ch]: the driver, uses a remote minimal SOAP client
        to talk to the VI services on ESX nodes.
      * configure.in include/libvirt/virterror.h src/Makefile.am src/driver.h
        src/libvirt.c src/virterror.c: glue in the new driver
      e2aeee68