Fix Bug1832-Use existing flavors with true
Change-Id: I0025b2be85c4153f1812ebbb9108ea14b92770c8
Signed-off-by: preethika.p <preethika.p@tataelxsi.co.in>
diff --git a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py
index dcbf5ca..1083e39 100644
--- a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py
+++ b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py
@@ -1200,7 +1200,7 @@
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
diff --git a/releasenotes/notes/Fix_bug_1832-7a437465b9de067c.yaml b/releasenotes/notes/Fix_bug_1832-7a437465b9de067c.yaml
new file mode 100644
index 0000000..8def9e7
--- /dev/null
+++ b/releasenotes/notes/Fix_bug_1832-7a437465b9de067c.yaml
@@ -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