Add flavor creation in functest env prepare
authorjose.lausuch <jose.lausuch@ericsson.com>
Thu, 2 Feb 2017 16:33:44 +0000 (17:33 +0100)
committerjose.lausuch <jose.lausuch@ericsson.com>
Thu, 2 Feb 2017 16:35:33 +0000 (17:35 +0100)
So far, healthcheck.sh was creating m1.tiny flavor.
We are planning to remove that script and replace it by
SNAPS api and connection check.

Althought, a better approach to this would be that all
the tests create the flavor if needed, but these are the
tests that rely on this flavor:
 - vping ssh
 - vping userdata
 - rally
 - tempest
 - onos_sfc

Change-Id: I537f68a55d733b24b6b15f5cf3710bca40fbc622
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
functest/ci/prepare_env.py

index 8bbdf18..b3e5902 100755 (executable)
@@ -261,6 +261,14 @@ def install_tempest():
                              error_msg="Problem while installing Tempest.")
 
 
+def create_flavor():
+    os_utils.get_or_create_flavor('m1.tiny',
+                                  '512',
+                                  '1',
+                                  '1',
+                                  public=True)
+
+
 def check_environment():
     msg_not_active = "The Functest environment is not installed."
     if not os.path.isfile(CONST.env_active):
@@ -290,6 +298,7 @@ def main(**kwargs):
         verify_deployment()
         install_rally()
         install_tempest()
+        create_flavor()
 
         with open(CONST.env_active, "w") as env_file:
             env_file.write("1")