# HG changeset patch
# User acnt2@xxxxxxxxxxxxxxxxxxxxxxxx
# Node ID 0ae1d493f37c6ea40626e2ffe00379ddaf0a8714
# Parent 509285182efb4598001256abd92046eada1e35dd
[XEND] Python API break. Replacing ambiguious 'dom' with 'domid'
Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
tools/python/xen/lowlevel/xc/xc.c | 36 +++++++++++++++++-----------------
tools/python/xen/xend/image.py | 12 +++++------
tools/python/xen/xend/server/iopif.py | 2 -
tools/python/xen/xend/server/pciif.py | 8 +++----
4 files changed, 29 insertions(+), 29 deletions(-)
diff -r 509285182efb -r 0ae1d493f37c tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Thu Oct 05 17:29:19 2006 +0100
+++ b/tools/python/xen/lowlevel/xc/xc.c Thu Oct 05 17:29:19 2006 +0100
@@ -73,7 +73,7 @@ static PyObject *pyxc_domain_create(XcOb
0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef,
0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef };
- static char *kwd_list[] = { "dom", "ssidref", "handle", NULL };
+ static char *kwd_list[] = { "domid", "ssidref", "handle", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|iiO", kwd_list,
&dom, &ssidref, &pyhandle))
@@ -144,7 +144,7 @@ static PyObject *pyxc_vcpu_setaffinity(X
uint64_t cpumap = ~0ULL;
PyObject *cpulist = NULL;
- static char *kwd_list[] = { "dom", "vcpu", "cpumap", NULL };
+ static char *kwd_list[] = { "domid", "vcpu", "cpumap", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i|iO", kwd_list,
&dom, &vcpu, &cpulist) )
@@ -171,7 +171,7 @@ static PyObject *pyxc_domain_setcpuweigh
uint32_t dom;
float cpuweight = 1;
- static char *kwd_list[] = { "dom", "cpuweight", NULL };
+ static char *kwd_list[] = { "domid", "cpuweight", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i|f", kwd_list,
&dom, &cpuweight) )
@@ -256,7 +256,7 @@ static PyObject *pyxc_domain_getinfo(XcO
PyList_SetItem(pyhandle, j, PyInt_FromLong(info[i].handle[j]));
info_dict = Py_BuildValue("{s:i,s:i,s:i,s:i,s:i,s:i,s:i,s:i,s:i"
",s:l,s:L,s:l,s:i,s:i}",
- "dom", info[i].domid,
+ "domid", info[i].domid,
"online_vcpus", info[i].nr_online_vcpus,
"max_vcpu_id", info[i].max_vcpu_id,
"dying", info[i].dying,
@@ -291,7 +291,7 @@ static PyObject *pyxc_vcpu_getinfo(XcObj
int rc, i;
uint64_t cpumap;
- static char *kwd_list[] = { "dom", "vcpu", NULL };
+ static char *kwd_list[] = { "domid", "vcpu", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i|i", kwd_list,
&dom, &vcpu) )
@@ -334,7 +334,7 @@ static PyObject *pyxc_linux_build(XcObje
unsigned long store_mfn = 0;
unsigned long console_mfn = 0;
- static char *kwd_list[] = { "dom", "store_evtchn",
+ static char *kwd_list[] = { "domid", "store_evtchn",
"console_evtchn", "image",
/* optional */
"ramdisk", "cmdline", "flags",
@@ -375,9 +375,9 @@ static PyObject *pyxc_hvm_build(XcObject
int apic = 0;
unsigned long store_mfn = 0;
- static char *kwd_list[] = { "dom", "store_evtchn", "memsize", "image",
- "vcpus", "pae", "acpi", "apic",
- NULL };
+ static char *kwd_list[] = { "domid", "store_evtchn",
+ "memsize", "image", "vcpus", "pae", "acpi",
"apic",
+ NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiisiiii", kwd_list,
&dom, &store_evtchn, &memsize,
&image, &vcpus, &pae, &acpi, &apic) )
@@ -397,7 +397,7 @@ static PyObject *pyxc_evtchn_alloc_unbou
uint32_t dom, remote_dom;
int port;
- static char *kwd_list[] = { "dom", "remote_dom", NULL };
+ static char *kwd_list[] = { "domid", "remote_dom", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "ii", kwd_list,
&dom, &remote_dom) )
@@ -416,7 +416,7 @@ static PyObject *pyxc_physdev_pci_access
uint32_t dom;
int bus, dev, func, enable, ret;
- static char *kwd_list[] = { "dom", "bus", "dev", "func", "enable", NULL };
+ static char *kwd_list[] = { "domid", "bus", "dev", "func", "enable", NULL
};
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiiii", kwd_list,
&dom, &bus, &dev, &func, &enable) )
@@ -557,7 +557,7 @@ static PyObject *pyxc_sedf_domain_set(Xc
uint32_t domid;
uint64_t period, slice, latency;
uint16_t extratime, weight;
- static char *kwd_list[] = { "dom", "period", "slice",
+ static char *kwd_list[] = { "domid", "period", "slice",
"latency", "extratime", "weight",NULL };
if( !PyArg_ParseTupleAndKeywords(args, kwds, "iLLLhh", kwd_list,
@@ -586,7 +586,7 @@ static PyObject *pyxc_sedf_domain_get(Xc
return PyErr_SetFromErrno(xc_error);
return Py_BuildValue("{s:i,s:L,s:L,s:L,s:i,s:i}",
- "domain", domid,
+ "domid", domid,
"period", period,
"slice", slice,
"latency", latency,
@@ -654,7 +654,7 @@ static PyObject *pyxc_sched_credit_domai
uint32_t domid;
uint16_t weight;
uint16_t cap;
- static char *kwd_list[] = { "dom", "weight", "cap", NULL };
+ static char *kwd_list[] = { "domid", "weight", "cap", NULL };
static char kwd_type[] = "I|HH";
struct xen_domctl_sched_credit sdom;
@@ -714,7 +714,7 @@ static PyObject *pyxc_domain_memory_incr
unsigned int extent_order = 0 , address_bits = 0;
unsigned long nr_extents;
- static char *kwd_list[] = { "dom", "mem_kb", "extent_order",
"address_bits", NULL };
+ static char *kwd_list[] = { "domid", "mem_kb", "extent_order",
"address_bits", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "il|ii", kwd_list,
&dom, &mem_kb, &extent_order,
&address_bits) )
@@ -739,7 +739,7 @@ static PyObject *pyxc_domain_ioport_perm
uint32_t dom;
int first_port, nr_ports, allow_access, ret;
- static char *kwd_list[] = { "dom", "first_port", "nr_ports",
"allow_access", NULL };
+ static char *kwd_list[] = { "domid", "first_port", "nr_ports",
"allow_access", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiii", kwd_list,
&dom, &first_port, &nr_ports,
&allow_access) )
@@ -762,7 +762,7 @@ static PyObject *pyxc_domain_irq_permiss
uint32_t dom;
int pirq, allow_access, ret;
- static char *kwd_list[] = { "dom", "pirq", "allow_access", NULL };
+ static char *kwd_list[] = { "domid", "pirq", "allow_access", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iii", kwd_list,
&dom, &pirq, &allow_access) )
@@ -785,7 +785,7 @@ static PyObject *pyxc_domain_iomem_permi
uint32_t dom;
unsigned long first_pfn, nr_pfns, allow_access, ret;
- static char *kwd_list[] = { "dom", "first_pfn", "nr_pfns", "allow_access",
NULL };
+ static char *kwd_list[] = { "domid", "first_pfn", "nr_pfns",
"allow_access", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "illi", kwd_list,
&dom, &first_pfn, &nr_pfns,
&allow_access) )
diff -r 509285182efb -r 0ae1d493f37c tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py Thu Oct 05 17:29:19 2006 +0100
+++ b/tools/python/xen/xend/image.py Thu Oct 05 17:29:19 2006 +0100
@@ -188,7 +188,7 @@ class LinuxImageHandler(ImageHandler):
store_evtchn = self.vm.getStorePort()
console_evtchn = self.vm.getConsolePort()
- log.debug("dom = %d", self.vm.getDomid())
+ log.debug("domid = %d", self.vm.getDomid())
log.debug("image = %s", self.kernel)
log.debug("store_evtchn = %d", store_evtchn)
log.debug("console_evtchn = %d", console_evtchn)
@@ -197,7 +197,7 @@ class LinuxImageHandler(ImageHandler):
log.debug("vcpus = %d", self.vm.getVCpuCount())
log.debug("features = %s", self.vm.getFeatures())
- return xc.linux_build(dom = self.vm.getDomid(),
+ return xc.linux_build(domid = self.vm.getDomid(),
image = self.kernel,
store_evtchn = store_evtchn,
console_evtchn = console_evtchn,
@@ -217,7 +217,7 @@ class PPC_LinuxImageHandler(LinuxImageHa
store_evtchn = self.vm.getStorePort()
console_evtchn = self.vm.getConsolePort()
- log.debug("dom = %d", self.vm.getDomid())
+ log.debug("domid = %d", self.vm.getDomid())
log.debug("image = %s", self.kernel)
log.debug("store_evtchn = %d", store_evtchn)
log.debug("console_evtchn = %d", console_evtchn)
@@ -228,7 +228,7 @@ class PPC_LinuxImageHandler(LinuxImageHa
devtree = FlatDeviceTree.build(self)
- return xc.linux_build(dom = self.vm.getDomid(),
+ return xc.linux_build(domid = self.vm.getDomid(),
image = self.kernel,
store_evtchn = store_evtchn,
console_evtchn = console_evtchn,
@@ -271,7 +271,7 @@ class HVMImageHandler(ImageHandler):
def buildDomain(self):
store_evtchn = self.vm.getStorePort()
- log.debug("dom = %d", self.vm.getDomid())
+ log.debug("domid = %d", self.vm.getDomid())
log.debug("image = %s", self.kernel)
log.debug("store_evtchn = %d", store_evtchn)
log.debug("memsize = %d", self.vm.getMemoryTarget() / 1024)
@@ -282,7 +282,7 @@ class HVMImageHandler(ImageHandler):
self.register_shutdown_watch()
- return xc.hvm_build(dom = self.vm.getDomid(),
+ return xc.hvm_build(domid = self.vm.getDomid(),
image = self.kernel,
store_evtchn = store_evtchn,
memsize = self.vm.getMemoryTarget() / 1024,
diff -r 509285182efb -r 0ae1d493f37c tools/python/xen/xend/server/iopif.py
--- a/tools/python/xen/xend/server/iopif.py Thu Oct 05 17:29:19 2006 +0100
+++ b/tools/python/xen/xend/server/iopif.py Thu Oct 05 17:29:19 2006 +0100
@@ -72,7 +72,7 @@ class IOPortsController(DevController):
raise VmError('ioports: Invalid i/o range: %s - %s' %
(io_from, io_to))
- rc = xc.domain_ioport_permission(dom = self.getDomid(),
+ rc = xc.domain_ioport_permission(domid = self.getDomid(),
first_port = io_from,
nr_ports = io_to - io_from + 1,
allow_access = True)
diff -r 509285182efb -r 0ae1d493f37c tools/python/xen/xend/server/pciif.py
--- a/tools/python/xen/xend/server/pciif.py Thu Oct 05 17:29:19 2006 +0100
+++ b/tools/python/xen/xend/server/pciif.py Thu Oct 05 17:29:19 2006 +0100
@@ -155,9 +155,9 @@ class PciController(DevController):
PCIQuirk(dev.vendor, dev.device, dev.subvendor, dev.subdevice, domain,
bus, slot, func)
- for (start, size) in dev.ioports:
+ for (start, size) in dev.ioports:
log.debug('pci: enabling ioport 0x%x/0x%x'%(start,size))
- rc = xc.domain_ioport_permission(dom = fe_domid, first_port =
start,
+ rc = xc.domain_ioport_permission(domid = fe_domid, first_port =
start,
nr_ports = size, allow_access = True)
if rc<0:
raise VmError(('pci: failed to configure I/O ports on device '+
@@ -171,7 +171,7 @@ class PciController(DevController):
log.debug('pci: enabling iomem 0x%x/0x%x pfn 0x%x/0x%x'% \
(start,size,start_pfn,nr_pfns))
- rc = xc.domain_iomem_permission(dom = fe_domid,
+ rc = xc.domain_iomem_permission(domid = fe_domid,
first_pfn = start_pfn,
nr_pfns = nr_pfns,
allow_access = True)
@@ -181,7 +181,7 @@ class PciController(DevController):
if dev.irq>0:
log.debug('pci: enabling irq %d'%dev.irq)
- rc = xc.domain_irq_permission(dom = fe_domid, pirq = dev.irq,
+ rc = xc.domain_irq_permission(domid = fe_domid, pirq = dev.irq,
allow_access = True)
if rc<0:
raise VmError(('pci: failed to configure irq on device '+
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|