aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-04-07 10:15:25 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-04-07 10:15:25 +0100
commitb8f2311b23db97b3ed116302eaa9c5186b6035fc (patch)
tree63653c4908e22d8bb9d8c1329bdc8d253faaadf4
parent94bacaf76d0c10ec1a56ad34ddaece7e981a3ce8 (diff)
downloadxen-b8f2311b23db97b3ed116302eaa9c5186b6035fc.tar.gz
xen-b8f2311b23db97b3ed116302eaa9c5186b6035fc.tar.bz2
xen-b8f2311b23db97b3ed116302eaa9c5186b6035fc.zip
xm, xend: Replace "vslt" with "vslot"
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
-rw-r--r--tools/python/xen/xend/XendConfig.py6
-rw-r--r--tools/python/xen/xend/XendDomainInfo.py42
-rw-r--r--tools/python/xen/xend/server/pciif.py16
-rw-r--r--tools/python/xen/xm/create.dtd2
-rw-r--r--tools/python/xen/xm/main.py24
-rw-r--r--tools/python/xen/xm/xenapi_create.py4
6 files changed, 47 insertions, 47 deletions
diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py
index e195ab1060..591a22ddea 100644
--- a/tools/python/xen/xend/XendConfig.py
+++ b/tools/python/xen/xend/XendConfig.py
@@ -1617,10 +1617,10 @@ class XendConfig(dict):
# extendend like this:
#
# [device, [pci, [dev, [domain, 0], [bus, 0], [slot, 1], [func, 2],
- # [vslt, 0]],
+ # [vslot, 0]],
# [state, 'Initialising']]]
#
- # 'vslt' shows the virtual hotplug slot number which the PCI device
+ # 'vslot' shows the virtual hotplug slot number which the PCI device
# is inserted in. This is only effective for HVM domains.
#
# state 'Initialising' indicates that the device is being attached,
@@ -1628,7 +1628,7 @@ class XendConfig(dict):
#
# The Dict looks like this:
#
- # { devs: [{domain: 0, bus: 0, slot: 1, func: 2, vslt: 0}],
+ # { devs: [{domain: 0, bus: 0, slot: 1, func: 2, vslot: 0}],
# states: ['Initialising'] }
dev_config = {}
diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py
index 17ed7dac11..3ac885fd28 100644
--- a/tools/python/xen/xend/XendDomainInfo.py
+++ b/tools/python/xen/xend/XendDomainInfo.py
@@ -596,7 +596,7 @@ class XendDomainInfo:
#update the vslot info
count = 0;
for x in pci_devs:
- x['vslt'] = slot_list[count]
+ x['vslot'] = slot_list[count]
count += 1
@@ -619,9 +619,9 @@ class XendDomainInfo:
pci_conf = self.info['devices'][dev_uuid][1]
pci_devs = pci_conf['devs']
for x in pci_devs:
- if (int(x['vslt'], 16) == int(new_dev['vslt'], 16) and
- int(x['vslt'], 16) != AUTO_PHP_SLOT):
- raise VmError("vslot %s already have a device." % (new_dev['vslt']))
+ if (int(x['vslot'], 16) == int(new_dev['vslot'], 16) and
+ int(x['vslot'], 16) != AUTO_PHP_SLOT):
+ raise VmError("vslot %s already have a device." % (new_dev['vslot']))
if (int(x['domain'], 16) == int(new_dev['domain'], 16) and
int(x['bus'], 16) == int(new_dev['bus'], 16) and
@@ -708,7 +708,7 @@ class XendDomainInfo:
new_dev['slot'],
new_dev['func'],
opts,
- new_dev['vslt'])
+ new_dev['vslot'])
self.image.signalDeviceModel('pci-ins', 'pci-inserted', bdf_str)
@@ -789,36 +789,36 @@ class XendDomainInfo:
if pci_state == 'Initialising':
# HVM PCI device attachment
self.hvm_pci_device_create(dev_config)
- # Update vslt
- vslt = xstransact.Read("/local/domain/0/device-model/%i/parameter"
- % self.getDomid())
- dev['vslt'] = vslt
+ # Update vslot
+ vslot = xstransact.Read("/local/domain/0/device-model/%i/parameter"
+ % self.getDomid())
+ dev['vslot'] = vslot
for n in sxp.children(pci_dev):
- if(n[0] == 'vslt'):
- n[1] = vslt
+ if(n[0] == 'vslot'):
+ n[1] = vslot
else:
# HVM PCI device detachment
existing_dev_uuid = sxp.child_value(existing_dev_info, 'uuid')
existing_pci_conf = self.info['devices'][existing_dev_uuid][1]
existing_pci_devs = existing_pci_conf['devs']
- vslt = AUTO_PHP_SLOT_STR
+ vslot = AUTO_PHP_SLOT_STR
for x in existing_pci_devs:
if ( int(x['domain'], 16) == int(dev['domain'], 16) and
int(x['bus'], 16) == int(dev['bus'], 16) and
int(x['slot'], 16) == int(dev['slot'], 16) and
int(x['func'], 16) == int(dev['func'], 16) ):
- vslt = x['vslt']
+ vslot = x['vslot']
break
- if vslt == AUTO_PHP_SLOT_STR:
+ if vslot == AUTO_PHP_SLOT_STR:
raise VmError("Device %04x:%02x:%02x.%01x is not connected"
% (int(dev['domain'],16), int(dev['bus'],16),
int(dev['slot'],16), int(dev['func'],16)))
- self.hvm_destroyPCIDevice(int(vslt, 16))
- # Update vslt
- dev['vslt'] = vslt
+ self.hvm_destroyPCIDevice(int(vslot, 16))
+ # Update vslot
+ dev['vslot'] = vslot
for n in sxp.children(pci_dev):
- if(n[0] == 'vslt'):
- n[1] = vslt
+ if(n[0] == 'vslot'):
+ n[1] = vslot
# If pci platform does not exist, create and exit.
if existing_dev_info is None:
@@ -1046,7 +1046,7 @@ class XendDomainInfo:
#find the pass-through device with the virtual slot
devnum = 0
for x in pci_conf['devs']:
- if int(x['vslt'], 16) == vslot:
+ if int(x['vslot'], 16) == vslot:
break
devnum += 1
@@ -3666,7 +3666,7 @@ class XendDomainInfo:
['bus', '0x%02x' % ppci.get_bus()],
['slot', '0x%02x' % ppci.get_slot()],
['func', '0x%1x' % ppci.get_func()],
- ['vslt', '0x%02x' % xenapi_pci.get('hotplug_slot')],
+ ['vslot', '0x%02x' % xenapi_pci.get('hotplug_slot')],
['opts', dpci_opts],
['uuid', dpci_uuid]
],
diff --git a/tools/python/xen/xend/server/pciif.py b/tools/python/xen/xend/server/pciif.py
index 1b183884e3..92b32a3b45 100644
--- a/tools/python/xen/xend/server/pciif.py
+++ b/tools/python/xen/xend/server/pciif.py
@@ -83,9 +83,9 @@ class PciController(DevController):
opts = reduce(lambda x, y: x+','+y, opts)
back['opts-%i' % pcidevid] = opts
- vslt = pci_config.get('vslt')
- if vslt is not None:
- vslots = vslots + vslt + ";"
+ vslot = pci_config.get('vslot')
+ if vslot is not None:
+ vslots = vslots + vslot + ";"
back['dev-%i' % pcidevid] = "%04x:%02x:%02x.%01x" % \
(domain, bus, slot, func)
@@ -170,9 +170,9 @@ class PciController(DevController):
# Update vslots
if back.get('vslots') is not None:
vslots = old_vslots
- for vslt in back['vslots'].split(';'):
- if vslt != '':
- vslots = vslots.replace(vslt + ';', '', 1)
+ for vslot in back['vslots'].split(';'):
+ if vslot != '':
+ vslots = vslots.replace(vslot + ';', '', 1)
if vslots == '':
self.removeBackend(devid, 'vslots')
else:
@@ -219,9 +219,9 @@ class PciController(DevController):
#append vslot info
if vslots is not None:
try:
- dev_dict['vslt'] = slot_list[i]
+ dev_dict['vslot'] = slot_list[i]
except IndexError:
- dev_dict['vslt'] = AUTO_PHP_SLOT_STR
+ dev_dict['vslot'] = AUTO_PHP_SLOT_STR
pci_devs.append(dev_dict)
diff --git a/tools/python/xen/xm/create.dtd b/tools/python/xen/xm/create.dtd
index d3010b6248..693d27e6ef 100644
--- a/tools/python/xen/xm/create.dtd
+++ b/tools/python/xen/xm/create.dtd
@@ -89,7 +89,7 @@
slot CDATA #REQUIRED
func CDATA #REQUIRED
opts_str CDATA #IMPLIED
- vslt CDATA #IMPLIED>
+ vslot CDATA #IMPLIED>
<!ELEMENT vscsi EMPTY>
<!ATTLIST vscsi p-dev CDATA #REQUIRED
diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py
index b3cfecb448..a7b375dafa 100644
--- a/tools/python/xen/xm/main.py
+++ b/tools/python/xen/xm/main.py
@@ -2155,7 +2155,7 @@ def xm_pci_list(args):
"bus": "0x%02x" % int(ppci_record["bus"]),
"slot": "0x%02x" % int(ppci_record["slot"]),
"func": "0x%01x" % int(ppci_record["func"]),
- "vslt": "0x%02x" % \
+ "vslot": "0x%02x" % \
int(server.xenapi.DPCI.get_hotplug_slot(dpci_ref))
}
devs.append(dev)
@@ -2166,10 +2166,10 @@ def xm_pci_list(args):
if len(devs) == 0:
return
- has_vslt = devs[0].has_key('vslt')
- if has_vslt:
+ has_vslot = devs[0].has_key('vslot')
+ if has_vslot:
hdr_str = 'VSlt domain bus slot func'
- fmt_str = "%(vslt)-3s %(domain)-3s %(bus)-3s %(slot)-3s %(func)-3s "
+ fmt_str = "%(vslot)-3s %(domain)-3s %(bus)-3s %(slot)-3s %(func)-3s "
else:
hdr_str = 'domain bus slot func'
fmt_str = "%(domain)-3s %(bus)-3s %(slot)-3s %(func)-3s "
@@ -2441,16 +2441,16 @@ def parse_pci_configuration(args, state, opts = ''):
dom = args[0]
pci_dev_str = args[1]
if len(args) == 3:
- vslt = args[2]
+ vslot = args[2]
else:
- vslt = AUTO_PHP_SLOT_STR
+ vslot = AUTO_PHP_SLOT_STR
pci=['pci']
pci_match = re.match(r"((?P<domain>[0-9a-fA-F]{1,4})[:,])?" + \
r"(?P<bus>[0-9a-fA-F]{1,2})[:,]" + \
r"(?P<slot>[0-9a-fA-F]{1,2})[.,]" + \
r"(?P<func>[0-7])$", pci_dev_str)
if pci_match == None:
- raise OptionError("Invalid argument: %s %s" % (pci_dev_str,vslt))
+ raise OptionError("Invalid argument: %s %s" % (pci_dev_str, vslot))
pci_dev_info = pci_match.groupdict('0')
try:
@@ -2458,13 +2458,13 @@ def parse_pci_configuration(args, state, opts = ''):
['bus', '0x'+ pci_dev_info['bus']],
['slot', '0x'+ pci_dev_info['slot']],
['func', '0x'+ pci_dev_info['func']],
- ['vslt', '0x%x' % int(vslt, 16)]]
+ ['vslot', '0x%x' % int(vslot, 16)]]
if len(opts) > 0:
pci_bdf.append(['opts', opts])
pci.append(pci_bdf)
except:
- raise OptionError("Invalid argument: %s %s" % (pci_dev_str,vslt))
+ raise OptionError("Invalid argument: %s %s" % (pci_dev_str, vslot))
pci.append(['state', state])
return (dom, pci)
@@ -2494,7 +2494,7 @@ def xm_pci_attach(args):
bus = int(sxp.child_value(pci_dev, 'bus'), 16)
slot = int(sxp.child_value(pci_dev, 'slot'), 16)
func = int(sxp.child_value(pci_dev, 'func'), 16)
- vslt = int(sxp.child_value(pci_dev, 'vslt'), 16)
+ vslot = int(sxp.child_value(pci_dev, 'vslot'), 16)
name = "%04x:%02x:%02x.%01x" % (domain, bus, slot, func)
target_ref = None
@@ -2508,7 +2508,7 @@ def xm_pci_attach(args):
dpci_record = {
"VM": get_single_vm(dom),
"PPCI": target_ref,
- "hotplug_slot": vslt,
+ "hotplug_slot": vslot,
"options": dict(config_pci_opts)
}
server.xenapi.DPCI.create(dpci_record)
@@ -2667,7 +2667,7 @@ def xm_pci_detach(args):
bus = int(sxp.child_value(pci_dev, 'bus'), 16)
slot = int(sxp.child_value(pci_dev, 'slot'), 16)
func = int(sxp.child_value(pci_dev, 'func'), 16)
- vslt = int(sxp.child_value(pci_dev, 'vslt'), 16)
+ vslot = int(sxp.child_value(pci_dev, 'vslot'), 16)
name = "%04x:%02x:%02x.%01x" % (domain, bus, slot, func)
target_ref = None
diff --git a/tools/python/xen/xm/xenapi_create.py b/tools/python/xen/xm/xenapi_create.py
index b66afaf414..0deced5063 100644
--- a/tools/python/xen/xm/xenapi_create.py
+++ b/tools/python/xen/xm/xenapi_create.py
@@ -937,8 +937,8 @@ class sxp2xml:
= get_child_by_name(dev_sxp, "slot", "0")
pci.attributes["func"] \
= get_child_by_name(dev_sxp, "func", "0")
- pci.attributes["vslt"] \
- = get_child_by_name(dev_sxp, "vslt", "0")
+ pci.attributes["vslot"] \
+ = get_child_by_name(dev_sxp, "vslot", "0")
for opt in get_child_by_name(dev_sxp, "opts", ""):
if len(opt) > 0:
pci_opt = document.createElement("pci_opt")