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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user