fake.py (openstack-cyborg-8.0.0) | : | fake.py (openstack-cyborg-9.0.0) | ||
---|---|---|---|---|
skipping to change at line 106 | skipping to change at line 106 | |||
pci_dict = { | pci_dict = { | |||
'slot': pci_addr, # PCI slot address | 'slot': pci_addr, # PCI slot address | |||
'device': 'FakeDevice', # Name of the device | 'device': 'FakeDevice', # Name of the device | |||
'vendor_id': '0xABCD', # ID of the vendor | 'vendor_id': '0xABCD', # ID of the vendor | |||
'class': 'Fake class', # Name of the class | 'class': 'Fake class', # Name of the class | |||
'device_id': '0xabcd' # ID of the device | 'device_id': '0xabcd' # ID of the device | |||
} | } | |||
device = driver_device.DriverDevice() | device = driver_device.DriverDevice() | |||
device.vendor = pci_dict["vendor_id"] | device.vendor = pci_dict["vendor_id"] | |||
device.model = pci_dict.get('model', 'miss model info') | device.model = pci_dict.get('model', 'miss model info') | |||
std_board_info = {'device_id': pci_dict.get('device_id', None), | std_board_info = {'device_id': pci_dict.get('device_id'), | |||
'class': pci_dict.get('class', None)} | 'class': pci_dict.get('class')} | |||
device.std_board_info = jsonutils.dumps(std_board_info) | device.std_board_info = jsonutils.dumps(std_board_info) | |||
device.vendor_board_info = 'fake_vendor_info' | device.vendor_board_info = 'fake_vendor_info' | |||
device.type = constants.DEVICE_FPGA | device.type = constants.DEVICE_FPGA | |||
device.stub = False | device.stub = False | |||
device.controlpath_id = self._generate_controlpath_id(pci_dict) | device.controlpath_id = self._generate_controlpath_id(pci_dict) | |||
device.deployable_list = self._generate_dep_list(pci_dict) | device.deployable_list = self._generate_dep_list(pci_dict) | |||
fpga_list.append(device) | fpga_list.append(device) | |||
return fpga_list | return fpga_list | |||
def update(self, control_path, image_path): | def update(self, control_path, image_path): | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |