mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-03-27 03:13:10 +00:00
Merge pull request #73 from 0xFelix/avoid-empty-groups
fix: Return early to avoid adding empty groups.
This commit is contained in:
@@ -461,6 +461,10 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
f"Error fetching VirtualMachineInstance list: {self.format_dynamic_api_exc(exc)}"
|
||||
) from exc
|
||||
|
||||
if not vmi_list.items:
|
||||
# Return early if no VMIs were found to avoid adding empty groups.
|
||||
return
|
||||
|
||||
services = self.get_ssh_services_for_namespace(client, namespace)
|
||||
|
||||
name = self._sanitize_group_name(name)
|
||||
|
||||
Reference in New Issue
Block a user