Merge "Get details when listing ports upon inspection of active nodes"
This commit is contained in:
commit
9d99da70bd
@ -217,7 +217,7 @@ def lookup_node_by_macs(macs, introspection_data=None,
|
|||||||
|
|
||||||
nodes = set()
|
nodes = set()
|
||||||
for mac in macs:
|
for mac in macs:
|
||||||
ports = ironic.port.list(address=mac)
|
ports = ironic.port.list(address=mac, fields=["uuid", "node_uuid"])
|
||||||
if not ports:
|
if not ports:
|
||||||
continue
|
continue
|
||||||
elif fail:
|
elif fail:
|
||||||
|
@ -216,7 +216,8 @@ class TestLookupNode(base.NodeTest):
|
|||||||
uuid = ir_utils.lookup_node(macs=self.macs, ironic=self.ironic)
|
uuid = ir_utils.lookup_node(macs=self.macs, ironic=self.ironic)
|
||||||
self.assertEqual(self.node.uuid, uuid)
|
self.assertEqual(self.node.uuid, uuid)
|
||||||
self.ironic.port.list.assert_has_calls([
|
self.ironic.port.list.assert_has_calls([
|
||||||
mock.call(address=mac) for mac in self.macs
|
mock.call(address=mac,
|
||||||
|
fields=['uuid', 'node_uuid']) for mac in self.macs
|
||||||
])
|
])
|
||||||
|
|
||||||
def test_lookup_by_mac_duplicates(self):
|
def test_lookup_by_mac_duplicates(self):
|
||||||
@ -228,7 +229,8 @@ class TestLookupNode(base.NodeTest):
|
|||||||
ir_utils.lookup_node,
|
ir_utils.lookup_node,
|
||||||
macs=self.macs, ironic=self.ironic)
|
macs=self.macs, ironic=self.ironic)
|
||||||
self.ironic.port.list.assert_has_calls([
|
self.ironic.port.list.assert_has_calls([
|
||||||
mock.call(address=mac) for mac in self.macs
|
mock.call(address=mac,
|
||||||
|
fields=['uuid', 'node_uuid']) for mac in self.macs
|
||||||
])
|
])
|
||||||
|
|
||||||
def test_lookup_by_bmc_only(self):
|
def test_lookup_by_bmc_only(self):
|
||||||
@ -258,7 +260,8 @@ class TestLookupNode(base.NodeTest):
|
|||||||
ironic=self.ironic)
|
ironic=self.ironic)
|
||||||
self.assertEqual(self.node.uuid, uuid)
|
self.assertEqual(self.node.uuid, uuid)
|
||||||
self.ironic.port.list.assert_has_calls([
|
self.ironic.port.list.assert_has_calls([
|
||||||
mock.call(address=mac) for mac in self.macs
|
mock.call(address=mac,
|
||||||
|
fields=['uuid', 'node_uuid']) for mac in self.macs
|
||||||
])
|
])
|
||||||
self.assertEqual(1, self.ironic.node.list.call_count)
|
self.assertEqual(1, self.ironic.node.list.call_count)
|
||||||
|
|
||||||
@ -273,6 +276,7 @@ class TestLookupNode(base.NodeTest):
|
|||||||
macs=self.macs,
|
macs=self.macs,
|
||||||
ironic=self.ironic)
|
ironic=self.ironic)
|
||||||
self.ironic.port.list.assert_has_calls([
|
self.ironic.port.list.assert_has_calls([
|
||||||
mock.call(address=mac) for mac in self.macs
|
mock.call(address=mac,
|
||||||
|
fields=['uuid', 'node_uuid']) for mac in self.macs
|
||||||
])
|
])
|
||||||
self.assertEqual(1, self.ironic.node.list.call_count)
|
self.assertEqual(1, self.ironic.node.list.call_count)
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes an issue during manual inspection of active nodes
|
||||||
|
where the node uuid was not passed back to the inspector
|
||||||
|
when it tried to identify a matching port.
|
Loading…
Reference in New Issue
Block a user