bitkeeper revision 1.1159.17.5 (4119385aTLA7Shj5_vrBcoAQ3-zimg)

Cset exclude: gm281@boulderdash.cl.cam.ac.uk|ChangeSet|20040810153437|54233
This commit is contained in:
kaf24@scramble.cl.cam.ac.uk committed 2004-08-10 21:04:26 +00:00
1 parent 82805c47cb
commit 19d8529486
19 files changed
+31 -63

No files matched your search

+5 -8
View File
@@ -44,19 +44,16 @@ static PyObject *pyxc_domain_create(PyObject *self,
unsigned int mem_kb = 0;
char *name = "(anon)";
int cpu = -1;
float weight;
u32 dom = 0;
int ret;
static char *kwd_list[] = { "dom", "mem_kb", "name", "cpu", "weight",
NULL };
static char *kwd_list[] = { "dom", "mem_kb", "name", "cpu", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|iisif", kwd_list,
&dom, &mem_kb, &name, &cpu, &weight) )
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|iisi", kwd_list,
&dom, &mem_kb, &name, &cpu) )
return NULL;
if ( (ret = xc_domain_create(xc->xc_handle, mem_kb, name, cpu,
weight, &dom)) < 0 )
if ( (ret = xc_domain_create(xc->xc_handle, mem_kb, name, cpu, &dom)) < 0 )
return PyErr_SetFromErrno(xc_error);
return PyInt_FromLong(dom);
+1 -4
View File
@@ -486,7 +486,6 @@ class XendDomainInfo:
self.config = config
try:
self.name = sxp.child_value(config, 'name')
self.weight = float(sxp.child_value(config, 'weight'))
self.check_name(self.name)
self.memory = int(sxp.child_value(config, 'memory'))
if self.memory is None:
@@ -706,10 +705,9 @@ class XendDomainInfo:
return
memory = self.memory
name = self.name
weight = self.weight
cpu = int(sxp.child_value(self.config, 'cpu', '-1'))
dom = self.dom or 0
dom = xc.domain_create(dom= dom, mem_kb= memory * 1024, name= name, cpu= cpu, weight= weight)
dom = xc.domain_create(dom= dom, mem_kb= memory * 1024, name= name, cpu= cpu)
if dom <= 0:
raise VmError('Creating domain failed: name=%s memory=%d'
% (name, memory))
@@ -1139,7 +1137,6 @@ add_device_handler('pci', vm_dev_pci)
add_config_handler('name', vm_field_ignore)
add_config_handler('memory', vm_field_ignore)
add_config_handler('cpu', vm_field_ignore)
add_config_handler('weight', vm_field_ignore)
add_config_handler('console', vm_field_ignore)
add_config_handler('image', vm_field_ignore)
add_config_handler('device', vm_field_ignore)
+1 -6
View File
@@ -97,10 +97,6 @@ gopts.var('memory', val='MEMORY',
fn=set_value, default=128,
use="Domain memory in MB.")
gopts.var('weight', val='WEIGHT',
fn=set_value, default=1,
use="Domain cpu weight (default=1).")
gopts.var('console', val='PORT',
fn=set_int, default=None,
use="Console port to use. Default is 9600 + domain id.")
@@ -299,8 +295,7 @@ def make_config(vals):
config = ['vm',
['name', vals.name ],
['memory', vals.memory ],
['weight', vals.weight] ]
['memory', vals.memory ] ]
if vals.cpu:
config.append(['cpu', vals.cpu])
if vals.blkif:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.