Verified Commit 06eb748c authored by Loïc Dachary's avatar Loïc Dachary Committed by Loïc Dachary

enough: the network never changes when the stack is updated

There is no need to call create_or_update again because the primary
network is always the same and the secondary network is not known
to the stack.
parent 3eb57b8b
......@@ -100,10 +100,13 @@ class Stack(OpenStackBase):
def create_or_update(self, return_on_create=False):
if self.definition['name'] not in self.list():
info = self.create()
if return_on_create:
return None
info = self.update()
info = self._create_or_update('update', 'Ext-Net')
if not self.only_internal() or self.args.get('route_to_internal', True):
self.wait_for_ssh(info['ipv4'], info['port'])
......@@ -124,23 +127,18 @@ class Stack(OpenStackBase):
return, network)
def update(self):
r = self._create_or_update('update', self.definition.get('network', 'Ext-Net'))
return r
def only_internal(self):
return self.definition.get('network_internal_only', False)
def create(self):
try:'create on network Ext-Net')'create or update')
info = self._create_or_update('create', 'Ext-Net')
except sh.ErrorReturnCode_1:'retry create on network Ext-Net')'retry create or update')
# retry once because there is no way to increase the timeout and create fails often
info = self._create_or_update('update', 'Ext-Net')
return info
def delete_no_wait(self):
name = self.definition['name']
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment