1. 03 8月, 2010 2 次提交
    • M
      esx: Make storage pool lookup by name and UUID more robust · 5254546b
      Matthias Bolte 提交于
      Don't rely on summary.url anymore, because its value is different
      between an esx:// and vpx:// connection. Use host.mountInfo.path
      instead.
      
      Don't fallback to lookup by UUID (actually lookup by absolute path)
      in esxVI_LookupDatastoreByName when lookup by name fails. Add a
      seperate function for this: esxVI_LookupDatastoreByAbsolutePath
      5254546b
    • M
      esx: Restrict vpx:// to handle a single host in a vCenter · e4938ce2
      Matthias Bolte 提交于
      Now a vpx:// connection has an explicitly specified host. This
      allows to enabled several functions for a vpx:// connection
      again, like host UUID, hostname, general node info, max vCPU
      count, free memory, migration and defining new domains.
      
      Lookup datacenter, compute resource, resource pool and host
      system once and cache them. This simplifies the rest of the
      code and reduces overall HTTP(S) traffic a bit.
      
      esx:// and vpx:// can be mixed freely for a migration.
      
      Ensure that migration source and destination refer to the
      same vCenter. Also directly encode the resource pool and
      host system object IDs into the migration URI in the prepare
      function. Then directly build managed object references in
      the perform function instead of re-looking up already known
      information.
      e4938ce2
  2. 30 7月, 2010 1 次提交
  3. 25 7月, 2010 1 次提交
    • M
      esx: Add vpx:// scheme to allow direct connection to a vCenter · 3827f7f0
      Matthias Bolte 提交于
      Add a pointer to the primary context of a connection and use it in all
      driver functions that don't dependent on the context type. This includes
      almost all functions that deal with a virDomianPtr. Therefore, using
      a vpx:// connection allows you to perform all the usual domain related
      actions like start, destroy, suspend, resume, dumpxml etc.
      
      Some functions that require an explicitly specified ESX server don't work
      yet. This includes the host UUID, the hostname, the general node info, the
      max vCPU count and the free memory. Also not working yet are migration and
      defining new domains.
      3827f7f0
  4. 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
  5. 26 5月, 2010 1 次提交
    • M
      esx: Add read-only storage pool access · ddb4ae0c
      Matthias Bolte 提交于
      Allows listing existing pools and requesting information about them.
      
      Alter the esxVI_ProductVersion enum in a way that allows to check for
      product type by masking.
      ddb4ae0c
  6. 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
  7. 23 3月, 2010 1 次提交
  8. 20 3月, 2010 1 次提交
  9. 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
  10. 18 1月, 2010 1 次提交