Ewan Mellor
7f015ff4a5
Reset the option-parsing object before using it -- this means that the
...
option parsing works when using xm shell.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2007-01-02 14:46:13 +00:00
Ewan Mellor
55bf813209
Minor extra logging.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2007-01-02 14:45:32 +00:00
Ewan Mellor
535e80fa87
Don't canonicalise the resource inside res_security_check if security is off.
...
This had broken use of relative paths to refer to ISOs etc.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2007-01-02 13:35:25 +00:00
Ewan Mellor
dba11d1f26
Fix the error handling in acm.policy.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2007-01-02 13:32:35 +00:00
Ewan Mellor
04c280baf7
Don't lose the image settings when rebooting domains. This fixes recent HVM
...
reboot problems -- we were passing 0 to shadow_mem_control, because Xend was
treating the domain as PV.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2007-01-02 13:04:01 +00:00
Ewan Mellor
95fac2786b
Resurrect cset 13174:766eec31afab, with one fix -- pass the fallback flag to
...
gettext.translation so that this module works if the message database is
missing (it's still an optional part of the build).
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-29 20:17:01 +00:00
Steven Hand
f8512e1c61
(temporarily) revert cset 13174:766eec31afab since it seems to break 64-bit;
...
a proper fix will arrive in the new year.
Signed-off-by: Steven Hand <steven@xensource.com >
2006-12-29 18:17:56 +00:00
kaf24@localhost.localdomain
e7a7e19187
Explicitly use GNU msgfmt on non-GNU systems.
...
Signed-off-by: John Levon <john.levon@sun.com >
2006-12-29 16:23:11 +00:00
Ewan Mellor
396b267ecd
Remove a few more explicit type conversions, now that stringify is fixed.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-28 16:52:44 +00:00
Ewan Mellor
a288b774b7
Fix xmlrpclib2's stringify to cope with floats and longs, removing the need
...
for explicit type conversions in XendAPI.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-28 16:30:47 +00:00
Ewan Mellor
1238c75163
Add a 1-PIF-per-network limit.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-28 15:54:15 +00:00
Ewan Mellor
a80a083a0e
Format Xen-API error messages nicely.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-28 15:52:31 +00:00
Ewan Mellor
b1da15c72b
Added __repr__ implementation, initialise last_login_method to None, and
...
use gettext's ugettext explicitly, rather than using gettext.install. These
things together improve the error messages that you get when using this
module incorrectly in the interactive interpreter.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-28 15:28:45 +00:00
Ewan Mellor
9d26922025
Cope if a VIF is not attached to a network.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-28 15:26:45 +00:00
Ewan Mellor
4bbdd5d689
Do not update the PV_ variables with the values outputted by the bootloader --
...
this gets us into all sorts of trouble when Xend is restarted and then the
domain is rebooted, because we expect to be able to handle the PV_kernel == ''
case by defaulting to pygrub.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-28 15:26:19 +00:00
Ewan Mellor
e5e25973c2
Fix return types for VBD.get_record and VIF.get_record.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-28 15:23:31 +00:00
Ewan Mellor
7917345584
Fix booting caused by recent thinko.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-28 15:00:15 +00:00
Ewan Mellor
6f37f18c79
Fix reboot of PV domains when both kernel and bootloader are unspecified
...
(which is supposed to default to using pygrub).
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-28 12:59:58 +00:00
Ewan Mellor
468611d262
Implement network.get_VIFs.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-28 12:26:29 +00:00
Ewan Mellor
16d8fd16ce
Fix PV_initrd reference (should be PV_ramdisk).
...
Signed-off-by: Stefan Berger <stefanB@us.ibm.com >
2006-12-27 15:44:40 +00:00
Ewan Mellor
bde11044ca
Added network.{create,destroy}, and PIF.{create,create_VLAN,destroy}, and
...
a first blush at support for VLANs through Xen-API.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-27 15:42:56 +00:00
Ewan Mellor
b16ecf8d4e
Added Brctl.get_state, to support upcoming PIF implementation.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-27 15:39:32 +00:00
Ewan Mellor
85a87721a7
Override logging.Logger.findCaller so that the trace function here does not
...
appear as the source of log messages.
Remove the logger name from the log format -- it's adding no useful information.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-27 15:39:04 +00:00
Ewan Mellor
bbe21e102e
Tidy and fix bindings for the SR class.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-27 11:49:59 +00:00
Ewan Mellor
866cc9cd43
Fix HVM booting through Xen-API when the kernel is unspecified.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-27 00:38:01 +00:00
Ewan Mellor
53211200e3
Tidy up bindings for VDI class.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-27 00:35:27 +00:00
Ewan Mellor
894243ac7b
Implement VM_BAD_POWER_STATE handling.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 19:29:05 +00:00
Ewan Mellor
686cfca86a
Persist the VLAN setting.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 17:02:16 +00:00
Ewan Mellor
0d46f85d6c
Fix plumbing for PIF calls. Change xen_api_success to convert None to the
...
empty string, to make it easier to write setters.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 16:56:46 +00:00
Ewan Mellor
8f56ead6e6
Persist network details when they change.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 16:42:24 +00:00
Ewan Mellor
0a8e4657af
Implement network.set_{name_{label,description},default_{gateway,netmask}}.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 16:36:48 +00:00
Ewan Mellor
05c6990f46
Implement network.get_{name_{label,description},default_{gateway,netmask}}.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 16:32:35 +00:00
Ewan Mellor
d33afed19d
Change the way that networks and PIFs relate to each other -- the PIF holds a
...
reference to the network (and the host) not the other way around. Persist only
the necessary details for the network (not the set of PIFs and VIFs).
Fix the plumbing of the network class inside XendAPI, and implement a few more
functions.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 16:26:51 +00:00
Ewan Mellor
c1a482bad3
Cope with corrupt or empty VDI config files. Have to_record return strings
...
rather than integers, as required by the Xen-API spec.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 16:24:15 +00:00
Ewan Mellor
5474facc9b
Change the way that MESSAGE_PARAMETER_COUNT_MISMATCH is diagnosed (using a
...
separate dictionary to record parameter counts, rather than trying to parse them
out of the exception) and tidy up the validator preprocessing and the
validators themselves.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 16:20:23 +00:00
Ewan Mellor
36d5fb9d37
Plumb the new PIF and network implementations in through the XendAPI class.
...
Use the new stateful records to save host, SR, network, and PIF configuration.
Add extra functionality to the SR class, to calculate capacities et al.
By Alastair Tse <atse@xensource.com >.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 15:04:28 +00:00
Ewan Mellor
d3fa64928f
Added get_record method.
...
By Alastair Tse <atse@xensource.com >.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 14:59:11 +00:00
Ewan Mellor
d9510a25ab
New XendNetwork and XendPIF classes, for implementing the Xen-API network and
...
PIF classes.
By Alastair Tse <atse@xensource.com >.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 14:47:36 +00:00
Ewan Mellor
3e9ef3ef0a
Added support for state records in Xend, for keeping storage and network
...
details.
By Alastair Tse <atse@xensource.com >.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 14:38:25 +00:00
Ewan Mellor
6e59829ed2
Adjust the argument counts for a MESSAGE_PARAMETER_COUNT_MISMATCH to account for
...
the fact that XenAPI adds the session handle transparently.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-25 14:32:41 +00:00
Ewan Mellor
84172b6306
Don't try to copy the .mo files if they haven't been built.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-23 21:32:05 +00:00
Ewan Mellor
5bde93a974
Added retry behaviour when receiving SESSION_INVALID. This means that xm shell
...
and XenAPI.Session will reauthenticate across a Xend restart.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-23 20:20:34 +00:00
Ewan Mellor
42a0276111
Only build the message database if msgfmt is installed.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-23 19:06:31 +00:00
Ewan Mellor
8ecdc794ab
Added I18N support for Xen-API error codes.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-23 11:24:10 +00:00
Ewan Mellor
055785c1c8
Move get_by_uuid to the right place to have the input validated. The recent
...
move was wrong.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-23 11:23:27 +00:00
Alastair Tse
720520b42d
[XEND] Fix parsing of bootloader and bootloader_args in XendConfig
...
Signed-off-by: Alastair Tse <atse@xensource.com >
2006-12-22 11:58:22 +00:00
Ewan Mellor
86650d1bd2
Added Xen-API-style error handling for INTERNAL_ERROR and
...
MESSAGE_METHOD_UNKNOWN. Only add the Xen-API methods to the official Xen-API
XML-RPC server, not to the legacy one.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-22 11:39:29 +00:00
Ewan Mellor
9cb668c334
Move the decoration of all the Xen-API methods out of XendAPI.__init__ and
...
into the module scope. This avoids the decorators being added multiple times,
once for each server running.
Fix handling of MESSAGE_PARAMETER_COUNT_MISMATCH in many cases. Move the
get_by_uuid declarations, so that those functions get the per-class validator
as well, to check for existence of the object requested.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-22 11:38:05 +00:00
Ewan Mellor
4de19fce56
Cope with a response that's not a dictionary.
...
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-22 11:34:13 +00:00
Ewan Mellor
a72da7c894
Add a function for creating a domain from an existing XendConfig, and use that
...
on reboot, rather than writing out sxp and reparsing.
Signed-off-by: Ewan Mellor <ewan@xensource.com >
2006-12-21 17:39:32 +00:00