It is possible to set a value, but not unset it. We could set it to None, but None fails validation: $ openstack baremetal introspection rule import introspection-rules.json Invalid parameters for action set-attribute: missing required parameter(s): value We should accept None as a valid value (distinguishing it from a missing value).
An example of what should work: $ cat introspection-rules.json [ { "actions": [ {"action": "set-attribute", "path": "/properties/cpus", "value": null}, {"action": "set-attribute", "path": "/properties/memory_mb", "value": null} ] } ]
Environment: (undercloud) [stack@undercloud-0 ~]$ cat core_puddle_version 2019-03-06.1(undercloud) [stack@undercloud-0 ~]$ yum info openstack-ironic-inspector Loaded plugins: search-disabled-repos Available Packages Name : openstack-ironic-inspector Arch : noarch Version : 8.0.2 Release : 0.20181219092843.9b6133b.el7ost Size : 191 k Repo : rhelosp-14.0-puddle/x86_64 Summary : Hardware introspection service for OpenStack Ironic (undercloud) [stack@undercloud-0 ~]$ cat rules.json [ { "actions": [ {"action": "set-attribute", "path": "/properties/cpus", "value": null}, {"action": "set-attribute", "path": "/properties/memory_mb", "value": null} ] } ] (undercloud) [stack@undercloud-0 ~]$ openstack baremetal introspection rule import rules.json +--------------------------------------+-------------+ | UUID | Description | +--------------------------------------+-------------+ | e4c73ab0-1b0c-42c4-852e-1fc400611821 | None | +--------------------------------------+-------------+ (undercloud) [stack@undercloud-0 ~]$ openstack baremetal introspection rule show e4c73ab0-1b0c-42c4-852e-1fc400611821 +-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | actions | [{u'action': u'set-attribute', u'path': u'/properties/cpus', u'value': None}, {u'action': u'set-attribute', u'path': u'/properties/memory_mb', u'value': None}] | | conditions | [] | | description | None | | uuid | e4c73ab0-1b0c-42c4-852e-1fc400611821 | +-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0587