Merge "notifications: add the pcpuset info to instance numa cell payload"

This commit is contained in:
Zuul 2020-07-16 11:06:14 +00:00 committed by Gerrit Code Review
commit 7c337cd12a
3 changed files with 9 additions and 5 deletions

View File

@ -1,5 +1,5 @@
{
"nova_object.version": "1.0",
"nova_object.version": "1.1",
"nova_object.namespace": "nova",
"nova_object.name": "InstanceNUMACellPayload",
"nova_object.data": {
@ -8,6 +8,7 @@
"cpu_thread_policy": null,
"cpu_topology": null,
"cpuset": [0],
"pcpuset": [],
"cpuset_reserved": null,
"id": 0,
"memory": 512,

View File

@ -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):

View File

@ -411,7 +411,7 @@ notification_object_data = {
'InstanceActionSnapshotPayload': '1.9-c3e0bbaaefafdfa2f8e6e504c2c9b12c',
'InstanceExistsNotification': '1.0-a73147b93b520ff0061865849d3dfa56',
'InstanceExistsPayload': '1.2-e082c02438ee57164829afaeee3bf7f8',
'InstanceNUMACellPayload': '1.0-2f13614648bc46f2e29578a206561ef6',
'InstanceNUMACellPayload': '1.1-2a24ab42bf5e8dfa98291402725bf278',
'InstanceNUMATopologyPayload': '1.0-247361b152047c18ae9ad1da2544a3c9',
'InstancePCIRequestPayload': '1.0-12d0d61baf183daaafd93cbeeed2956f',
'InstancePCIRequestsPayload': '1.0-6751cffe0c0fabd212aad624f672429a',