Skip to content

Commit 7c337cd

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "notifications: add the pcpuset info to instance numa cell payload"
2 parents e6a015e + d992eb2 commit 7c337cd

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

doc/notification_samples/common_payloads/InstanceNUMACellPayload.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"nova_object.version": "1.0",
2+
"nova_object.version": "1.1",
33
"nova_object.namespace": "nova",
44
"nova_object.name": "InstanceNUMACellPayload",
55
"nova_object.data": {
@@ -8,6 +8,7 @@
88
"cpu_thread_policy": null,
99
"cpu_topology": null,
1010
"cpuset": [0],
11+
"pcpuset": [],
1112
"cpuset_reserved": null,
1213
"id": 0,
1314
"memory": 512,

nova/notifications/objects/request_spec.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,22 +143,26 @@ def __init__(self, numa_topology):
143143
@nova_base.NovaObjectRegistry.register_notification
144144
class InstanceNUMACellPayload(base.NotificationPayloadBase):
145145
# Version 1.0: Initial version
146-
VERSION = '1.0'
146+
# Version 1.1: Added pcpuset field
147+
VERSION = '1.1'
147148

148149
SCHEMA = {
149150
'id': ('numa_cell', 'id'),
150151
'cpuset': ('numa_cell', 'cpuset'),
152+
'pcpuset': ('numa_cell', 'pcpuset'),
153+
'cpuset_reserved': ('numa_cell', 'cpuset_reserved'),
151154
'memory': ('numa_cell', 'memory'),
152155
'pagesize': ('numa_cell', 'pagesize'),
153156
'cpu_pinning_raw': ('numa_cell', 'cpu_pinning_raw'),
154157
'cpu_policy': ('numa_cell', 'cpu_policy'),
155158
'cpu_thread_policy': ('numa_cell', 'cpu_thread_policy'),
156-
'cpuset_reserved': ('numa_cell', 'cpuset_reserved'),
157159
}
158160

159161
fields = {
160162
'id': fields.IntegerField(),
161163
'cpuset': fields.SetOfIntegersField(),
164+
'pcpuset': fields.SetOfIntegersField(),
165+
'cpuset_reserved': fields.SetOfIntegersField(nullable=True),
162166
'memory': fields.IntegerField(),
163167
'pagesize': fields.IntegerField(nullable=True),
164168
'cpu_topology': fields.ObjectField('VirtCPUTopologyPayload',
@@ -167,7 +171,6 @@ class InstanceNUMACellPayload(base.NotificationPayloadBase):
167171
'cpu_policy': fields.CPUAllocationPolicyField(nullable=True),
168172
'cpu_thread_policy': fields.CPUThreadAllocationPolicyField(
169173
nullable=True),
170-
'cpuset_reserved': fields.SetOfIntegersField(nullable=True)
171174
}
172175

173176
def __init__(self, numa_cell):

nova/tests/unit/notifications/objects/test_notification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def test_payload_is_not_generated_if_notification_format_is_unversioned(
411411
'InstanceActionSnapshotPayload': '1.9-c3e0bbaaefafdfa2f8e6e504c2c9b12c',
412412
'InstanceExistsNotification': '1.0-a73147b93b520ff0061865849d3dfa56',
413413
'InstanceExistsPayload': '1.2-e082c02438ee57164829afaeee3bf7f8',
414-
'InstanceNUMACellPayload': '1.0-2f13614648bc46f2e29578a206561ef6',
414+
'InstanceNUMACellPayload': '1.1-2a24ab42bf5e8dfa98291402725bf278',
415415
'InstanceNUMATopologyPayload': '1.0-247361b152047c18ae9ad1da2544a3c9',
416416
'InstancePCIRequestPayload': '1.0-12d0d61baf183daaafd93cbeeed2956f',
417417
'InstancePCIRequestsPayload': '1.0-6751cffe0c0fabd212aad624f672429a',

0 commit comments

Comments
 (0)