diff options
author | Wang Huaqiang <huaqiang.wang@intel.com> | 2020-05-13 18:13:11 +0800 |
---|---|---|
committer | Wang Huaqiang <huaqiang.wang@intel.com> | 2020-07-15 00:38:25 +0800 |
commit | d992eb2f5a58e0a589b68384ceb02c880489e135 (patch) | |
tree | 7496d116ddf07ff955df4411f6c6650f79c8d1b2 /nova/notifications | |
parent | 867d4471013bf6a70cd3e9e809daf80ea358df92 (diff) | |
download | nova-d992eb2f5a58e0a589b68384ceb02c880489e135.tar.gz |
notifications: add the pcpuset info to instance numa cell payload
Update the versioned object notification for 'InstanceNUMACell'
object to reflect the change of a new 'pcpuset' field.
Part of blueprint use-pcpu-and-vcpu-in-one-instance
Change-Id: Ifeb21b9eff828952f67002172c8500f738e9984c
Signed-off-by: Wang Huaqiang <huaqiang.wang@intel.com>
Diffstat (limited to 'nova/notifications')
-rw-r--r-- | nova/notifications/objects/request_spec.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nova/notifications/objects/request_spec.py b/nova/notifications/objects/request_spec.py index 28ca6baf04..7ef6be1124 100644 --- a/nova/notifications/objects/request_spec.py +++ b/nova/notifications/objects/request_spec.py @@ -143,22 +143,26 @@ class InstanceNUMATopologyPayload(base.NotificationPayloadBase): @nova_base.NovaObjectRegistry.register_notification class InstanceNUMACellPayload(base.NotificationPayloadBase): # Version 1.0: Initial version - VERSION = '1.0' + # Version 1.1: Added pcpuset field + VERSION = '1.1' SCHEMA = { 'id': ('numa_cell', 'id'), 'cpuset': ('numa_cell', 'cpuset'), + 'pcpuset': ('numa_cell', 'pcpuset'), + 'cpuset_reserved': ('numa_cell', 'cpuset_reserved'), 'memory': ('numa_cell', 'memory'), 'pagesize': ('numa_cell', 'pagesize'), 'cpu_pinning_raw': ('numa_cell', 'cpu_pinning_raw'), 'cpu_policy': ('numa_cell', 'cpu_policy'), 'cpu_thread_policy': ('numa_cell', 'cpu_thread_policy'), - 'cpuset_reserved': ('numa_cell', 'cpuset_reserved'), } fields = { 'id': fields.IntegerField(), 'cpuset': fields.SetOfIntegersField(), + 'pcpuset': fields.SetOfIntegersField(), + 'cpuset_reserved': fields.SetOfIntegersField(nullable=True), 'memory': fields.IntegerField(), 'pagesize': fields.IntegerField(nullable=True), 'cpu_topology': fields.ObjectField('VirtCPUTopologyPayload', @@ -167,7 +171,6 @@ class InstanceNUMACellPayload(base.NotificationPayloadBase): 'cpu_policy': fields.CPUAllocationPolicyField(nullable=True), 'cpu_thread_policy': fields.CPUThreadAllocationPolicyField( nullable=True), - 'cpuset_reserved': fields.SetOfIntegersField(nullable=True) } def __init__(self, numa_cell): |