Add minimal_instance_type config option

for integration tests. Use a flavor similar to m1.micro for that.
It is enough to start both minimal and functional tests images with no
serious payload and should decrease the amount of RAM consumed by VMs
in corresponding tests four-fold.

Change-Id: I378b5a3cde020176ac45ebf8d05bd13278861a4e
Related-Bug: #1435285
diff --git a/scenario/scenario_base.py b/scenario/scenario_base.py
index 77c3624..dd25b89 100644
--- a/scenario/scenario_base.py
+++ b/scenario/scenario_base.py
@@ -31,6 +31,11 @@
         if not self.conf.instance_type:
             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',
                      parameters=None, **kwargs):
         template = self._load_template(__file__, template_name, self.sub_dir)
diff --git a/scenario/test_neutron_autoscaling.py b/scenario/test_neutron_autoscaling.py
index 2ba085b..9bbfbab 100644
--- a/scenario/test_neutron_autoscaling.py
+++ b/scenario/test_neutron_autoscaling.py
@@ -20,8 +20,6 @@
 
     def setUp(self):
         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:
             raise self.skipException("No sub-network configured to test")
         self.template_name = 'test_neutron_autoscaling.yaml'
@@ -41,7 +39,7 @@
         parameters = {
             "image_id": self.conf.minimal_image_ref,
             "capacity": "1",
-            "instance_type": self.conf.instance_type,
+            "instance_type": self.conf.minimal_instance_type,
             "fixed_subnet_name": self.conf.fixed_subnet_name,
         }
 
diff --git a/scenario/test_neutron_loadbalancer.py b/scenario/test_neutron_loadbalancer.py
index 0591e5b..bbe85bc 100644
--- a/scenario/test_neutron_loadbalancer.py
+++ b/scenario/test_neutron_loadbalancer.py
@@ -52,7 +52,7 @@
 
         parameters = {
             'key_name': self.keypair_name,
-            'flavor': self.conf.instance_type,
+            'flavor': self.conf.minimal_instance_type,
             'image': self.conf.image_ref,
             'private_subnet_id': self.net['subnets'][0],
             'external_network_id': self.public_net['id']
diff --git a/scenario/test_volumes.py b/scenario/test_volumes.py
index 9b12a9c..79d4931 100644
--- a/scenario/test_volumes.py
+++ b/scenario/test_volumes.py
@@ -119,7 +119,7 @@
         """
         parameters = {
             '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,
             'volume_description': self.volume_description,
             'timeout': self.conf.build_timeout,