Commit 5b49ed09 authored by René Nussbaumer's avatar René Nussbaumer
Browse files

Adding basic elements for the new node params



This patch adds the new fields to the objects.py as well as defines the
constants used in the dicts and their type.
Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 82cce526
......@@ -822,6 +822,36 @@ HV_KVM_MIGRATION_VALID_STATUSES = HV_MIGRATION_VALID_STATUSES
# Node info keys
HV_NODEINFO_KEY_VERSION = "hv_version"
# Hypervisor state
HVST_MEMORY_TOTAL = "mem_total"
HVST_MEMORY_NODE = "mem_node"
HVST_MEMORY_HV = "mem_hv"
HVST_CPU_TOTAL = "cpu_total"
HVST_CPU_NODE = "cpu_node"
HVSTS_PARAMETER_TYPES = {
HVST_MEMORY_TOTAL: VTYPE_INT,
HVST_MEMORY_NODE: VTYPE_INT,
HVST_MEMORY_HV: VTYPE_INT,
HVST_CPU_TOTAL: VTYPE_INT,
HVST_CPU_NODE: VTYPE_INT,
}
HVSTS_PARAMETERS = frozenset(HVSTS_PARAMETER_TYPES.keys())
# Disk state
DS_DISK_TOTAL = "disk_total"
DS_DISK_RESERVED = "disk_reserved"
DS_DISK_OVERHEAD = "disk_overhead"
DSS_PARAMETER_TYPES = {
DS_DISK_TOTAL: VTYPE_INT,
DS_DISK_RESERVED: VTYPE_INT,
DS_DISK_OVERHEAD: VTYPE_INT,
}
DSS_PARAMETERS = frozenset(DSS_PARAMETER_TYPES.keys())
# Backend parameter names
BE_MEMORY = "memory"
BE_VCPUS = "vcpus"
......
......@@ -982,6 +982,8 @@ class Node(TaggableObject):
"vm_capable",
"ndparams",
"powered",
"hv_state",
"disk_state",
] + _TIMESTAMPS + _UUID
def UpgradeConfig(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment