summaryrefslogtreecommitdiff
path: root/nova/objects
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-09-01 18:16:11 +0000
committerGerrit Code Review <review@openstack.org>2022-09-01 18:16:11 +0000
commit2925fd1427315ec5ccf80c56d3325c41ab90f11f (patch)
treeb36f3c827aa465c26d330f0160fdfc6aef083d61 /nova/objects
parent40ca5e169ac078177c49fc6386e201175dea1a53 (diff)
parentab439dadb174f28ae87aea3a9265cf5adcf96eb4 (diff)
downloadnova-2925fd1427315ec5ccf80c56d3325c41ab90f11f.tar.gz
Merge "Heal allocation for same host resize"
Diffstat (limited to 'nova/objects')
-rw-r--r--nova/objects/migration.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/objects/migration.py b/nova/objects/migration.py
index 7e340ceb78..6f5f217b80 100644
--- a/nova/objects/migration.py
+++ b/nova/objects/migration.py
@@ -215,6 +215,10 @@ class Migration(base.NovaPersistentObject, base.NovaObject):
def is_resize(self):
return self.migration_type == fields.MigrationType.RESIZE
+ @property
+ def is_same_host_resize(self):
+ return self.is_resize and self.source_node == self.dest_node
+
@base.NovaObjectRegistry.register
class MigrationList(base.ObjectListBase, base.NovaObject):