Fix Bug1832-Use existing flavors with true 35/11535/5
authorpreethika.p <preethika.p@tataelxsi.co.in>
Thu, 20 Jan 2022 07:24:18 +0000 (07:24 +0000)
committersousaedu <eduardo.sousa@canonical.com>
Wed, 26 Jan 2022 11:22:45 +0000 (12:22 +0100)
Change-Id: I0025b2be85c4153f1812ebbb9108ea14b92770c8
Signed-off-by: preethika.p <preethika.p@tataelxsi.co.in>
RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py
releasenotes/notes/Fix_bug_1832-7a437465b9de067c.yaml [new file with mode: 0644]

index dcbf5ca..1083e39 100644 (file)
@@ -1200,7 +1200,7 @@ class vimconnector(vimconn.VimConnector):
                     flavor.vcpus,
                     flavor.disk,
                     flavor.ephemeral,
                     flavor.vcpus,
                     flavor.disk,
                     flavor.ephemeral,
-                    flavor.swap,
+                    flavor.swap if isinstance(flavor.swap, int) else 0,
                 )
                 if flavor_data == flavor_target:
                     return flavor.id
                 )
                 if flavor_data == flavor_target:
                     return flavor.id
diff --git a/releasenotes/notes/Fix_bug_1832-7a437465b9de067c.yaml b/releasenotes/notes/Fix_bug_1832-7a437465b9de067c.yaml
new file mode 100644 (file)
index 0000000..8def9e7
--- /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:
+  - |
+    Fixing bug 1832 - this fixes the usage of use existing flavors with true
+    in vim account for NS deployment with exact matching flavors.
\ No newline at end of file