Use CirrosImageFixture in existing stacks

Change-Id: I0fc085a6c5320458c29c48a1cdf04a562e6f0a60
This commit is contained in:
Federico Ressi 2019-06-19 08:22:39 +02:00
parent c82bc00ce6
commit 7668c64bbc
1 changed files with 16 additions and 7 deletions

View File

@ -21,6 +21,7 @@ import tobiko
from tobiko import config from tobiko import config
from tobiko.openstack import heat from tobiko.openstack import heat
from tobiko.openstack import neutron from tobiko.openstack import neutron
from tobiko.openstack import images
from tobiko.openstack.stacks import _hot from tobiko.openstack.stacks import _hot
from tobiko.openstack.stacks import _nova from tobiko.openstack.stacks import _nova
from tobiko.shell import ssh from tobiko.shell import ssh
@ -164,17 +165,25 @@ class FloatingIpServerStackFixture(heat.HeatStackFixture):
network_stack = tobiko.required_setup_fixture(NetworkStackFixture) network_stack = tobiko.required_setup_fixture(NetworkStackFixture)
#: Glance image used to create a Nova server instance #: Glance image used to create a Nova server instance
image = CONF.tobiko.nova.image image_fixture = tobiko.required_setup_fixture(images.CirrosImageFixture)
@property
def image(self):
return self.image_fixture.image_id
@property
def username(self):
"""username used to login to a Nova server instance"""
return self.image_fixture.username
@property
def password(self):
"""password used to login to a Nova server instance"""
return self.image_fixture.password
#: Nova flavor used to create a Nova server instance #: Nova flavor used to create a Nova server instance
flavor = CONF.tobiko.nova.flavor flavor = CONF.tobiko.nova.flavor
#: username used to login to a Nova server instance
username = CONF.tobiko.nova.username
#: password used to login to a Nova server instance
password = CONF.tobiko.nova.password
#: Whenever port security on internal network is enable #: Whenever port security on internal network is enable
port_security_enabled = False port_security_enabled = False