Remove unused disk_capacity field

The fields disk and disk_capacity have the same value,
we just need one, so remove disk_capacity field.
Partially Implements: blueprint improve-compute-data-model

Change-Id: If3d385c5e61713bbdc85e22f10cd75e161ff79f0
This commit is contained in:
licanwei
2019-08-12 15:02:43 +08:00
parent d55bb1fa95
commit 99cd009805
7 changed files with 5 additions and 27 deletions

View File

@@ -349,13 +349,7 @@ class NovaModelBuilder(base.BaseModelBuilder):
"memory": memory_mb,
"memory_ratio": memory_ratio,
"memory_mb_reserved": memory_mb_reserved,
# The node.free_disk_gb does not take allocation ratios used
# for overcommit into account so this value may be negative.
# We do not need this field and plan to set disk to total disk
# capacity and then remove disk_capacity.
"disk": disk_capacity,
# TODO(licanwei): remove and replace by disk field
"disk_capacity": disk_capacity,
"disk_gb_reserved": disk_gb_reserved,
"disk_ratio": disk_ratio,
"vcpus": vcpus,
@@ -408,7 +402,6 @@ class NovaModelBuilder(base.BaseModelBuilder):
"name": instance.name,
"memory": flavor["ram"],
"disk": flavor["disk"],
"disk_capacity": flavor["disk"],
"vcpus": flavor["vcpus"],
"state": getattr(instance, "OS-EXT-STS:vm_state"),
"metadata": instance.metadata,