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 = '0x0'
+ vslt = 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['func'], 16) == int(dev['func'], 16) ):
vslt = x['vslt']
break
- if vslt == '0x0':
+ if vslt == 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)))
from xen.xend import arch
from xen.xend.XendError import VmError
from xen.xend.XendLogging import log
+from xen.xend.XendConstants import *
from xen.xend.server.DevController import DevController
from xen.xend.server.DevConstants import xenbusState
try:
dev_dict['vslt'] = slot_list[i]
except IndexError:
- dev_dict['vslt'] = '0x0'
+ dev_dict['vslt'] = AUTO_PHP_SLOT_STR
pci_devs.append(dev_dict)
if len(args) == 3:
vslt = args[2]
else:
- vslt = '0x0' #chose a free virtual PCI slot
+ vslt = 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})[:,]" + \