Fix black issues 13/12913/2 v10.1.5
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 3 Feb 2023 12:18:16 +0000 (13:18 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 3 Feb 2023 12:53:32 +0000 (13:53 +0100)
Change-Id: I20ea05ba14dae756c740d178b9b0eb00787c1a0d
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
NG-RO/osm_ng_ro/ns_thread.py
NG-RO/osm_ng_ro/vim_admin.py
RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/tests/test_sdn_asssist_juniper_contrail.py
RO-VIM-azure/osm_rovim_azure/vimconn_azure.py
RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py
RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py
releasenotes/notes/fix_black_errors-3fb4e54b00ca93e7.yaml [new file with mode: 0644]

index 62e0f3c..980813f 100644 (file)
@@ -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 = (
index 3350d43..b6e34e1 100644 (file)
@@ -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
index 8ef04e1..144603a 100644 (file)
@@ -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",
index c7e1ef4..a3cced3 100755 (executable)
@@ -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(
index 3379f1a..c51f6b3 100644 (file)
@@ -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:
index 0a220d6..77169ea 100644 (file)
@@ -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 (file)
index 0000000..9967ff8
--- /dev/null
@@ -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.
+