self.nova.servers.resize(server=vm_id, flavor=new_flavor_id)
vm_state = self.__wait_for_vm(vm_id, "VERIFY_RESIZE")
if vm_state:
- instance_resized_status = self.confirm_resize(vm_id)
+ instance_resized_status = self.confirm_resize(
+ vm_id, instance_status
+ )
return instance_resized_status
else:
raise nvExceptions.BadRequest(
) as e:
self._format_exception(e)
- def confirm_resize(self, vm_id):
+ def confirm_resize(self, vm_id, instance_state):
"""
Confirm the resize of an instance
param:
self._reload_connection()
self.nova.servers.confirm_resize(server=vm_id)
if self.get_vdu_state(vm_id)[0] == "VERIFY_RESIZE":
- self.__wait_for_vm(vm_id, "ACTIVE")
+ self.__wait_for_vm(vm_id, instance_state)
instance_status = self.get_vdu_state(vm_id)[0]
return instance_status
--- /dev/null
+#######################################################################################
+# 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:
+ - |
+ Fix for bug 2316 Unable to do vertical scaling when VM is in shutdown
+ state.