diff options
author | Artom Lifshitz <alifshit@redhat.com> | 2018-11-26 17:05:55 -0500 |
---|---|---|
committer | Artom Lifshitz <alifshit@redhat.com> | 2018-11-26 19:34:09 -0500 |
commit | 3e32e76d83a15bc7bb43aa41c1fefc2ea15d7176 (patch) | |
tree | 12f9ef6131bfcea6cbde445d0e23f3759bb982c9 /nova | |
parent | 594c653dc1a312d0364ad24c703e1a9b228133e1 (diff) | |
download | nova-3e32e76d83a15bc7bb43aa41c1fefc2ea15d7176.tar.gz |
Give drop_move_claim() correct docstring
Previously, there was a just a comment about removing usage on the
destination node. This is incorrect: usage is removed on the compute
host specified by the nodename parameter to the method. This patch
corrects this in a proper docstring.
Change-Id: I2f676966136a78bb9600626852584f838cb08c5b
Diffstat (limited to 'nova')
-rw-r--r-- | nova/compute/resource_tracker.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/nova/compute/resource_tracker.py b/nova/compute/resource_tracker.py index 252f769458..b010defaf5 100644 --- a/nova/compute/resource_tracker.py +++ b/nova/compute/resource_tracker.py @@ -444,8 +444,24 @@ class ResourceTracker(object): @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE) def drop_move_claim(self, context, instance, nodename, instance_type=None, prefix='new_'): - # Remove usage for an incoming/outgoing migration on the destination - # node. + """Remove usage for an incoming/outgoing migration. + + :param context: Security context. + :param instance: The instance whose usage is to be removed. + :param nodename: Host on which to remove usage. If the migration + completed successfully, this is normally the source. + If it did not complete successfully (failed or + reverted), this is normally the destination. + :param instance_type: The flavor that determines the usage to remove. + If the migration completed successfully, this is + the old flavor to be removed from the source. If + the migration did not complete successfully, this + is the new flavor to be removed from the + destination. + :param prefix: Prefix to use when accessing migration context + attributes. 'old_' or 'new_', with 'new_' being the + default. + """ if instance['uuid'] in self.tracked_migrations: migration = self.tracked_migrations.pop(instance['uuid']) |