Commit Graph

69 Commits

Author SHA1 Message Date
Matthias Bolte
ecd93b7541 ESX Add esxNodeGetFreeMemory()
* 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
2009-09-23 15:00:54 +02:00
Chris Lalancette
03d777f345 Introduce virStrncpy.
Add the virStrncpy function, which takes a dst string, source string,
the number of bytes to copy and the number of bytes available in the
dest string.  If the source string is too large to fit into the
destination string, including the \0 byte, then no data is copied and
the function returns NULL.  Otherwise, this function copies n bytes
from source into dst, including the \0, and returns a pointer to the
dst string.  This function is intended to replace all unsafe uses
of strncpy in the code base, since strncpy does *not* guarantee that
the buffer terminates with a \0.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2009-09-22 20:10:00 +02:00
Chris Lalancette
5d2df4100d Fix up comments for domainXML{To,From}Native.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
2009-09-21 18:15:41 +02:00
Matthias Bolte
d513acdd54 ESX cleanup of CPU model strings
* src/esx/esx_driver.c: also strip (C) and (TM) from the CPU model
  strings
2009-09-14 14:20:07 +02:00
Matthias Bolte
847a7c7c2e ESX avoid potential leaks
* src/esx/esx_driver.c: reorder some function calls to avoid potential
  virDomainPtr leaks
2009-09-14 12:44:33 +02:00
Matthias Bolte
ad866fd196 ESX add domain undefine based on esxVI_UnregisterVM
* src/esx/esx_driver.c: add esxDomainUndefine() based on
  esxVI_UnregisterVM()
* src/esx/esx_vi_methods.[ch]: add esxVI_UnregisterVM()
2009-09-04 18:30:10 +02:00
Matthias Bolte
3e8cb46076 ESX add esxGetCapabilities() with basic defaults
* src/esx/esx_driver.c: add esxCapsInit() with default caps and add
  esxGetCapabilities()
2009-09-04 18:25:27 +02:00
Matthias Bolte
1f8988b580 ESX: make esxVI_GetVirtualMachineIdentity() robust
* 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
2009-09-04 18:03:22 +02:00
Matthias Bolte
902aaabb11 ESX: Fix VMX path parsing and URL encoding
* src/esx/esx_driver.c: handle spaces in VMX file path and use a
  virBuffer to encode spaces correctly in the resulting URL
* src/esx/esx_vi.c: include the URL in the error message in case
  of a download error
2009-09-04 17:55:55 +02:00
Matthias Bolte
a9e96b1ee0 Cleanup structure name naming
* src/esx/esx_driver.c src/esx/esx_util.[ch] src/esx/esx_vi.[ch]:
  just a name change
2009-08-06 15:15:45 +02:00
Matthias Bolte
5f48643e0a Fix memleak if esxOpen fails
* src/esx/esx_driver.c: if esxOpen failed, priv->transport wasn't freed
2009-08-06 15:09:40 +02:00
Matthias Bolte
a7c76142a0 Add proper OOM reporting for esxDomainGetOSType
* src/esx/esx_driver.c: catch an unchecked strdup in
  esxDomainGetOSType()
2009-08-06 15:07:46 +02:00
Matthias Bolte
10a4e969a6 Extend the ESX URL to habdle ports and GSX
* src/esx/esx_driver.c src/esx/esx_vi.[ch] src/esx/esx_vmx.[ch]:
  adds version checking for GSX 2.0, allows to pass a specific port
  for the connection and also add a new specific gsx scheme for
  easier connections to GSX hosts
2009-08-05 10:23:59 +02:00
Daniel P. Berrange
84e96866ac Enable ESX driver build on Mingw32
* 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
2009-07-31 16:15:51 +01:00
Matthias Bolte
3f3ec73d39 ESX Scheduler documentation and cleanup
* esx/esx_driver.c: add some documentation about the CPU scheduler
  parameters and remove some old, unnecessary compensation code, since
  virsh uses the proposed parameter types now.
2009-07-30 13:41:04 +02:00
Matthias Bolte
84255632cb ESX driver accept VI API version 4.0
* src/esx/esx_driver.c src/esx/esx_vi.c src/esx/esx_vi.h
  src/esx/esx_vmx.c src/esx/esx_vmx.h: extend the VI API version checks
  to accept version 4.0 and takes care of the virtualHW.version change
  from 4 to 7.
2009-07-27 14:27:09 +02:00
Matthias Bolte
e4e50f52e8 Add no_verify query parameter to ESX URIs
* src/esx/esx_driver.c src/esx/esx_util.c src/esx/esx_util.h
  src/esx/esx_vi.c src/esx/esx_vi.h: adds a no_verify query parameter to
  stop libcurl from verifying theserver certificate for the https
  transport.
2009-07-27 14:18:25 +02:00
Matthias Bolte
e74d6c5009 Fix memory leaks in esxDomainDumpXML
* src/esx/esx_driver.c: remove leaks in esxDomainDumpXML() and simplify
  esxDomainXMLFromNative()
2009-07-27 14:13:11 +02:00
Matthias Bolte
e2aeee6811 First version of the driver for VMWare ESX
* 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
2009-07-23 22:25:34 +02:00