Merge "Add minimal_instance_type config option"
This commit is contained in:
commit
d8e45bab02
@ -38,6 +38,8 @@ IntegrationTestGroup = [
|
|||||||
cfg.StrOpt('instance_type',
|
cfg.StrOpt('instance_type',
|
||||||
help="Instance type for tests. Needs to be big enough for a "
|
help="Instance type for tests. Needs to be big enough for a "
|
||||||
"full OS plus the test workload"),
|
"full OS plus the test workload"),
|
||||||
|
cfg.StrOpt('minimal_instance_type',
|
||||||
|
help="Instance type enough for simplest cases."),
|
||||||
cfg.StrOpt('image_ref',
|
cfg.StrOpt('image_ref',
|
||||||
help="Name of image to use for tests which boot servers."),
|
help="Name of image to use for tests which boot servers."),
|
||||||
cfg.StrOpt('keypair_name',
|
cfg.StrOpt('keypair_name',
|
||||||
|
@ -22,8 +22,9 @@ class StackValidationTest(test.HeatIntegrationTest):
|
|||||||
if not self.conf.minimal_image_ref:
|
if not self.conf.minimal_image_ref:
|
||||||
raise self.skipException("No image configured to test")
|
raise self.skipException("No image configured to test")
|
||||||
|
|
||||||
if not self.conf.instance_type:
|
if not self.conf.minimal_instance_type:
|
||||||
raise self.skipException("No instance_type configured to test")
|
raise self.skipException(
|
||||||
|
"No minimal_instance_type configured to test")
|
||||||
|
|
||||||
self.assign_keypair()
|
self.assign_keypair()
|
||||||
|
|
||||||
@ -72,7 +73,7 @@ resources:
|
|||||||
env = {'resource_registry':
|
env = {'resource_registry':
|
||||||
{'My::Config': 'provider.yaml'}}
|
{'My::Config': 'provider.yaml'}}
|
||||||
parameters = {'keyname': self.keypair_name,
|
parameters = {'keyname': self.keypair_name,
|
||||||
'flavor': self.conf.instance_type,
|
'flavor': self.conf.minimal_instance_type,
|
||||||
'image': self.conf.minimal_image_ref}
|
'image': self.conf.minimal_image_ref}
|
||||||
# Note we don't wait for CREATE_COMPLETE, because we're using a
|
# Note we don't wait for CREATE_COMPLETE, because we're using a
|
||||||
# minimal image without the tools to apply the config.
|
# minimal image without the tools to apply the config.
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
# workload (string value)
|
# workload (string value)
|
||||||
#instance_type = <None>
|
#instance_type = <None>
|
||||||
|
|
||||||
|
# Instance type enough for simplest cases. (string value)
|
||||||
|
#minimal_instance_type = <None>
|
||||||
|
|
||||||
# Name of image to use for tests which boot servers. (string value)
|
# Name of image to use for tests which boot servers. (string value)
|
||||||
#image_ref = <None>
|
#image_ref = <None>
|
||||||
|
|
||||||
|
@ -24,9 +24,11 @@ source $DEST/devstack/inc/ini-config
|
|||||||
|
|
||||||
cd $DEST/heat/heat_integrationtests
|
cd $DEST/heat/heat_integrationtests
|
||||||
|
|
||||||
# Register the flavor for booting test servers
|
# Register the flavors for booting test servers
|
||||||
iniset heat_integrationtests.conf DEFAULT instance_type m1.heat_int
|
iniset heat_integrationtests.conf DEFAULT instance_type m1.heat_int
|
||||||
|
iniset heat_integrationtests.conf DEFAULT minimal_instance_type m1.heat_micro
|
||||||
nova flavor-create m1.heat_int 452 512 0 1
|
nova flavor-create m1.heat_int 452 512 0 1
|
||||||
|
nova flavor-create m1.heat_micro 453 128 0 1
|
||||||
|
|
||||||
# Register the glance image for testing
|
# Register the glance image for testing
|
||||||
glance image-create --name fedora-heat-test-image --disk-format qcow2 --container-format bare --is-public True --location http://tarballs.openstack.org/heat-test-image/fedora-heat-test-image.qcow2
|
glance image-create --name fedora-heat-test-image --disk-format qcow2 --container-format bare --is-public True --location http://tarballs.openstack.org/heat-test-image/fedora-heat-test-image.qcow2
|
||||||
@ -34,4 +36,4 @@ iniset heat_integrationtests.conf DEFAULT image_ref fedora-heat-test-image
|
|||||||
iniset heat_integrationtests.conf DEFAULT boot_config_env $DEST/heat-templates/hot/software-config/boot-config/test_image_env.yaml
|
iniset heat_integrationtests.conf DEFAULT boot_config_env $DEST/heat-templates/hot/software-config/boot-config/test_image_env.yaml
|
||||||
iniset heat_integrationtests.conf DEFAULT minimal_image_ref cirros-0.3.2-x86_64-uec
|
iniset heat_integrationtests.conf DEFAULT minimal_image_ref cirros-0.3.2-x86_64-uec
|
||||||
|
|
||||||
cat heat_integrationtests.conf
|
cat heat_integrationtests.conf
|
||||||
|
@ -31,6 +31,11 @@ class ScenarioTestsBase(test.HeatIntegrationTest):
|
|||||||
if not self.conf.instance_type:
|
if not self.conf.instance_type:
|
||||||
raise self.skipException("No flavor configured to test")
|
raise self.skipException("No flavor configured to test")
|
||||||
|
|
||||||
|
if not self.conf.minimal_image_ref:
|
||||||
|
raise self.skipException("No minimal image configured to test")
|
||||||
|
if not self.conf.minimal_instance_type:
|
||||||
|
raise self.skipException("No minimal flavor configured to test")
|
||||||
|
|
||||||
def launch_stack(self, template_name, expected_status='CREATE_COMPLETE',
|
def launch_stack(self, template_name, expected_status='CREATE_COMPLETE',
|
||||||
parameters=None, **kwargs):
|
parameters=None, **kwargs):
|
||||||
template = self._load_template(__file__, template_name, self.sub_dir)
|
template = self._load_template(__file__, template_name, self.sub_dir)
|
||||||
|
@ -20,8 +20,6 @@ class NeutronAutoscalingTest(scenario_base.ScenarioTestsBase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(NeutronAutoscalingTest, self).setUp()
|
super(NeutronAutoscalingTest, self).setUp()
|
||||||
if not self.conf.minimal_image_ref:
|
|
||||||
raise self.skipException("No minimal image configured to test")
|
|
||||||
if not self.conf.fixed_subnet_name:
|
if not self.conf.fixed_subnet_name:
|
||||||
raise self.skipException("No sub-network configured to test")
|
raise self.skipException("No sub-network configured to test")
|
||||||
self.template_name = 'test_neutron_autoscaling.yaml'
|
self.template_name = 'test_neutron_autoscaling.yaml'
|
||||||
@ -41,7 +39,7 @@ class NeutronAutoscalingTest(scenario_base.ScenarioTestsBase):
|
|||||||
parameters = {
|
parameters = {
|
||||||
"image_id": self.conf.minimal_image_ref,
|
"image_id": self.conf.minimal_image_ref,
|
||||||
"capacity": "1",
|
"capacity": "1",
|
||||||
"instance_type": self.conf.instance_type,
|
"instance_type": self.conf.minimal_instance_type,
|
||||||
"fixed_subnet_name": self.conf.fixed_subnet_name,
|
"fixed_subnet_name": self.conf.fixed_subnet_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ class NeutronLoadBalancerTest(scenario_base.ScenarioTestsBase):
|
|||||||
|
|
||||||
parameters = {
|
parameters = {
|
||||||
'key_name': self.keypair_name,
|
'key_name': self.keypair_name,
|
||||||
'flavor': self.conf.instance_type,
|
'flavor': self.conf.minimal_instance_type,
|
||||||
'image': self.conf.image_ref,
|
'image': self.conf.image_ref,
|
||||||
'private_subnet_id': self.net['subnets'][0],
|
'private_subnet_id': self.net['subnets'][0],
|
||||||
'external_network_id': self.public_net['id']
|
'external_network_id': self.public_net['id']
|
||||||
|
@ -119,7 +119,7 @@ class VolumeBackupRestoreIntegrationTest(scenario_base.ScenarioTestsBase):
|
|||||||
"""
|
"""
|
||||||
parameters = {
|
parameters = {
|
||||||
'key_name': self.keypair_name,
|
'key_name': self.keypair_name,
|
||||||
'instance_type': self.conf.instance_type,
|
'instance_type': self.conf.minimal_instance_type,
|
||||||
'image_id': self.conf.minimal_image_ref,
|
'image_id': self.conf.minimal_image_ref,
|
||||||
'volume_description': self.volume_description,
|
'volume_description': self.volume_description,
|
||||||
'timeout': self.conf.build_timeout,
|
'timeout': self.conf.build_timeout,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user