baremetal: VirtualPowerDriver uses mac addresses in bm_interfaces

After the change I6653829364b0a641442d45e766493180d6f2a880,
bm_nodes.prov_mac_address is no longer set. However VPD still
uses it. This patch changes VPD to use bm_interfaces.address
instead of bm_nodes.prov_mac_address.

Fixes bug 1168574.

Change-Id: I2bab869b282958ee9fd0e4776928e56351018324
This commit is contained in:
Arata Notsu
2013-04-15 20:27:03 +09:00
parent 1368105528
commit 4ca3556a50

View File

@@ -71,12 +71,12 @@ class BareMetalVPDTestCase(bm_db_base.BMDBTestCase):
service_host='test_host', service_host='test_host',
cpus=2, cpus=2,
memory_mb=2048, memory_mb=2048,
prov_mac_address='11:11:11:11:11:11', prov_mac_address='aa:bb:cc:dd:ee:ff',
) )
self.nic_info = [ self.nic_info = [
{'address': '22:22:22:22:22:22', 'datapath_id': '0x1', {'address': '11:11:11:11:11:11', 'datapath_id': '0x1',
'port_no': 1}, 'port_no': 1},
{'address': '33:33:33:33:33:33', 'datapath_id': '0x2', {'address': '22:22:22:22:22:22', 'datapath_id': '0x2',
'port_no': 2}, 'port_no': 2},
] ]
self.addCleanup(fake_image.FakeImageService_reset) self.addCleanup(fake_image.FakeImageService_reset)
@@ -200,6 +200,8 @@ class VPDClassMethodsTestCase(BareMetalVPDTestCase):
self.mox.StubOutWithMock(self.pm, '_run_command') self.mox.StubOutWithMock(self.pm, '_run_command')
cmd = self.pm._vp_cmd.get_node_macs.replace('{_NodeName_}', 'testNode') cmd = self.pm._vp_cmd.get_node_macs.replace('{_NodeName_}', 'testNode')
# aa:bb:cc:dd:ee:ff is prov_mac_adress. Check it is not used to
# find the node.
self.pm._run_command(cmd).AndReturn(["aabbccddeeff", "ffeeddccbbaa"]) self.pm._run_command(cmd).AndReturn(["aabbccddeeff", "ffeeddccbbaa"])
self.mox.ReplayAll() self.mox.ReplayAll()