Add rescue interface field to node-related notifications

This patch adds rescue_interface field to node-related notification
objects.

Co-Authored-By: Jay Faulkner <jay@jvf.cc>
Co-Authored-By: Josh Gachnang <josh@pcsforeducation.com>
Co-Authored-By: Jesse J. Cook <jesse.j.cook@member.fsf.org>
Co-Authored-By: Mario Villaplana <mario.villaplana@gmail.com>
Co-Authored-By: Aparna <aparnavtce@gmail.com>
Co-Authored-By: Shivanand Tendulker <stendulker@gmail.com>

Change-Id: I8aa4c3c4701eae5f7838192bdbcf46a069370643
Partial-bug: #1526449
This commit is contained in:
Shivanand Tendulker 2017-09-12 01:54:59 -04:00 committed by Dmitry Tantsur
parent 68f566160d
commit 7394dbbacb
4 changed files with 43 additions and 21 deletions

View File

@ -132,7 +132,7 @@ Example of node CRUD notification::
"payload":{ "payload":{
"ironic_object.namespace":"ironic", "ironic_object.namespace":"ironic",
"ironic_object.name":"NodeCRUDPayload", "ironic_object.name":"NodeCRUDPayload",
"ironic_object.version":"1.2", "ironic_object.version":"1.3",
"ironic_object.data":{ "ironic_object.data":{
"chassis_uuid": "db0eef9d-45b2-4dc0-94a8-fc283c01171f", "chassis_uuid": "db0eef9d-45b2-4dc0-94a8-fc283c01171f",
"clean_step": None, "clean_step": None,
@ -158,6 +158,7 @@ Example of node CRUD notification::
"network_interface": "flat", "network_interface": "flat",
"power_interface": "ipmitool", "power_interface": "ipmitool",
"raid_interface": "no-raid", "raid_interface": "no-raid",
"rescue_interface": "no-rescue",
"storage_interface": "noop", "storage_interface": "noop",
"vendor_interface": "no-vendor", "vendor_interface": "no-vendor",
"name": None, "name": None,
@ -354,7 +355,7 @@ node maintenance notification::
"payload":{ "payload":{
"ironic_object.namespace":"ironic", "ironic_object.namespace":"ironic",
"ironic_object.name":"NodePayload", "ironic_object.name":"NodePayload",
"ironic_object.version":"1.4", "ironic_object.version":"1.5",
"ironic_object.data":{ "ironic_object.data":{
"clean_step": None, "clean_step": None,
"console_enabled": False, "console_enabled": False,
@ -376,6 +377,7 @@ node maintenance notification::
"network_interface": "flat", "network_interface": "flat",
"power_interface": "ipmitool", "power_interface": "ipmitool",
"raid_interface": "no-raid", "raid_interface": "no-raid",
"rescue_interface": "no-rescue",
"storage_interface": "noop", "storage_interface": "noop",
"vendor_interface": "no-vendor", "vendor_interface": "no-vendor",
"name": None, "name": None,
@ -430,7 +432,7 @@ notification::
"payload":{ "payload":{
"ironic_object.namespace":"ironic", "ironic_object.namespace":"ironic",
"ironic_object.name":"NodePayload", "ironic_object.name":"NodePayload",
"ironic_object.version":"1.4", "ironic_object.version":"1.5",
"ironic_object.data":{ "ironic_object.data":{
"clean_step": None, "clean_step": None,
"console_enabled": True, "console_enabled": True,
@ -452,6 +454,7 @@ notification::
"network_interface": "flat", "network_interface": "flat",
"power_interface": "ipmitool", "power_interface": "ipmitool",
"raid_interface": "no-raid", "raid_interface": "no-raid",
"rescue_interface": "no-rescue",
"storage_interface": "noop", "storage_interface": "noop",
"vendor_interface": "no-vendor", "vendor_interface": "no-vendor",
"name": None, "name": None,
@ -499,7 +502,7 @@ ironic-conductor is attempting to change the node::
"payload":{ "payload":{
"ironic_object.namespace":"ironic", "ironic_object.namespace":"ironic",
"ironic_object.name":"NodeSetPowerStatePayload", "ironic_object.name":"NodeSetPowerStatePayload",
"ironic_object.version":"1.4", "ironic_object.version":"1.5",
"ironic_object.data":{ "ironic_object.data":{
"clean_step": None, "clean_step": None,
"console_enabled": False, "console_enabled": False,
@ -520,6 +523,7 @@ ironic-conductor is attempting to change the node::
"network_interface": "flat", "network_interface": "flat",
"power_interface": "ipmitool", "power_interface": "ipmitool",
"raid_interface": "no-raid", "raid_interface": "no-raid",
"rescue_interface": "no-rescue",
"storage_interface": "noop", "storage_interface": "noop",
"vendor_interface": "no-vendor", "vendor_interface": "no-vendor",
"name": None, "name": None,
@ -562,7 +566,7 @@ prior to the correction::
"payload":{ "payload":{
"ironic_object.namespace":"ironic", "ironic_object.namespace":"ironic",
"ironic_object.name":"NodeCorrectedPowerStatePayload", "ironic_object.name":"NodeCorrectedPowerStatePayload",
"ironic_object.version":"1.4", "ironic_object.version":"1.5",
"ironic_object.data":{ "ironic_object.data":{
"clean_step": None, "clean_step": None,
"console_enabled": False, "console_enabled": False,
@ -583,6 +587,7 @@ prior to the correction::
"network_interface": "flat", "network_interface": "flat",
"power_interface": "ipmitool", "power_interface": "ipmitool",
"raid_interface": "no-raid", "raid_interface": "no-raid",
"rescue_interface": "no-rescue",
"storage_interface": "noop", "storage_interface": "noop",
"vendor_interface": "no-vendor", "vendor_interface": "no-vendor",
"name": None, "name": None,
@ -636,7 +641,7 @@ indicate a node's provision states before state change, "event" is the FSM
"payload":{ "payload":{
"ironic_object.namespace":"ironic", "ironic_object.namespace":"ironic",
"ironic_object.name":"NodeSetProvisionStatePayload", "ironic_object.name":"NodeSetProvisionStatePayload",
"ironic_object.version":"1.4", "ironic_object.version":"1.5",
"ironic_object.data":{ "ironic_object.data":{
"clean_step": None, "clean_step": None,
"console_enabled": False, "console_enabled": False,
@ -658,6 +663,7 @@ indicate a node's provision states before state change, "event" is the FSM
"network_interface": "flat", "network_interface": "flat",
"power_interface": "ipmitool", "power_interface": "ipmitool",
"raid_interface": "no-raid", "raid_interface": "no-raid",
"rescue_interface": "no-rescue",
"storage_interface": "noop", "storage_interface": "noop",
"vendor_interface": "no-vendor", "vendor_interface": "no-vendor",
"name": None, "name": None,

View File

@ -534,6 +534,7 @@ class NodePayload(notification.NotificationPayloadBase):
'network_interface': ('node', 'network_interface'), 'network_interface': ('node', 'network_interface'),
'power_interface': ('node', 'power_interface'), 'power_interface': ('node', 'power_interface'),
'raid_interface': ('node', 'raid_interface'), 'raid_interface': ('node', 'raid_interface'),
'rescue_interface': ('node', 'rescue_interface'),
'storage_interface': ('node', 'storage_interface'), 'storage_interface': ('node', 'storage_interface'),
'vendor_interface': ('node', 'vendor_interface'), 'vendor_interface': ('node', 'vendor_interface'),
'power_state': ('node', 'power_state'), 'power_state': ('node', 'power_state'),
@ -547,11 +548,6 @@ class NodePayload(notification.NotificationPayloadBase):
'uuid': ('node', 'uuid') 'uuid': ('node', 'uuid')
} }
# TODO(stendulker): At a later point in time, once rescue_interface
# is able to be leveraged, we need to add the rescue_interface
# field to payload and increment the object versions for all objects
# that inherit the NodePayload object.
# TODO(mgoddard): Add a traits field to the NodePayload object. # TODO(mgoddard): Add a traits field to the NodePayload object.
# Version 1.0: Initial version, based off of Node version 1.18. # Version 1.0: Initial version, based off of Node version 1.18.
@ -560,7 +556,8 @@ class NodePayload(notification.NotificationPayloadBase):
# Version 1.2: Add nullable to console_enabled and maintenance. # Version 1.2: Add nullable to console_enabled and maintenance.
# Version 1.3: Add dynamic interfaces fields exposed via API. # Version 1.3: Add dynamic interfaces fields exposed via API.
# Version 1.4: Add storage interface field exposed via API. # Version 1.4: Add storage interface field exposed via API.
VERSION = '1.4' # Version 1.5: Add rescue interface field exposed via API.
VERSION = '1.5'
fields = { fields = {
'clean_step': object_fields.FlexibleDictField(nullable=True), 'clean_step': object_fields.FlexibleDictField(nullable=True),
'console_enabled': object_fields.BooleanField(nullable=True), 'console_enabled': object_fields.BooleanField(nullable=True),
@ -581,6 +578,7 @@ class NodePayload(notification.NotificationPayloadBase):
'network_interface': object_fields.StringField(nullable=True), 'network_interface': object_fields.StringField(nullable=True),
'power_interface': object_fields.StringField(nullable=True), 'power_interface': object_fields.StringField(nullable=True),
'raid_interface': object_fields.StringField(nullable=True), 'raid_interface': object_fields.StringField(nullable=True),
'rescue_interface': object_fields.StringField(nullable=True),
'storage_interface': object_fields.StringField(nullable=True), 'storage_interface': object_fields.StringField(nullable=True),
'vendor_interface': object_fields.StringField(nullable=True), 'vendor_interface': object_fields.StringField(nullable=True),
'name': object_fields.StringField(nullable=True), 'name': object_fields.StringField(nullable=True),
@ -619,7 +617,8 @@ class NodeSetPowerStatePayload(NodePayload):
# Version 1.2: Parent NodePayload version 1.2 # Version 1.2: Parent NodePayload version 1.2
# Version 1.3: Parent NodePayload version 1.3 # Version 1.3: Parent NodePayload version 1.3
# Version 1.4: Parent NodePayload version 1.4 # Version 1.4: Parent NodePayload version 1.4
VERSION = '1.4' # Version 1.5: Parent NodePayload version 1.5
VERSION = '1.5'
fields = { fields = {
# "to_power" indicates the future target_power_state of the node. A # "to_power" indicates the future target_power_state of the node. A
@ -664,7 +663,8 @@ class NodeCorrectedPowerStatePayload(NodePayload):
# Version 1.2: Parent NodePayload version 1.2 # Version 1.2: Parent NodePayload version 1.2
# Version 1.3: Parent NodePayload version 1.3 # Version 1.3: Parent NodePayload version 1.3
# Version 1.4: Parent NodePayload version 1.4 # Version 1.4: Parent NodePayload version 1.4
VERSION = '1.4' # Version 1.5: Parent NodePayload version 1.5
VERSION = '1.5'
fields = { fields = {
'from_power': object_fields.StringField(nullable=True) 'from_power': object_fields.StringField(nullable=True)
@ -694,7 +694,8 @@ class NodeSetProvisionStatePayload(NodePayload):
# Version 1.2: Parent NodePayload version 1.2 # Version 1.2: Parent NodePayload version 1.2
# Version 1.3: Parent NodePayload version 1.3 # Version 1.3: Parent NodePayload version 1.3
# Version 1.4: Parent NodePayload version 1.4 # Version 1.4: Parent NodePayload version 1.4
VERSION = '1.4' # Version 1.5: Parent NodePayload version 1.5
VERSION = '1.5'
SCHEMA = dict(NodePayload.SCHEMA, SCHEMA = dict(NodePayload.SCHEMA,
**{'instance_info': ('node', 'instance_info')}) **{'instance_info': ('node', 'instance_info')})
@ -730,7 +731,8 @@ class NodeCRUDPayload(NodePayload):
# Version 1.0: Initial version # Version 1.0: Initial version
# Version 1.1: Parent NodePayload version 1.3 # Version 1.1: Parent NodePayload version 1.3
# Version 1.2: Parent NodePayload version 1.4 # Version 1.2: Parent NodePayload version 1.4
VERSION = '1.2' # Version 1.3: Parent NodePayload version 1.5
VERSION = '1.3'
SCHEMA = dict(NodePayload.SCHEMA, SCHEMA = dict(NodePayload.SCHEMA,
**{'instance_info': ('node', 'instance_info'), **{'instance_info': ('node', 'instance_info'),

View File

@ -692,21 +692,21 @@ expected_object_fingerprints = {
'Conductor': '1.2-5091f249719d4a465062a1b3dc7f860d', 'Conductor': '1.2-5091f249719d4a465062a1b3dc7f860d',
'EventType': '1.1-aa2ba1afd38553e3880c267404e8d370', 'EventType': '1.1-aa2ba1afd38553e3880c267404e8d370',
'NotificationPublisher': '1.0-51a09397d6c0687771fb5be9a999605d', 'NotificationPublisher': '1.0-51a09397d6c0687771fb5be9a999605d',
'NodePayload': '1.4-1ab0efe090ee3b2bd48d280a5acec1d4', 'NodePayload': '1.5-a08d9f8a74b1f827ade12efd853cebc4',
'NodeSetPowerStateNotification': '1.0-59acc533c11d306f149846f922739c15', 'NodeSetPowerStateNotification': '1.0-59acc533c11d306f149846f922739c15',
'NodeSetPowerStatePayload': '1.4-9ab5116c2c59dfb9e56dcc7ef660a431', 'NodeSetPowerStatePayload': '1.5-5292dea58d84e1bec9345b2e1a10114b',
'NodeCorrectedPowerStateNotification': 'NodeCorrectedPowerStateNotification':
'1.0-59acc533c11d306f149846f922739c15', '1.0-59acc533c11d306f149846f922739c15',
'NodeCorrectedPowerStatePayload': '1.4-d624154b8fb4e6cdda1554a8bf3f4cf5', 'NodeCorrectedPowerStatePayload': '1.5-d22164f7f8f36dedee7d685525acb844',
'NodeSetProvisionStateNotification': 'NodeSetProvisionStateNotification':
'1.0-59acc533c11d306f149846f922739c15', '1.0-59acc533c11d306f149846f922739c15',
'NodeSetProvisionStatePayload': '1.4-605c17b779aeedf0925937b2785d9f43', 'NodeSetProvisionStatePayload': '1.5-65f972bc0cd0096632c8d7749c3dca96',
'VolumeConnector': '1.0-3e0252c0ab6e6b9d158d09238a577d97', 'VolumeConnector': '1.0-3e0252c0ab6e6b9d158d09238a577d97',
'VolumeTarget': '1.0-0b10d663d8dae675900b2c7548f76f5e', 'VolumeTarget': '1.0-0b10d663d8dae675900b2c7548f76f5e',
'ChassisCRUDNotification': '1.0-59acc533c11d306f149846f922739c15', 'ChassisCRUDNotification': '1.0-59acc533c11d306f149846f922739c15',
'ChassisCRUDPayload': '1.0-dce63895d8186279a7dd577cffccb202', 'ChassisCRUDPayload': '1.0-dce63895d8186279a7dd577cffccb202',
'NodeCRUDNotification': '1.0-59acc533c11d306f149846f922739c15', 'NodeCRUDNotification': '1.0-59acc533c11d306f149846f922739c15',
'NodeCRUDPayload': '1.2-b7a265a5e2fe47adada3c7c20c68e465', 'NodeCRUDPayload': '1.3-3026beced6c8857dc0574e8e0762415b',
'PortCRUDNotification': '1.0-59acc533c11d306f149846f922739c15', 'PortCRUDNotification': '1.0-59acc533c11d306f149846f922739c15',
'PortCRUDPayload': '1.2-233d259df442eb15cc584fae1fe81504', 'PortCRUDPayload': '1.2-233d259df442eb15cc584fae1fe81504',
'NodeMaintenanceNotification': '1.0-59acc533c11d306f149846f922739c15', 'NodeMaintenanceNotification': '1.0-59acc533c11d306f149846f922739c15',

View File

@ -0,0 +1,14 @@
---
features:
- |
Adds rescue interface field to node-related notifications.
Affected notifications are:
* baremetal.node.create.*, new payload version 1.3
* baremetal.node.update.*, new payload version 1.3
* baremetal.node.delete.*, new payload version 1.3
* baremetal.node.maintenance.*, new payload version 1.5
* baremetal.node.console.*, new payload version 1.5
* baremetal.node.power_set.*, new payload version 1.5
* baremetal.node.power_state_corrected.*, new payload version 1.5
* baremetal.node.provision_set.*, new payload version 1.5