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()
|
||||
for mac in macs:
|
||||
ports = ironic.port.list(address=mac)
|
||||
ports = ironic.port.list(address=mac, fields=["uuid", "node_uuid"])
|
||||
if not ports:
|
||||
continue
|
||||
elif fail:
|
||||
|
@ -216,7 +216,8 @@ class TestLookupNode(base.NodeTest):
|
||||
uuid = ir_utils.lookup_node(macs=self.macs, ironic=self.ironic)
|
||||
self.assertEqual(self.node.uuid, uuid)
|
||||
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):
|
||||
@ -228,7 +229,8 @@ class TestLookupNode(base.NodeTest):
|
||||
ir_utils.lookup_node,
|
||||
macs=self.macs, ironic=self.ironic)
|
||||
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):
|
||||
@ -258,7 +260,8 @@ class TestLookupNode(base.NodeTest):
|
||||
ironic=self.ironic)
|
||||
self.assertEqual(self.node.uuid, uuid)
|
||||
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)
|
||||
|
||||
@ -273,6 +276,7 @@ class TestLookupNode(base.NodeTest):
|
||||
macs=self.macs,
|
||||
ironic=self.ironic)
|
||||
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)
|
||||
|
@ -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