From 762e3d53788f2b146176ef9e521d905134388aae Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Mon, 12 Sep 2016 15:56:03 -0400 Subject: [PATCH] Add note about display_name in _populate_instance_names The None check on instance.display_name in _populate_instance_names is confusing since it's a required field in the REST API. The check is really only there now for unit test simplicity, so add a note to avoid confusion. Change-Id: I5229892a600ce1526b6842da6082b105bb98e2a0 --- nova/compute/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nova/compute/api.py b/nova/compute/api.py index 0a05b91ba299..b75f4e86710e 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1356,6 +1356,8 @@ class API(base.Base): else: hostname = None + # NOTE(mriedem): This is only here for test simplicity since a server + # name is required in the REST API. if display_name is None: display_name = self._default_display_name(instance.uuid) instance.display_name = display_name