Merge "Add missing white spaces between words"

This commit is contained in:
Zuul 2020-05-25 04:03:37 +00:00 committed by Gerrit Code Review
commit ac6c66f21c
9 changed files with 14 additions and 14 deletions

View File

@ -274,8 +274,8 @@ class VnfPkgmController(wsgi.Controller):
range_ = webob.byterange.Range.parse(range_str) range_ = webob.byterange.Range.parse(range_str)
if range_ is None: if range_ is None:
range_err_msg = _("The byte range passed in the 'Range' header" range_err_msg = _("The byte range passed in the 'Range' header"
"did not match any available byte range in the VNF package" " did not match any available byte range in the VNF package"
"file") " file")
raise webob.exc.HTTPRequestRangeNotSatisfiable( raise webob.exc.HTTPRequestRangeNotSatisfiable(
explanation=range_err_msg) explanation=range_err_msg)
# NOTE(sameert): Ensure that a range like bytes=4- for an zip # NOTE(sameert): Ensure that a range like bytes=4- for an zip

View File

@ -101,7 +101,7 @@ def get_csar_size(package_uuid, location):
try: try:
return glance_store.backend.get_size_from_backend(location) return glance_store.backend.get_size_from_backend(location)
except Exception: except Exception:
LOG.exception("Failed to get csar data from glance store %(location)s" LOG.exception("Failed to get csar data from glance store %(location)s "
"for package %(uuid)s", {"location": location, "uuid": package_uuid}) "for package %(uuid)s", {"location": location, "uuid": package_uuid})
raise exceptions.VnfPackageLocationInvalid(location=location) raise exceptions.VnfPackageLocationInvalid(location=location)
@ -140,7 +140,7 @@ def _get_csar_chunks(package_uuid, location, offset, chunk_size):
chunk_size=chunk_size) chunk_size=chunk_size)
return resp, size return resp, size
except Exception: except Exception:
LOG.exception("Failed to get csar data from glance store %(location)s" LOG.exception("Failed to get csar data from glance store %(location)s "
"for package %(uuid)s", {"location": location, "uuid": package_uuid}) "for package %(uuid)s", {"location": location, "uuid": package_uuid})
raise exceptions.VnfPackageLocationInvalid(location=location) raise exceptions.VnfPackageLocationInvalid(location=location)

View File

@ -337,7 +337,7 @@ class VnfLcmTest(base.BaseTackerTest):
# instantiation_state is set to NOT_INSTANTIATED after # instantiation_state is set to NOT_INSTANTIATED after
# gracefulTerminationTimeout seconds. # gracefulTerminationTimeout seconds.
if timeout and int(time.time()) - start_time < timeout: if timeout and int(time.time()) - start_time < timeout:
self.fail("Vnf is terminated before graceful termination" self.fail("Vnf is terminated before graceful termination "
"timeout period") "timeout period")
def _heal_vnf_instance(self, vnf_instance, request_body, def _heal_vnf_instance(self, vnf_instance, request_body,

View File

@ -276,7 +276,7 @@ class VnfLcmWithUserDataTest(base.BaseTackerTest):
# instantiation_state is set to NOT_INSTANTIATED after # instantiation_state is set to NOT_INSTANTIATED after
# gracefulTerminationTimeout seconds. # gracefulTerminationTimeout seconds.
if timeout and int(time.time()) - start_time < timeout: if timeout and int(time.time()) - start_time < timeout:
self.fail("Vnf is terminated before graceful termination" self.fail("Vnf is terminated before graceful termination "
"timeout period") "timeout period")
# wait for status completion # wait for status completion

View File

@ -138,7 +138,7 @@ class VnfTestReservationMonitor(base.BaseTackerTest):
self.fail("Scaling-in should not contain " self.fail("Scaling-in should not contain "
"mgmt_ip_address") "mgmt_ip_address")
except ValueError: except ValueError:
assert True, ("Management Ip address list for VDU1" assert True, ("Management Ip address list for VDU1 "
"contains null values.") "contains null values.")
elif scale_type == 'scaling-out': elif scale_type == 'scaling-out':
self.assertEqual(vdu_count, len(json.loads( self.assertEqual(vdu_count, len(json.loads(

View File

@ -632,7 +632,7 @@ class TestAttributes(base.BaseTestCase):
del dictionary['key2'] del dictionary['key2']
msg = attributes._validate_dict(dictionary, constraints) msg = attributes._validate_dict(dictionary, constraints)
self.assertIsNone(msg, 'Field that was not required by the specs was' self.assertIsNone(msg, 'Field that was not required by the specs was '
'required by the validator.') 'required by the validator.')
def test_validate_dict_required_keys(self): def test_validate_dict_required_keys(self):

View File

@ -643,7 +643,7 @@ class TestVnflcmDriver(db_base.SqlTestCase):
self.assertEqual(None, vnf_instance.task_state) self.assertEqual(None, vnf_instance.task_state)
expected_msg = ('Failed to update vnf %(id)s resources for ' expected_msg = ('Failed to update vnf %(id)s resources for '
'instance%(instance)s. Error: %(error)s') 'instance %(instance)s. Error: %(error)s')
mock_log.error.assert_called_with(expected_msg, mock_log.error.assert_called_with(expected_msg,
{'id': vnf_instance.id, {'id': vnf_instance.id,
'instance': vnf_instance.instantiated_vnf_info.instance_id, 'instance': vnf_instance.instantiated_vnf_info.instance_id,

View File

@ -338,7 +338,7 @@ class VnfLcmDriver(abstract_driver.VnfInstanceAbstractDriver):
context=context, vnf_instance=vnf_instance, context=context, vnf_instance=vnf_instance,
vim_connection_info=vim_connection_info) vim_connection_info=vim_connection_info)
except Exception as exp: except Exception as exp:
LOG.error("Failed to update vnf %(id)s resources for instance" LOG.error("Failed to update vnf %(id)s resources for instance "
"%(instance)s. Error: %(error)s", "%(instance)s. Error: %(error)s",
{'id': vnf_instance.id, 'instance': {'id': vnf_instance.id, 'instance':
inst_vnf_info.instance_id, 'error': inst_vnf_info.instance_id, 'error':

View File

@ -632,7 +632,7 @@ class OpenStack(abstract_driver.VnfAbstractDriver,
except Exception as exp: except Exception as exp:
with excutils.save_and_reraise_exception(): with excutils.save_and_reraise_exception():
exp.reraise = False exp.reraise = False
LOG.error("Failed to create image %(name)s for vnf %(id)s" LOG.error("Failed to create image %(name)s for vnf %(id)s "
"due to error: %(error)s", "due to error: %(error)s",
{"name": name, "id": vnf_instance.id, {"name": name, "id": vnf_instance.id,
"error": encodeutils.exception_to_unicode(exp)}) "error": encodeutils.exception_to_unicode(exp)})
@ -658,7 +658,7 @@ class OpenStack(abstract_driver.VnfAbstractDriver,
except Exception as exp: except Exception as exp:
with excutils.save_and_reraise_exception(): with excutils.save_and_reraise_exception():
exp.reraise = False exp.reraise = False
LOG.error("Image %(name)s not active for vnf %(id)s" LOG.error("Image %(name)s not active for vnf %(id)s "
"error: %(error)s", "error: %(error)s",
{"name": name, "id": vnf_instance.id, {"name": name, "id": vnf_instance.id,
"error": encodeutils.exception_to_unicode(exp)}) "error": encodeutils.exception_to_unicode(exp)})
@ -714,14 +714,14 @@ class OpenStack(abstract_driver.VnfAbstractDriver,
@log.log @log.log
def delete_vnf_instance_resource(self, context, vnf_instance, def delete_vnf_instance_resource(self, context, vnf_instance,
vim_connection_info, vnf_resource): vim_connection_info, vnf_resource):
LOG.info("Deleting resource '%(name)s' of type ' %(type)s' for vnf" LOG.info("Deleting resource '%(name)s' of type ' %(type)s' for vnf "
"%(id)s", {"type": vnf_resource.resource_type, "%(id)s", {"type": vnf_resource.resource_type,
"name": vnf_resource.resource_name, "name": vnf_resource.resource_name,
"id": vnf_instance.id}) "id": vnf_instance.id})
glance_client = gc.GlanceClient(vim_connection_info) glance_client = gc.GlanceClient(vim_connection_info)
try: try:
glance_client.delete(vnf_resource.resource_identifier) glance_client.delete(vnf_resource.resource_identifier)
LOG.info("Deleted resource '%(name)s' of type ' %(type)s' for vnf" LOG.info("Deleted resource '%(name)s' of type ' %(type)s' for vnf "
"%(id)s", {"type": vnf_resource.resource_type, "%(id)s", {"type": vnf_resource.resource_type,
"name": vnf_resource.resource_name, "name": vnf_resource.resource_name,
"id": vnf_instance.id}) "id": vnf_instance.id})