Commit Graph
3387 Commits
Author SHA1 Message Date
emellor@ewan 0a8fb66792 Remove unused variables and imports.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:31:22 +01:00
emellor@ewan 5a9ab7acc1 domain_setmaxmem takes an int, not a long, for the maxmem_kb parameter. The
underlying xc_domain_setmaxmem already took an unsigned int, and
PyArg_ParseTupleAndKeywords call was only parsing an int, so there is no way
that longer values would get through here in any case.  Fixing the documentation
and the local variable is the best solution, until someone decides that we need
to support maxmem values greater than 2TiB.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:29:57 +01:00
emellor@ewan f519344e5c Move definition of xc, to avoid confusing pylint.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:25:00 +01:00
emellor@ewan 96df3030e7 Remove unused import.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:24:27 +01:00
emellor@ewan c14c80d31d Mark unused variables as such. Remove unused import.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:22:20 +01:00
emellor@ewan bf0102c5f3 Move definition of xc variable, to save confusing pylint.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:21:39 +01:00
emellor@ewan 8aee1a239f Mark unused variable as such.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:20:20 +01:00
emellor@ewan a3d83fdeea Added debugging message to exception on write.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-20 17:19:19 +01:00
kaf24@firebug.cl.cam.ac.uk eafc6710fa The vmx guest loading is broken from 6925 because of the new
DevController code.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-09-20 16:13:01 +00:00
cl349@firebug.cl.cam.ac.uk 4037ef392f Fix vnc configuration issue for creating vmx guest.
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-20 09:43:29 +00:00
cl349@firebug.cl.cam.ac.uk 7fd9bccce2 Remove iflag argument to xs_write
xs_write with O_CREAT|O_EXCL causes problems over daemon restarts, since
it's not idempotent.
It turns out noone really needs the flags word at all, so get rid of it.
It's now as if everyone specified "O_CREAT".
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-19 14:34:30 +00:00
cl349@firebug.cl.cam.ac.uk 8860fee293 merge? 2005-09-19 13:24:13 +00:00
cl349@firebug.cl.cam.ac.uk 5d9baf7940 Don't do device create on domain recreate.
Also don't add XendDomainInfo object to XendDomain dictionary from
XendDomainInfo object but do it in XendDomain.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-19 13:23:22 +00:00
emellor@ewan d854d0b3a2 Revert accidental commit.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-19 14:19:22 +01:00
emellor@ewan 60603ce320 Use DevController.allocateDeviceID rather than using a local variable.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-19 13:44:05 +01:00
emellor@ewan 0c0fe2fcc7 Use DevController.allocateDeviceID rather than using a local variable.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-19 13:41:41 +01:00
cl349@firebug.cl.cam.ac.uk 403d1cc0a8 Remove last remaining "import controller" occurences.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-19 11:01:18 +00:00
emellor@ewan 03454aa712 Add and use XendDomainInfo.getBackendFlags to decouple image.py from the
internals of XendDomainInfo, in preparation for changing the latter.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-18 22:42:02 +01:00
emellor@ewan 2c3b4d51c5 Changed dangerous default parameter values where used to use None instead.
Renamed variables type and ord since these clash with built-in names.  Renamed
unused variables to mark them as such.  Changed scheduler.py to use *args and
**kwargs rather than the strange non-idiomatic imitation of the same.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-18 22:41:12 +01:00
emellor@ewan 9fa82ce91a Remove the complexity of the config_handlers mechanism in favour of a simple
configure_maxmem method. The config_handlers mechanism was trying to be a
general configuration-registration framework, but that functionality was
unused and confusing.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-18 18:21:12 +01:00
emellor@ewan ea07fa29e2 Added allocateDeviceID, which uses the store to keep track of per-domain,
per-device-class device IDs on behalf of the DevController subclasses.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-18 18:18:52 +01:00
emellor@ewan 4fbe918e12 Move definition of xc and xend to avoid confusing pylint.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-18 16:00:24 +01:00
emellor@ewan 33e481b28d Renamed XendDomainInfo.getTargetMemory to getMemoryTarget, for consistency with
XendDomainInfo.setMemoryTarget.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-18 15:50:12 +01:00
emellor@ewan 27b7ea09e0 Replaced the device handling mechanism used by XendDomainInfo. Superficially,
this looks like the resurrection of DevController from controller.py, but the
mechanism is actually very different.  Device handling is now stateless inside
xend, relying on the store for state management, reducing DevController
instances to one-shot lifetimes.  Dev and its subclasses have gone completely.
The device creation code itself has moved from XendDomainInfo.createDevice into
DevController subclasses, and the previous contents of the subclasses has been
discarded (these subclasses were no longer being called, so all this code was
dead).

XendDomainInfo.getDeviceIds has gone, as it was unused.
XendDomainInfo.delete_device has been subsumed by XendDomainInfo.destroyDevice;
since device handling is now stateless inside xend, the distinction between
device 'deletion' and device 'destruction' is meaningless.

The s-expression describing devices has gone, as this information is no longer
available to xend in the same way, and seems to be unused.  If it is required,
it can be reinstated by loading device information from Xen or the store.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-18 15:41:28 +01:00
emellor@ewan c353c7fdd0 Add behaviour to the remove methods to remove the transaction's path itself. This allows us to write Remove(path) to remove the specified path rather than having to slice the path ourselves. 2005-09-18 14:42:13 +01:00
emellor@ewan 00cac7da1c In all cases, move the creation of a new transaction outside of the block
handling exceptions raised inside that transaction.  If the creation (start) of
the transaction fails, then t has not been assigned, and in any case no
transaction has been created, so it is wrong to attempt to abort that
(non-existent) transaction.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-18 10:09:22 +01:00
emellor@ewan ab2a633ba1 Remove assignment to unused field memory_target.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-17 22:34:34 +01:00
emellor@ewan 68d5f41cac Use XendDomainInfo.getDomain, getName to decouple XendDomain from the internals
of XendDomainInfo, prior to changing those internals.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-17 21:00:33 +01:00
emellor@ewan 8098ee1674 Remove unused restoreFromDB, saveToDB.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-09-17 20:23:53 +01:00
emellor@ewan 9956336767 Replace XendDomainInfo.setStoreChannel with XendDomainInfo.closeStoreChannel.
setStoreChannel was only ever called with channel=None (implying that the
current channel would be closed) so the other code there was superfluous.

Signed-off-by: Ewan Mellor<ewan@xensource.com>
2005-09-17 18:09:31 +01:00
emellor@ewan 0fd36627da Added getVCpuCount to XendDomainInfo and use that and getName, getDomain,
getTargetMemory inside image.py to decouple the latter from the internals of
the former.  Move the definition of xc inside image.py to please pylint.

Signed-off-by: Ewan Mellor<ewan@xensource.com>
2005-09-17 17:34:58 +01:00
emellor@ewan 60ebaf4dca Fix indentation. 2005-09-17 16:11:49 +01:00
emellor@ewan b92a3ca11f Added getTargetMemory, getSsidref methods to XendDomainInfo, and use these and
getDomain, getName in SrvDomainDir, to decouple the latter from the internals of
the former, in preparation for changes internal to XendDomainInfo.
 
Signed-off-by: Ewan Mellor<ewan@xensource.com>
2005-09-17 16:10:04 +01:00
emellor@ewan d048bdf4fc Changed ssidref default to 0 when parsing config file.
Signed-off-by: Ewan Mellor<ewan@xensource.com>
2005-09-17 10:52:31 +01:00
emellor@ewan b7411027d6 Added diagnostic message to exception when TypeError occurs on write. 2005-09-17 10:49:14 +01:00
emellor@ewan fd3926cff3 Removed unused getDB method.
Signed-off-by: Ewan Mellor<ewan@xensource.com>
2005-09-17 10:46:55 +01:00
emellor@ewan 80ad0e7711 Moved xroot variable to not confuse pylint (and me).
Signed-off-by: Ewan Mellor<ewan@xensource.com>
2005-09-17 10:44:29 +01:00
emellor@ewan 8a91f23c2b Removed unused impotr and marked some parameters as unused.
Signed-off-by: Ewan Mellor<ewan@xensource.com>
2005-09-17 10:42:49 +01:00
emellor@ewan a7106466d1 Rename feilds to fields throughout.
Signed-off-by: Ewan Mellor<ewan@xensource.com>
2005-09-17 10:33:50 +01:00
emellor@ewan 31e173c963 Remove unused import, and unused class TwistedAdapter. Mark one variable as
unused.

Signed-off-by: Ewan Mellor<ewan@xensource.com>
2005-09-17 10:29:33 +01:00
emellor@ewan eba9ff6ab9 Added _1,.._5 to dummy-variables, so that we can specify multiple unused
parameters in our code.  Removed map and filter from bad-functions - I don't
think that we have any problem with functional programming styles!

Signed-off-by: Ewan Mellor<ewan@xensource.com>
2005-09-17 10:22:42 +01:00
cl349@firebug.cl.cam.ac.uk 41409e43bd Cleanup domain listing on xend start. Fix reaper some more.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-16 23:55:50 +00:00
cl349@firebug.cl.cam.ac.uk 9c7fd21cca Add bindings for xs_get_domain_path().
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-16 22:27:04 +00:00
cl349@firebug.cl.cam.ac.uk ff6958a316 Don't run reap() or domain_restarts() as side-effects of refresh.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-16 20:12:42 +00:00
cl349@firebug.cl.cam.ac.uk 9b707eca60 Move dom0 setup code out of initial_refresh.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-16 20:03:57 +00:00
cl349@firebug.cl.cam.ac.uk 1bc5147c84 Remove pretty random cleanup code in _add_domain.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-16 20:02:18 +00:00
cl349@firebug.cl.cam.ac.uk 9a96bf893d Use "vcpu" when referring to vcpus.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-16 19:11:39 +00:00
cl349@firebug.cl.cam.ac.uk 71a28c9e9d Make dom0_enforce_cpus() use vcpu_hotplug rather than directly modifying the sysfs entries.
Directly modifying the sysfs entries causes the xenstore state of
a cpu's availability to be incorrect.  Also slightly modify the
dom0-cpus description in the xend-config.  Rather than specifying which
dom0 vcpus are to be used, it is now a target of how many vcpus to use
as pinvcpu ops are the preferred method for setting which physical cpu a
vcpu uses.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-16 19:08:36 +00:00
cl349@firebug.cl.cam.ac.uk 87371321cc merge? 2005-09-16 18:59:59 +00:00
cl349@firebug.cl.cam.ac.uk ea87907b81 Fix the control panel problem.
The new image handling structure broke the vmx guest loading.
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-16 18:50:50 +00:00