summaryrefslogtreecommitdiffstats
path: root/testcases/config_functest.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-02-02 11:25:19 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-02-02 10:30:19 +0000
commit150fd7788251a16bd56d4e88407dc136d5babded (patch)
tree4af771abe5ab27339d84a870be57bc5d0e4fcc5b /testcases/config_functest.py
parent520d85bdc1ec581d26f8ebd90a7b7180ed60c431 (diff)
Small improvements with output messages
Change-Id: I4c274df30bc3123bef23d5423a1762a07dd93e68 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit ac0d556e54a09b5a3470b20384ac58f7ed383202)
Diffstat (limited to 'testcases/config_functest.py')
-rwxr-xr-xtestcases/config_functest.py35
1 files changed, 11 insertions, 24 deletions
diff --git a/testcases/config_functest.py b/testcases/config_functest.py
index 265328df0..21c569cb0 100755
--- a/testcases/config_functest.py
+++ b/testcases/config_functest.py
@@ -162,24 +162,16 @@ def action_check():
dirs = [RALLY_DIR, RALLY_INSTALLATION_DIR, VPING_DIR, ODL_DIR]
for dir in dirs:
if not os.path.exists(dir):
- logger.debug("The directory '%s' does NOT exist." % dir)
+ logger.debug(" %s NOT found" % dir)
errors = True
errors_all = True
else:
logger.debug(" %s found" % dir)
- if not errors:
- logger.debug("...OK")
- else:
- logger.debug("...FAIL")
-
logger.debug("Checking Rally deployment...")
if not check_rally():
logger.debug(" Rally deployment NOT installed.")
errors_all = True
- logger.debug("...FAIL")
- else:
- logger.debug("...OK")
logger.debug("Checking Image...")
errors = False
@@ -191,11 +183,6 @@ def action_check():
logger.debug(" Image file found in %s" % IMAGE_PATH)
- if not errors:
- logger.debug("...OK")
- else:
- logger.debug("...FAIL")
-
#TODO: check OLD environment setup
return not errors_all
@@ -292,21 +279,21 @@ def check_rally():
def create_private_neutron_net(neutron):
neutron.format = 'json'
- logger.info('Creating neutron network %s...' % NEUTRON_PRIVATE_NET_NAME)
+ logger.info("Creating network '%s'..." % NEUTRON_PRIVATE_NET_NAME)
network_id = functest_utils. \
create_neutron_net(neutron, NEUTRON_PRIVATE_NET_NAME)
if not network_id:
return False
- logger.debug("Network '%s' created successfully" % network_id)
+ logger.debug("Network '%s' created successfully." % network_id)
- logger.info('Updating neutron network %s...' % NEUTRON_PRIVATE_NET_NAME)
+ logger.info("Updating network '%s' with shared=True..." % NEUTRON_PRIVATE_NET_NAME)
if functest_utils.update_neutron_net(neutron, network_id, shared=True):
- logger.debug("Network '%s' updated successfully" % network_id)
+ logger.debug("Network '%s' updated successfully." % network_id)
else:
- logger.info('Updating neutron network %s failed' % network_id)
+ logger.info("Updating neutron network '%s' failed" % network_id)
- logger.debug('Creating Subnet....')
+ logger.info("Creating Subnet....")
subnet_id = functest_utils. \
create_neutron_subnet(neutron,
NEUTRON_PRIVATE_SUBNET_NAME,
@@ -314,16 +301,16 @@ def create_private_neutron_net(neutron):
network_id)
if not subnet_id:
return False
- logger.debug("Subnet '%s' created successfully" % subnet_id)
- logger.debug('Creating Router...')
+ logger.debug("Subnet '%s' created successfully." % subnet_id)
+ logger.info("Creating Router...")
router_id = functest_utils. \
create_neutron_router(neutron, NEUTRON_ROUTER_NAME)
if not router_id:
return False
- logger.debug("Router '%s' created successfully" % router_id)
- logger.debug('Adding router to subnet...')
+ logger.debug("Router '%s' created successfully." % router_id)
+ logger.info("Adding router to subnet...")
result = functest_utils.add_interface_router(neutron, router_id, subnet_id)