Allow wait: false when auto_ip is false

There is an issue with the logic that results in a failure
to create a server when auto_ip is false. This patch tests
for the bool value of auto_ip and the two lists rather that
None.

Closes-Bug: #2049046
Change-Id: I2664c087c4bde83c4033ab3eb9d3e97dafb9e5cb
Signed-off-by: James Denton <james.denton@rackspace.com>
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
James Denton
2024-01-11 07:54:40 -06:00
committed by Kevin Carter
parent 3df5c38ca6
commit d4f25d2282
2 changed files with 43 additions and 1 deletions

View File

@@ -1032,7 +1032,7 @@ class ServerModule(OpenStackModule):
def _create(self):
for k in ['auto_ip', 'floating_ips', 'floating_ip_pools']:
if self.params[k] is not None \
if self.params[k] \
and self.params['wait'] is False:
# floating ip addresses will only be added if
# we wait until the server has been created