1. 02 11月, 2011 2 次提交
    • M
      esx: Support folders in the path of vpx:// connection URIs · 23247a1e
      Matthias Bolte 提交于
      Allow the datacenter and compute resource parts of the path
      to be prefixed with folders. Therefore, the way the path is
      parsed has changed. Before, it was split in 2 or 3 items and
      the items' meanings were determined by their positions. Now
      the path can have 2 or more items and the the vCenter server
      is asked whether a folder, datacenter of compute resource
      with the specified name exists at the current hierarchy level.
      
      Before the datacenter and compute resource lookup automatically
      traversed folders during lookup. This is logic got removed
      and folders have to be specified explicitly.
      
      The proper datacenter path including folders is now used when
      accessing a datastore over HTTPS. This makes virsh dumpxml
      and define work for datacenters in folders.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=732676
      23247a1e
    • P
      esx: Support vSphere 5.x · 5759a5cc
      Patrice LACHANCE 提交于
      And virtual hardware version 8.
      5759a5cc
  2. 18 10月, 2011 1 次提交
    • E
      snapshot: implement LIST_LEAVES flag in esx · e570d7c4
      Eric Blake 提交于
      Relatively straight-forward filtering.
      
      * src/esx/esx_vi.h (esxVI_GetNumberOfSnapshotTrees)
      (esxVI_GetSnapshotTreeNames): Add parameter.
      * src/esx/esx_vi.c (esxVI_GetNumberOfSnapshotTrees)
      (esxVI_GetSnapshotTreeNames): Allow leaf filtering.
      * src/esx/esx_driver.c (esxDomainSnapshotNum)
      (esxDomainSnapshotListNames, esxDomainSnapshotNumChildren)
      (esxDomainSnapshotListChildrenNames): Pass new flag through.
      e570d7c4
  3. 14 10月, 2011 1 次提交
    • E
      esx: drop dead code to silence Coverity · 1518042b
      Eric Blake 提交于
      Coverity detected that the only way to get to the cleanup label
      is if objectSpec had been successfully allocated, so the null
      check was dead code.
      
      * src/esx/esx_vi.c (esxVI_LookupObjectContentByType): Drop
      redundant null check.
      1518042b
  4. 05 10月, 2011 2 次提交
    • E
      snapshot: simplify esx snapshot name lookup · f0455833
      Eric Blake 提交于
      No need to request the parent of a snapshot if we aren't going to use it.
      
      * src/esx/esx_vi.c (esxVI_GetSnapshotTreeByName): Make parent
      optional.
      * src/esx/esx_driver.c (esxDomainSnapshotCreateXML)
      (esxDomainSnapshotLookupByName, esxDomainRevertToSnapshot)
      (esxDomainSnapshotDelete): Simplify accordingly.
      f0455833
    • E
      snapshot: implement snapshot roots listing in esx · 827a992a
      Eric Blake 提交于
      Commit 9f5e53e2 introduced the ability to filter snapshots to
      just roots, but it was never implemented for ESX until now.
      
      * src/esx/esx_vi.h (esxVI_GetNumberOfSnapshotTrees)
      (esxVI_GetSnapshotTreeNames): Add parameter.
      * src/esx/esx_vi.c (esxVI_GetNumberOfSnapshotTrees)
      (esxVI_GetSnapshotTreeNames): Allow choice of recursion or not.
      * src/esx/esx_driver.c (esxDomainSnapshotNum)
      (esxDomainSnapshotListNames): Use it to limit to roots.
      827a992a
  5. 14 9月, 2011 1 次提交
    • P
      xml: Clean up rest of virtual XML document names for XML strings · b998f1f7
      Peter Krempa 提交于
      Commit 498d7833 cleans up some of virtual file names for parsing strings
      in memory. This patch cleans up (hopefuly) the rest forgotten by the
      first patch.
      
      This patch also changes all of the previously modified "filenames" to
      valid URI's replacing spaces for underscores.
      
      Changes to v1:
      - Replace all spaces for underscores, so that the strings form valid
        URI's
      - Replace spaces in places changed by commit 498d7833
      b998f1f7
  6. 08 9月, 2011 1 次提交
  7. 19 8月, 2011 2 次提交
    • E
      maint: simplify lots of libxml2 clients · d89dd42d
      Eric Blake 提交于
      Repetitive patterns should be factored.  The sign of a good
      factorization is a change that kills 5x more lines than it adds :)
      
      * src/conf/domain_conf.c (virDomainDeviceDefParse)
      (virDomainSnapshotDefParseString): Use new convenience macros.
      * src/conf/storage_conf.c (virStoragePoolDefParseSourceString):
      Likewise.
      * src/cpu/cpu.c (cpuCompareXML, cpuBaselineXML): Likewise.
      * src/esx/esx_vi.c (esxVI_Context_Execute): Likewise.
      * src/qemu/qemu_migration.c (qemuMigrationCookieXMLParseStr):
      Likewise.
      * src/security/virt-aa-helper.c (caps_mockup): Likewise.
      * src/test/test_driver.c (testOpenFromFile): Likewise.
      * tests/cputest.c (cpuTestLoadXML, cpuTestLoadMultiXML):
      Likewise.
      * tools/virsh.c (cmdFreecell, makeCloneXML, cmdVNCDisplay)
      (cmdTTYConsole, cmdDetachInterface, cmdDetachDisk)
      (cmdSnapshotCreate, cmdSnapshotCreateAs, cmdSnapshotCurrent)
      (cmdSnapshotList, cmdSnapshotParent): Likewise.
      d89dd42d
    • E
      maint: treat more libxml2 functions as free-like · e472fe25
      Eric Blake 提交于
      * cfg.mk (useless_free_options): Add xmlFreeDoc, xmlBufferFree.
      * src/esx/esx_vi.c (ESX_VI__TEMPLATE__FREE): Fix offenders.
      * tools/virsh.c (cmdFreecell, cmdVNCDisplay, cmdTTYConsole)
      (cmdDetachInterface, cmdDetachDisk, cmdSnapshotCreate)
      (cmdSnapshotCreateAs, cmdSnapshotList, cmdSnapshotParent):
      Likewise.
      e472fe25
  8. 08 6月, 2011 1 次提交
    • E
      esx: avoid dead code · 657ae229
      Eric Blake 提交于
      Detected by Coverity.  The beginning of the function already filtered
      out NULL objectContentList as invalid.  Further investigation shows:
      
      esxVI_RetrieveProperties is generated and returns a list of objects
      that match the given propertyFilterSpec.
      esxVI_LookupObjectContentByType then tests whether the result
      corresponds to the expected occurrence and reports an error otherwise.
      This simplifies the callers of  esxVI_LookupObjectContentByType, but
      due to the missing dereference the check was never performed because
      the code thought that at least one item was obtained. NULL represents
      an empty list. This is a potential segfault fix because callers of
      esxVI_LookupObjectContentByType that specified "required" occurrence
      assume *objectContentList to be non-NULL when
      esxVI_LookupObjectContentByType succeeds.
      
      * src/esx/esx_vi.c (esxVI_LookupObjectContentByType): Check
      correct pointer.
      657ae229
  9. 17 5月, 2011 3 次提交
  10. 13 5月, 2011 1 次提交
  11. 12 5月, 2011 1 次提交
    • L
      libvirt,logging: cleanup VIR_XXX0() · b65f37a4
      Lai Jiangshan 提交于
      These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead.
      
      How do these coversions works? The magic is using the gcc extension of ##.
      When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to
      avoid compile error.
      
      example: origin				after CPP
      	high_level_api("%d", a_int)	low_level_api("%d", a_int)
      	high_level_api("a  string")	low_level_api("a  string")
      
      About 400 conversions.
      
      8 special conversions:
      VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions
      VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions
      VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal)
        (for security) 6 conversions
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      b65f37a4
  12. 06 5月, 2011 1 次提交
    • E
      maint: rename virBufferVSprintf to virBufferAsprintf · 68ea80cf
      Eric Blake 提交于
      We already have virAsprintf, so picking a similar name helps for
      seeing a similar purpose.  Furthermore, the prefix V before printf
      generally implies 'va_list', even though this variant was '...', and
      the old name got in the way of adding a new va_list version.
      
      global rename performed with:
      
      $ git grep -l virBufferVSprintf \
        | xargs -L1 sed -i 's/virBufferVSprintf/virBufferAsprintf/g'
      
      then revert the changes in ChangeLog-old.
      68ea80cf
  13. 24 4月, 2011 2 次提交
  14. 16 4月, 2011 1 次提交
  15. 14 4月, 2011 1 次提交
  16. 08 1月, 2011 1 次提交
  17. 07 1月, 2011 1 次提交
  18. 30 12月, 2010 1 次提交
  19. 22 12月, 2010 2 次提交
    • M
      esx: Move VMX handling code out of the driver directory · 42b2f35d
      Matthias Bolte 提交于
      Now the VMware driver doesn't depend on the ESX driver anymore.
      
      Add a WITH_VMX option that depends on WITH_ESX and WITH_VMWARE.
      Also add a libvirt_vmx.syms file.
      
      Move some escaping functions from esx_util.c to vmx.c.
      
      Adapt the test suite, ESX and VMware driver to the new code layout.
      42b2f35d
    • M
      esx: Fix cluster resource lookup when connecting to a vCenter · 8cd4ca45
      Matthias Bolte 提交于
      Connecting to a ESX(i) server that is part of a cluster failed
      when the connection also involved a vCenter.
      
      Accept ClusterComputeResource type in addition to ComputeResource
      type in the object lookup function.
      
      Reported by Guillaume Le Louët.
      8cd4ca45
  20. 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
  21. 10 11月, 2010 1 次提交
  22. 15 10月, 2010 1 次提交
  23. 08 9月, 2010 2 次提交
    • M
      esx: Use SessionIsActive when available · 5699034b
      Matthias Bolte 提交于
      Before this commit SessionIsActive was not used because ESX(i)
      doesn't implement it. vCenter supports SessionIsActive, so use
      it here, but keep the fall back mechanism for ESX(i) and GSX.
      5699034b
    • M
      esx: Fall back to path as key when QueryVirtualDiskUuid isn't available · 8fdb0b0c
      Matthias Bolte 提交于
      QueryVirtualDiskUuid is only available on an ESX(i) server. vCenter
      returns an NotImplemented fault and a GSX server is missing the
      VirtualDiskManager completely. Therefore only use QueryVirtualDiskUuid
      with an ESX(i) server and fall back to path as storage volume key for
      vCenter and GSX server.
      8fdb0b0c
  24. 04 9月, 2010 2 次提交
  25. 03 9月, 2010 1 次提交
    • M
      esx: Rework datastore path parsing and handling · 84768912
      Matthias Bolte 提交于
      Instead of splitting the path part of a datastore path into
      directory and file name, keep this in one piece. An example:
      
        "[datastore] directory/file"
      
      was split into this before:
      
        datastoreName = "datastore"
        directoryName = "directory"
        fileName = "file"
      
      Now it's split into this:
      
        datastoreName = "datastore"
        directoryName = "directory"
        directoryAndFileName = "directory/file"
      
      This simplifies code using esxUtil_ParseDatastorePath, because
      directoryAndFileName is used more often than fileName. Also the
      old approach expected the datastore path to reference an actual
      file, but this isn't always correct, especially when listing
      volumes. In that case esxUtil_ParseDatastorePath is used to parse
      a path that references a directory. This fails for a vpx://
      connection because the vCenter returns directory paths with a
      trailing '/'. The new approach is robust against this and the
      actual decision if the datastore path should reference a file or
      a directory is up to the caller of esxUtil_ParseDatastorePath.
      
      Update the tests accordingly.
      84768912
  26. 27 8月, 2010 2 次提交
  27. 24 8月, 2010 1 次提交
    • M
      esx: Improve object-by-type lookup performance · 8c48743b
      Matthias Bolte 提交于
      Instead of using one big traversal spec for lookup use a set of
      more fine grained traversal specs that are selected based on the
      actual needs of the lookup.
      
      This gives up to 20% speedup for certain operations like domain
      listing due to less HTTP(S) traffic.
      8c48743b
  28. 18 8月, 2010 1 次提交
  29. 03 8月, 2010 2 次提交