Fix flake8 errors in vCD connector 27/12427/3 v11.0 v11.0.4
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 4 Aug 2022 13:33:12 +0000 (15:33 +0200)
committeraticig <gulsum.atici@canonical.com>
Thu, 4 Aug 2022 14:32:18 +0000 (17:32 +0300)
Change-Id: I51224b8103df1013d34f1f6daf886e59a8a94cc2
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py
releasenotes/notes/fix_flake8_errors_vcd_connector-439b3773f861015e.yaml [new file with mode: 0644]

index 0a220d6..b0a6ed3 100644 (file)
@@ -5458,18 +5458,18 @@ class vimconnector(vimconn.VimConnector):
                     return None
 
                 if add_vdc_rest_url is not None and provider_vdc_ref is not None:
-                    data = """ <CreateVdcParams name="{0:s}" xmlns="http://www.vmware.com/vcloud/v1.5"><Description>{1:s}</Description>
-                            <AllocationModel>ReservationPool</AllocationModel>
-                            <ComputeCapacity><Cpu><Units>MHz</Units><Allocated>2048</Allocated><Limit>2048</Limit></Cpu>
-                            <Memory><Units>MB</Units><Allocated>2048</Allocated><Limit>2048</Limit></Memory>
-                            </ComputeCapacity><NicQuota>0</NicQuota><NetworkQuota>100</NetworkQuota>
-                            <VdcStorageProfile><Enabled>true</Enabled><Units>MB</Units><Limit>20480</Limit><Default>true</Default></VdcStorageProfile>
-                            <ProviderVdcReference
-                            name="Main Provider"
-                            href="{2:s}" />
-                    <UsesFastProvisioning>true</UsesFastProvisioning></CreateVdcParams>""".format(
-                        escape(vdc_name), escape(vdc_name), provider_vdc_ref
-                    )
+                    data = (
+                        ' <CreateVdcParams name="{0:s}" xmlns="http://www.vmware.com/vcloud/v1.5">'
+                        "<Description>{1:s}</Description>"
+                        "<AllocationModel>ReservationPool</AllocationModel>"
+                        "<ComputeCapacity><Cpu><Units>MHz</Units><Allocated>2048</Allocated><Limit>2048</Limit>"
+                        "</Cpu><Memory><Units>MB</Units><Allocated>2048</Allocated><Limit>2048</Limit></Memory>"
+                        "</ComputeCapacity><NicQuota>0</NicQuota><NetworkQuota>100</NetworkQuota>"
+                        "<VdcStorageProfile><Enabled>true</Enabled><Units>MB</Units><Limit>20480</Limit>"
+                        "<Default>true</Default></VdcStorageProfile>"
+                        '<ProviderVdcReference name="Main Provider" href="{2:s}" />'
+                        "<UsesFastProvisioning>true</UsesFastProvisioning></CreateVdcParams>"
+                    ).format(escape(vdc_name), escape(vdc_name), provider_vdc_ref)
                     headers[
                         "Content-Type"
                     ] = "application/vnd.vmware.admin.createVdcParams+xml"
diff --git a/releasenotes/notes/fix_flake8_errors_vcd_connector-439b3773f861015e.yaml b/releasenotes/notes/fix_flake8_errors_vcd_connector-439b3773f861015e.yaml
new file mode 100644 (file)
index 0000000..96b80fd
--- /dev/null
@@ -0,0 +1,21 @@
+#######################################################################################
+# 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.
+#######################################################################################
+---
+fixes:
+  - |
+    This change fixes flake8 errors in vCD connector files, hidden in previous
+    execution of flake8 tests.
\ No newline at end of file