Substitude class attribute 'parameters' dict to an easier to read individual class attributes.
class FloatingIPFixture(heat.HeatStackFixture): [...] parameters = {'floating_network': CONF.tobiko.neutron.floating_network, 'image': CONF.tobiko.nova.image, 'flavor': CONF.tobiko.nova.flavor} --> class FloatingIPFixture(heat.HeatStackFixture): [...] floating_network = CONF.tobiko.neutron.floating_network image = CONF.tobiko.nova.image, flavor = CONF.tobiko.nova.flavor Change-Id: Ia3f3d6cb21de941426fedb936541d89d2923131d
This commit is contained in:
parent
68e12ff86d
commit
fab88225ab
@ -109,6 +109,14 @@ class HeatStackFixture(tobiko.SharedFixture):
|
||||
if self._parameters:
|
||||
self.parameters.update(self._parameters)
|
||||
|
||||
# Add template's missing stack parameters
|
||||
if 'parameters' in self.template.template:
|
||||
for name in self.template.template['parameters']:
|
||||
if name not in self.parameters:
|
||||
value = getattr(self, name, None)
|
||||
if value is not None:
|
||||
self.parameters[name] = value
|
||||
|
||||
def setup_client(self):
|
||||
client_fixture = self.client_fixture
|
||||
if client_fixture:
|
||||
|
@ -34,9 +34,7 @@ def heat_template_file(template_file):
|
||||
|
||||
class InternalNetworkFixture(heat.HeatStackFixture):
|
||||
template = heat_template_file('internal_network.yaml')
|
||||
parameters = {
|
||||
'floating_network': CONF.tobiko.neutron.floating_network,
|
||||
}
|
||||
floating_network = CONF.tobiko.neutron.floating_network
|
||||
|
||||
|
||||
class SecurityGroupsFixture(heat.HeatStackFixture):
|
||||
|
@ -26,9 +26,9 @@ CONF = config.CONF
|
||||
|
||||
class FloatingIPFixture(heat.HeatStackFixture):
|
||||
template = base.heat_template_file('floating_ip.yaml')
|
||||
parameters = {'floating_network': CONF.tobiko.neutron.floating_network,
|
||||
'image': CONF.tobiko.nova.image,
|
||||
'flavor': CONF.tobiko.nova.flavor}
|
||||
floating_network = CONF.tobiko.neutron.floating_network
|
||||
image = CONF.tobiko.nova.image
|
||||
flavor = CONF.tobiko.nova.flavor
|
||||
internal_network_fixture = base.InternalNetworkFixture
|
||||
internal_network = None
|
||||
|
||||
@ -43,11 +43,11 @@ class FloatingIPFixture(heat.HeatStackFixture):
|
||||
|
||||
|
||||
class FloatingIPWithPortSecurityFixture(FloatingIPFixture):
|
||||
parameters = {'port_security_enabled': True}
|
||||
port_security_enabled = True
|
||||
|
||||
|
||||
class FloatingIPWithSecurityGroupFixture(FloatingIPFixture):
|
||||
parameters = {'port_security_enabled': True}
|
||||
port_security_enabled = True
|
||||
security_groups_fixture = base.SecurityGroupsFixture
|
||||
security_groups = None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user