Merge PR #31914 into master

* refs/pull/31914/head:
	mgr/orchestrator: set node labels to empty list if none specified

Reviewed-by: Joshua Schmid <jschmid@suse.de>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
This commit is contained in:
Sage Weil 2019-11-28 08:54:19 -06:00
commit be6dd892e4
2 changed files with 4 additions and 0 deletions

View File

@ -108,3 +108,5 @@ mgfritch Michael Fritch <mfritch@suse.com>
xiaoxichen Xiaoxi Chen <superdebuger@gmail.com>
toabctl Thomas Bechtold <tbechtold@suse.com>
dsavineau Dimitri Savineau <dsavinea@redhat.com>
jschmid1 Joshua Schmid <jschmid@suse.de>
bk201 Kiefer Chang <kiefer.chang@suse.com>

View File

@ -1296,6 +1296,8 @@ class InventoryNode(object):
# type: (str, inventory.Devices, List[str]) -> None
if devices is None:
devices = inventory.Devices([])
if labels is None:
labels = []
assert isinstance(devices, inventory.Devices)
self.name = name # unique within cluster. For example a hostname.