Add warning messages in vyos_vrouter 04/68104/2
authorCédric Ollivier <cedric.ollivier@orange.com>
Mon, 24 Jun 2019 15:24:54 +0000 (17:24 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Tue, 25 Jun 2019 16:07:28 +0000 (18:07 +0200)
Both Cloudify based testcases print the same warning messages if
NEW_USER_ROLE is admin. An additional whitespace is removed too.

Change-Id: Idf2a2ea4373efdc579f0ac3e0a69ec08a7fbf105
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit b95cdce13a8c51f285e285a3c4332cf1732abadb)

functest/opnfv_tests/vnf/ims/cloudify_ims.py
functest/opnfv_tests/vnf/router/cloudify_vrouter.py

index 288e031..0f6adf9 100644 (file)
@@ -105,7 +105,7 @@ class CloudifyIms(cloudify.Cloudify):
         if env.get('NEW_USER_ROLE').lower() == "admin":
             self.__logger.warn(
                 "Defining NEW_USER_ROLE=admin will easily break the testcase "
-                "because Cloudify doesn't manage tenancy (e.g. subnet  "
+                "because Cloudify doesn't manage tenancy (e.g. subnet "
                 "overlapping)")
 
     def execute(self):
index ee29210..b449d2d 100644 (file)
@@ -21,6 +21,7 @@ from functest.core import cloudify
 from functest.opnfv_tests.vnf.router import vrouter_base
 from functest.opnfv_tests.vnf.router.utilvnf import Utilvnf
 from functest.utils import config
+from functest.utils import env
 from functest.utils import functest_utils
 
 
@@ -110,6 +111,13 @@ class CloudifyVrouter(cloudify.Cloudify):
         self.image_alt = None
         self.flavor_alt = None
 
+    def check_requirements(self):
+        if env.get('NEW_USER_ROLE').lower() == "admin":
+            self.__logger.warn(
+                "Defining NEW_USER_ROLE=admin will easily break the testcase "
+                "because Cloudify doesn't manage tenancy (e.g. subnet "
+                "overlapping)")
+
     def execute(self):
         # pylint: disable=too-many-locals,too-many-statements
         """