From: garciadeblas Date: Fri, 3 Feb 2023 12:18:16 +0000 (+0100) Subject: Fix black issues X-Git-Tag: v10.1.5 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=a7b2a80f50a4fcdcb1d6daa8cd19a9db045c5db9;p=osm%2FRO.git Fix black issues Change-Id: I20ea05ba14dae756c740d178b9b0eb00787c1a0d Signed-off-by: garciadeblas --- diff --git a/NG-RO/osm_ng_ro/ns_thread.py b/NG-RO/osm_ng_ro/ns_thread.py index 62e0f3c5..980813f6 100644 --- a/NG-RO/osm_ng_ro/ns_thread.py +++ b/NG-RO/osm_ng_ro/ns_thread.py @@ -977,7 +977,6 @@ class VimInteractionSdnNet(VimInteractionBase): return self.new(ro_task, task_create_index, None) def new(self, ro_task, task_index, task_depends): - task = ro_task["tasks"][task_index] task_id = task["task_id"] target_vim = self.my_vims[ro_task["target_id"]] @@ -2185,7 +2184,10 @@ class NsWorker(threading.Thread): ) if task["action"] == "DELETE": - (new_status, db_vim_info_update,) = self._delete_task( + ( + new_status, + db_vim_info_update, + ) = self._delete_task( ro_task, task_index, task_depends, db_ro_task_update ) new_status = ( diff --git a/NG-RO/osm_ng_ro/vim_admin.py b/NG-RO/osm_ng_ro/vim_admin.py index 3350d434..b6e34e11 100644 --- a/NG-RO/osm_ng_ro/vim_admin.py +++ b/NG-RO/osm_ng_ro/vim_admin.py @@ -39,7 +39,6 @@ class VimAdminException(Exception): class LockRenew: - renew_list = [] # ^ static method, common for all RO. Time ordered list of dictionaries with information of locks that needs to # be renewed. The time order is achieved as it is appended at the end diff --git a/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/tests/test_sdn_asssist_juniper_contrail.py b/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/tests/test_sdn_asssist_juniper_contrail.py index 8ef04e1b..144603a2 100644 --- a/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/tests/test_sdn_asssist_juniper_contrail.py +++ b/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/tests/test_sdn_asssist_juniper_contrail.py @@ -35,7 +35,6 @@ class TestJuniperContrail(unittest.TestCase): @patch("osm_rosdn_juniper_contrail.sdn_api.UnderlayApi") def test_juniper_contrail_sdn_with_ssl_cert(self, mock_underlay_api): - config = { "ca_cert": "/path/to/certfile", "project": "test_project", diff --git a/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py b/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py index c7e1ef4f..a3cced37 100755 --- a/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py +++ b/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py @@ -57,7 +57,6 @@ def find_in_list(the_list, condition_lambda): class vimconnector(vimconn.VimConnector): - # Translate azure provisioning state to OSM provision state # The first three ones are the transitional status once a user initiated action has been requested # Once the operation is complete, it will transition into the states Succeeded or Failed @@ -995,7 +994,6 @@ class vimconnector(vimconn.VimConnector): self._format_vimconn_exception(e) def _build_os_profile(self, vm_name, cloud_config, image_id): - # initial os_profile os_profile = {"computer_name": vm_name} @@ -1426,7 +1424,6 @@ class vimconnector(vimconn.VimConnector): self._format_vimconn_exception(e) def delete_inuse_nic(self, nic_name): - # Obtain nic data nic_data = self.conn_vnet.network_interfaces.get(self.resource_group, nic_name) @@ -1449,7 +1446,6 @@ class vimconnector(vimconn.VimConnector): # TODO - check if there is a public ip to delete and delete it if network_interfaces: - # Deallocate the vm async_vm_deallocate = ( self.conn_compute.virtual_machines.begin_deallocate( diff --git a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py index 3379f1ae..c51f6b39 100644 --- a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py +++ b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py @@ -2479,7 +2479,8 @@ class vimconnector(vimconn.VimConnector): def action_vminstance(self, vm_id, action_dict, created_items={}): """Send and action over a VM instance from VIM - Returns None or the console dict if the action was successfully sent to the VIM""" + Returns None or the console dict if the action was successfully sent to the VIM + """ self.logger.debug("Action over VM '%s': %s", vm_id, str(action_dict)) try: diff --git a/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py b/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py index 0a220d6b..77169ead 100644 --- a/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py +++ b/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py @@ -936,7 +936,8 @@ class vimconnector(vimconn.VimConnector): def get_network(self, net_id): """Method obtains network details of net_id VIM network - Return a dict with the fields at filter_dict (see get_network_list) plus some VIM specific>}, ...]""" + Return a dict with the fields at filter_dict (see get_network_list) plus some VIM specific>}, ...] + """ try: _, vdc = self.get_vdc_details() vdc_id = vdc.get("id").split(":")[3] diff --git a/releasenotes/notes/fix_black_errors-3fb4e54b00ca93e7.yaml b/releasenotes/notes/fix_black_errors-3fb4e54b00ca93e7.yaml new file mode 100644 index 00000000..9967ff87 --- /dev/null +++ b/releasenotes/notes/fix_black_errors-3fb4e54b00ca93e7.yaml @@ -0,0 +1,22 @@ +####################################################################################### +# Copyright ETSI Contributors and Others. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. +####################################################################################### +--- +other: + - | + Fix black errors in all the files that prevented launching new point + releases due to stage2 failure. +