Commit Graph
1498 Commits
Author SHA1 Message Date
Alastair Tse 68784417db [XENAPI] Make vm-destroy consistent with API naming. Moved what is
known as xm destroy to vm-shutdown --force.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-13 17:34:13 +01:00
Alastair Tse 819c183415 [XEND] Remove extra tap: prefix for device uname.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-13 17:33:34 +01:00
Alastair Tse f1587234c9 [XEND] Fix bugs in vbd_create logic when handling VDIs
Attempt to handle 'tap' devices as 'vbd' devices even though the
internal configuration has no idea that 'tap' is a subclass of 'vbd'.

Add option parsing to vbd-create and vdi-create so you can override
the configuration file options.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-13 17:17:45 +01:00
Alastair Tse 5b13f3ae06 [XEND] Fix some bad names left behind while converting all storage to
bytes rather than KB.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-13 15:38:13 +01:00
Alastair Tse 5d179b7561 [XEND] XendVDI saves configuration on change.
Added a base class called AutoSaveObject that will attempt to call
save_config() if any attribute in the object changes. It isn't
particularly efficient, but we do not expect VDI to change much.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-13 15:34:01 +01:00
Alastair Tse 76b24ff4e2 [XEND] Updates to SR and VDI implementations
* Moved xenapi transport util method, stringify to xen.util.xmlrpclib2
* XenVDI now preserves configuration to an XML-ish file
* Update Xen API's class names to be all lowercase
* Update get_by_label to get_by_name_label and return sets as the API
  expects.
* Add support for VBD creation with a VDI reference.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-13 15:13:21 +01:00
Alastair Tse 2556368450 [XEND] Adding API stub generation to XendAPI + SR implementation for
Xen API.

Fixed *get_by_label functions to return a Set rather than only one
result.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-12 18:51:17 +01:00
Alastair Tse 6450b246e1 [XEND] Beginnings of the Xend Storage Repository implementation.
Currently it is a basic repository that just creates images on demand
and wraps them as VDIs. Rudimentary support for querying the available
space using 'df'. Creates images via 'qcow-create' after creating an
empty image.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-12 18:01:32 +01:00
Alastair Tse 5f92a12ad6 [XEND] Removing this file from version control as it is now
autogenerated via the distutils build script.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-12 18:00:01 +01:00
Alastair Tse 2f88aa3aa6 [XEND] Fix interpretation of stringified 64 bit ints in
XendConfig. Rename Xen API classes, "Host" and "Host_CPU" to their
lowercase equivalent.

Apparent confusion in the docs as to what they should be named.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-12 12:30:01 +01:00
Alastair Tse a69280ed5e [XEND] Add some sort of rudimentary version embedding into the source
so we can report the Xend version number as opposed to Xen's version
number.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-12 12:27:56 +01:00
Alastair Tse 7d5ba9b430 [XEND] Conform to Xen API XMLRPC Wire Protocol Customisation
1. Int(s) all have to be String(s).
2. Enums are not transmitted as Ints, but as Descriptive Strings.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 22:50:29 +01:00
Alastair Tse 16b57ef12c [XENAPI] Adding some rudimentary documentation about what has changed.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 18:01:08 +01:00
Alastair Tse 1e66d26cbd [XEND] Save device updates to VM configuration via Xen API
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 17:34:49 +01:00
Alastair Tse 4abcfe99ad [XEND] Fix check for whether domain is running.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 16:40:39 +01:00
Alastair Tse fde78b356e [XENAPI] Support for VBD/VIF info listing in vm-list --long
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 16:30:35 +01:00
Alastair Tse 943f4e6d26 [XEND] Proper support for devices with UUID. Removing old workaround
with augmented VM UUIDs with devids.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 16:27:06 +01:00
Alastair Tse e9fce87749 [XENAPI] Add missing function names. Proper sub command help messages.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 12:46:46 +01:00
Alastair Tse 2ebaf7314b [XENAPI] Pretty print error messages, insert simple argument parsing
framework

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 12:31:24 +01:00
Alastair Tse 41bd30a5b4 [XEND] Keep track of attached vbds and vifs for XenAPI
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 12:30:46 +01:00
Alastair Tse 5b9963f11b [XENAPI] Fix wrong vars being extracted from reading python cfg
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 12:02:29 +01:00
Alastair Tse 91c2dba337 [XENAPI] Added hard shutdown (aka. vm-destroy)
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 11:57:16 +01:00
Alastair Tse 901b309fb6 [XEND] Remove annoying debugging messages
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 11:56:36 +01:00
Alastair Tse 3dae87e5fa [XENAPI] Example tools to create/destroy/shutdown VMs
Example Session:

xapi.py vm-list
xapi.py host-info
xapi.py vm-create xapi.domcfg.py
xapi.py vbd-create GentooAPI xapi.vbdcfg.py
xapi.py vif-create GentooAPI xapi.vifcfg.py
xapi.py vm-start GentooAPI
xapi.py vm-shutdown GentooAPI
xapi.py vm-delete xapi.py

signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-06 11:48:21 +01:00
Alastair Tse ad6aa72b7f [XEND] Fix shutdown reasons from Xen API
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 20:03:16 +01:00
Alastair Tse 5559c46194 [XEND] Another attempt at fixing escaping logic in SXP
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 20:02:50 +01:00
Alastair Tse d3602e826b [XEND] Fix XenAPI Host interface so that get_record works.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 19:13:52 +01:00
Alastair Tse b2b451d4cd [XEND] Fix many typos with VM interface to XenAPI
1. Python XMLRPC does not allow integer keys to structs.
2. Typo with on_suspend and on_preserve
3. Changed all tuples in constants to lists so .index() works.
4. Made get_vcpus_utils to return seconds of CPU time.
5. Fix flawed login in VM.get_record()
2006-10-05 18:48:54 +01:00
Alastair Tse 7e63b4bf7e [XEND][XM] Fix bug in XendDomainInfo.recreate introduced by refactoring.
* Replaced autostart and autostop with more descriptive on_xend_start
  and on_xend_stop for the configuration.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 18:24:18 +01:00
Alastair Tse df71ef8ba1 [XM] Add missing parameter to XM XMLRPC call so that we get the
devices in xm list --long

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 18:22:13 +01:00
Alastair Tse 4d934dd465 [XEND] Comments cleanups
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:20 +01:00
Alastair Tse 0e91588905 [XEND] Remove misleading debugging message
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=732

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:20 +01:00
Alastair Tse 30e2b73051 [XM][XEND] Speed up xm list
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:20 +01:00
Alastair Tse 4c1d89c12c [XEND] Exposing the XendAPI module in the XMLRPCServer
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
acnt2@huggins.lce.cl.cam.ac.uk e9a4477bde [XM] new.py that implements adding an unstarted domain
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
Alastair Tse 43b265a495 [XM] Add commands to implement lifecycle commands via the XM XMLRPC interface.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
Alastair Tse 7904cd04b9 [XEND] Make SXP be compatible with sequencetypes (Tuples and Lists)
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
Alastair Tse 97465697cb [XEND][XENAPI] XendNode implementation for Xen API Host, Host CPUs
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
Alastair Tse 1d9888c989 [XEND] Add a convenience function for UUID generation
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
Alastair Tse 02af4f3cd3 [XEND][XENAPI] XendCheckpoint should use XendConfig for passing configs.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
Alastair Tse 8eb29e99bd [XEND] Implementation of Xen-API in a separate module.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
Alastair Tse 2a44e6fed4 [XEND] Change blkif to use the new style configuration
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
Alastair Tse 02ba67937c [XEND] Massive XendDomain XendDomainInfo reorganisation to use XendConfig.
* Added some constants to do with lifecycle management in XendDomain
* Added docstrings
* Made all private functions prefixed with an underscore (_)
* Added lifecycle management in XendDomain which stores configs in SXP
  format.
* Added bits of XenAPI support.
* Moved all XendDomainInfo constants to a separate file
* Moved most of the domain creation login into XendDomainInfo rather
  than in module level functions.
* Moved to use Xen API compatible reporting of state.
* Reorganised methods into logical groups in XendDomain and XendDomainInfo
* Moved all domain configuration validation into XendConfig
* Removed DevController cruft from the bottom of XendDomainInfo to
  XendDevices.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
Alastair Tse 9caccb8f48 [XEND] XendConfig is an extended python dictionary that is used to exchange
VM configuration information to allow easy import and export to different
file types.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
Alastair Tse 00a4566470 [XEND] Refactoring device controllers to its own module so it can be used by both XendConfig and XendDomainInfo.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
Alastair Tse 965e9d0ac4 [XEND][XENAPI] Split Xend global constants out to its own file.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
Alastair Tse 19ce2d7016 [XEND][XENAPI] Adding some default Xen API Errors
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
acnt2@huggins.lce.cl.cam.ac.uk 84269c54b1 [XEND] Minor code formatting changes to XendRoot.py
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
acnt2@huggins.lce.cl.cam.ac.uk 5bbd381a3b [XEND][LIFECYCLE] Configurable storage path for lifecycle support
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00
acnt2@huggins.lce.cl.cam.ac.uk 80e180d5b3 [XEND] Clean up some keyword clashes with XendCheckpoint
- Replaced str with domstr
- Disabled changing domain name while migrating

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-10-05 17:29:19 +01:00