Commit 733880a6 authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis Committed by Klaus Aehlig
Browse files

Fix network info in case of multi NIC instances



Network query mechanism fills inst_list field with the list of
instances that are connected to the corresponding network.
Fix the case of multi NIC instances where the NIC scan stopped
once a matching network was found.
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent de23298f
...@@ -466,8 +466,8 @@ class NetworkQuery(QueryBase): ...@@ -466,8 +466,8 @@ class NetworkQuery(QueryBase):
for instance in all_instances.values(): for instance in all_instances.values():
for nic in instance.nics: for nic in instance.nics:
if nic.network in network_uuids: if nic.network in network_uuids:
network_to_instances[nic.network].append(instance.name) if instance.name not in network_to_instances[nic.network]:
break network_to_instances[nic.network].append(instance.name)
if query.NETQ_STATS in self.requested_data: if query.NETQ_STATS in self.requested_data:
stats = \ stats = \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment