* 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>
* Also removed stray semicolon
* Fixed whitespace for pciif.py
* Moved DEV_MIGRATE_TEST to xen.xend.__init__.py
Signed-off-by: Alastair Tse <atse@xensource.com>
If a Xen guest has a bootloader configured, then it will fail to start
on a blktap image. The problem is blkdev_uname_to_file, which cannot
parse the "tap:aio:$filename" image strings: it tries to split the
string apart at ":" and assign the result to a 2-tuple, and this
results in a python error if the split results in three or more
strings.
The fix is to split only at the first ":", and then to split again
if we detect "tap:" as the image type.
Signed-off-by: Stephen Tweedie <sct@redhat.com>
Remove try except blocks so that ACMError(s) are properly reported to
the user rather than silently fail.
Signed-off-by: Alastair Tse <atse@xensource.com>
Fixed built-in function name conflict.
Raise correct exceptions for when option is invalid to be properly
reported by xm.
Signed-off-by: Alastair Tse <atse@xensource.com>
Removing try,except block as cfgbootpolicy should allow exceptions to
propagate instead of printing traceback to stdout.
(http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=778)
Changed usage of string.join, string.split when creating security
policy path name.
Signed-off-by: Alastair Tse <atse@xensource.com>
* There's not need for sysrq to be in its own file.
* Bonus advantage: can use arg_check rather than gopts for argument
validation.
Signed-off-by: Alastair Tse <atse@xensource.com>
- Abort core dump if destination is a directory.
- Throw appropriate XendError expection on failure.
Reported by Masaki Kanno <kanno.masaki@jp.fujitsu.com>.
Signed-off-by: Alastair Tse <atse@xensource.com>
* Fix text wrap so it doesn't chop off last word in help message for
certain cases.
* Fix handling of xm create --help_config
* Remove redundant gopts.usage() call.
Signed-off-by: Alastair Tse <atse@xensource.com>
Introducing an OptionError exception to be used by all xm subcommands
to signal an error in the arguments. "xm" will catch these and output
the appropriate error and usage message.
Detailed Changes:
main.py:
* Cleaned up imports and moved warning filter outside of
import block.
* Converted usage parameters and description to a python
dict rather than strings to enable better usage help
formatting.
* Removed unused list_label domain command.
* Added cmdHelp() prints out usage message for any command
* Added shortHelp() prints out the default help message when
xm is invoked with no arguments.
* Added longHelp() prints out long help message when invoked
with xm --help or xm help.
* Added extra optional paramter to getDomains() so we can
tell Xend not to poll devices. This will speed up xm list.
(PENDING changes to Xend itself.)
* Changed all references where 'dom' actually means 'domid'
to use the correct name.
* Changed 'xm list' header format to use printf formatting style.
* Renamed xm_subcommand to xm_importcommand so it is more
clear what it is doing (all xm commands are subcommands!)
* Moved cpu_make_map() inside xm_vcpu_pin as an anonymous func.
* Use OptionError whenever an invalid option is detected in xm.
* Added proper catch and error printing for XendError and
OptionErrors in main().
addlabel.py:
cfgbootpolicy.py:
dry-run.py:
dump-policy.py:
get-label.py:
labels.py:
loadpolicy.py:
makepolicy.py:
rmlabel.py:
resources.py:
* Replaced usage() with help() that is called from main.py
* Replaced usage() invokation with raising OptionError
opts.py:
* Added very simple wrap() function that behaves differently
to textwrap.wrap()
* Added OptionError()
* Replaced the string representation of Opt, Opts to output
a nicely formatted usage message.
* Changed class Opts itself will throw approriate OptionErrors.
* Changed set_bool to recognise 'y' and 'n' as valid input
create.py:
* Some whitespace and column width cleanup.
* throws OptionError if encounters option error.
migrate.py:
* Replace usage() message with the string representation of
gopts.
sysrq.py:
* Replace usage message with throwing OptionErrors
Signed-off-by: Alastair Tse <atse@xensource.com>
xm dump-core [-L|--live][-C| --crash] <domID> [output path]
-L| --live Live dump:
By default, xm dump does an xm pause, unpause before and
after taking the dump, respectively. This option disables
the pause/unpause and simply takes the dump.
-C :| --crash crash dump:
This executes an xm destroy after the dump file is complete.
The output path is optional, and if it is not specified, the path will be
/var/xen/dump/<domU name>.<domU ID>.core
This command uses the existant dumpCore(), which has been used for
coredump when a domU crashed.
Signed-off-by: Ken Hironaka <hironaka.ken@soft.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
is not interpreted by the DM, it actually causes the DM to hang if
passed. Future device model support for the vTPM will read parameters
from the xenstore and won't need the command line parameter(s).
The patch includes a small change to the debugging output for the vTPM
module.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>