aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Buil <mbuil@suse.com>2018-10-26 15:46:36 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-10-26 15:46:36 +0000
commit760c7ac9821bd7f649817a8de3f03a1744b34178 (patch)
tree708cc7b4dc2ab02e8dc606d76f099c425eaf5851
parent0393dd3f0a6380e6878d86cbba6883395252738c (diff)
parent30dc33c1dc2c511c5d879ddd4aff8a60dbcdfd99 (diff)
Merge "Add a bit more data to the logging message" into stable/gambia
-rw-r--r--sfc/lib/openstack_utils.py4
-rw-r--r--sfc/unit_tests/unit/lib/test_openstack_utils.py12
2 files changed, 8 insertions, 8 deletions
diff --git a/sfc/lib/openstack_utils.py b/sfc/lib/openstack_utils.py
index dbb217d6..7915e77d 100644
--- a/sfc/lib/openstack_utils.py
+++ b/sfc/lib/openstack_utils.py
@@ -293,7 +293,7 @@ class OpenStackSFC:
'''
Creates a networking-sfc port pair and group
'''
- logger.info("Creating the port pairs...")
+ logger.info("Creating the port pairs for %s" % vm_instance.name)
port_pair = dict()
port_pair['name'] = vm_instance.name + '-connection-points'
port_pair['description'] = 'port pair for ' + vm_instance.name
@@ -316,7 +316,7 @@ class OpenStackSFC:
{'vnf': vm_instance.name})
return None
- logger.info("Creating the port pair groups...")
+ logger.info("Creating the port pair groups for %s" % vm_instance.name)
port_pair_group = {}
port_pair_group['name'] = vm_instance.name + '-port-pair-group'
port_pair_group['description'] = \
diff --git a/sfc/unit_tests/unit/lib/test_openstack_utils.py b/sfc/unit_tests/unit/lib/test_openstack_utils.py
index 2407415e..595aed0e 100644
--- a/sfc/unit_tests/unit/lib/test_openstack_utils.py
+++ b/sfc/unit_tests/unit/lib/test_openstack_utils.py
@@ -676,7 +676,7 @@ class SfcOpenStackUtilsTesting(unittest.TestCase):
"""
mock_vm_ins = mock_vm.return_value
mock_vm_ins.name = 'vm'
- log_calls_info = [call('Creating the port pairs...')]
+ log_calls_info = [call('Creating the port pairs for vm')]
log_calls_err = [call('Only SFs with one or two ports are supported')]
exception_message = "Failed to create port pairs"
vnf_ports = ['p1', 'p2', 'p3']
@@ -698,7 +698,7 @@ class SfcOpenStackUtilsTesting(unittest.TestCase):
"""
mock_vm_ins = mock_vm.return_value
mock_vm_ins.name = 'vm'
- log_calls_info = [call('Creating the port pairs...')]
+ log_calls_info = [call('Creating the port pairs for vm')]
log_calls_warn = [call('Chain creation failed due to port pair '
'creation failed for vnf %(vnf)s', {'vnf': 'vm'})]
mock_port_ins = mock_port.return_value
@@ -724,8 +724,8 @@ class SfcOpenStackUtilsTesting(unittest.TestCase):
"""
mock_vm_ins = mock_vm.return_value
mock_vm_ins.name = 'vm'
- log_calls_info = [call('Creating the port pairs...'),
- call('Creating the port pair groups...')]
+ log_calls_info = [call('Creating the port pairs for vm'),
+ call('Creating the port pair groups for vm')]
log_calls_warn = [call('Chain creation failed due to port pair group '
'creation failed for vnf %(vnf)', 'vm')]
mock_port_ins = mock_port.return_value
@@ -747,8 +747,8 @@ class SfcOpenStackUtilsTesting(unittest.TestCase):
Checks the create_port_groups when everything goes as expected
"""
- log_calls_info = [call('Creating the port pairs...'),
- call('Creating the port pair groups...')]
+ log_calls_info = [call('Creating the port pairs for vm'),
+ call('Creating the port pair groups for vm')]
mock_port_ins = mock_port.return_value
mock_port_ins.id = '123abc'
mock_osvm_ins = mock_osvm.return_value