summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorArata Notsu <notsu@virtualtech.jp>2013-04-15 20:27:03 +0900
committerArata Notsu <notsu@virtualtech.jp>2013-04-15 20:27:03 +0900
commit708ff76a993e48e17025c5c2d5451e2e49adc696 (patch)
tree45f674647007b8b65fd80e479df4091b0077ab67 /nova/tests
parent0fc0588a41d85a61695f4fa0aab238784ffe5999 (diff)
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
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/baremetal/test_virtual_power_driver.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/nova/tests/baremetal/test_virtual_power_driver.py b/nova/tests/baremetal/test_virtual_power_driver.py
index 64dccabdd..b98ef5182 100644
--- a/nova/tests/baremetal/test_virtual_power_driver.py
+++ b/nova/tests/baremetal/test_virtual_power_driver.py
@@ -71,12 +71,12 @@ class BareMetalVPDTestCase(bm_db_base.BMDBTestCase):
service_host='test_host',
cpus=2,
memory_mb=2048,
- prov_mac_address='11:11:11:11:11:11',
+ prov_mac_address='aa:bb:cc:dd:ee:ff',
)
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},
- {'address': '33:33:33:33:33:33', 'datapath_id': '0x2',
+ {'address': '22:22:22:22:22:22', 'datapath_id': '0x2',
'port_no': 2},
]
self.addCleanup(fake_image.FakeImageService_reset)
@@ -200,6 +200,8 @@ class VPDClassMethodsTestCase(BareMetalVPDTestCase):
self.mox.StubOutWithMock(self.pm, '_run_command')
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.mox.ReplayAll()