Remove references for the 'task_state' property
Complementing the patch 45671, this patch removes all the references of 'task_state' in the current code. The 'task_state' property was replaced by two new properties 'power_state' and 'provision_state' on a previous patch. Change-Id: I1f6bbcdfcebb0e2551855fbd17e1241b9c84b741
This commit is contained in:
@@ -27,16 +27,16 @@ validated by the driver. Any node with non-empty `properties` is said to be
|
||||
"initialized", and the state is INIT.
|
||||
|
||||
When the driver has received both `properties` and `driver_info`, it will check
|
||||
the power status of the node and update the `task_state` accordingly. If the
|
||||
the power status of the node and update the `power_state` accordingly. If the
|
||||
driver fails to read the the power state from the node, it will reject the
|
||||
`driver_info` change, and the state will remain as INIT. If the power status
|
||||
check succeeds, `task_state` will change to one of POWER_ON or POWER_OFF,
|
||||
check succeeds, `power_state` will change to one of POWER_ON or POWER_OFF,
|
||||
accordingly.
|
||||
|
||||
At this point, the power state may be changed via the API, a console
|
||||
may be started, and a tenant may be associated.
|
||||
|
||||
The `task_state` for a node which fails to transition will be set to ERROR.
|
||||
The `power_state` for a node which fails to transition will be set to ERROR.
|
||||
|
||||
When `instance_uuid` is set to a non-empty / non-None value, the node is said
|
||||
to be "associated" with a tenant.
|
||||
|
||||
@@ -104,7 +104,8 @@ class Connection(object):
|
||||
{
|
||||
'uuid': uuidutils.generate_uuid(),
|
||||
'instance_uuid': None,
|
||||
'task_state': states.NOSTATE,
|
||||
'power_state': states.NOSTATE,
|
||||
'provision_state': states.NOSTATE,
|
||||
'driver': 'pxe_ipmi',
|
||||
'driver_info': { ... },
|
||||
'properties': { ... },
|
||||
|
||||
@@ -225,8 +225,10 @@ class Connection(api.Connection):
|
||||
# ensure defaults are present for new nodes
|
||||
if not values.get('uuid'):
|
||||
values['uuid'] = uuidutils.generate_uuid()
|
||||
if not values.get('task_state'):
|
||||
values['task_state'] = states.NOSTATE
|
||||
if not values.get('power_state'):
|
||||
values['power_state'] = states.NOSTATE
|
||||
if not values.get('provision_state'):
|
||||
values['provision_state'] = states.NOSTATE
|
||||
if not values.get('properties'):
|
||||
values['properties'] = '{}'
|
||||
if not values.get('extra'):
|
||||
|
||||
@@ -59,9 +59,7 @@ class Chassis(base.IronicObject):
|
||||
"""Save updates to this Chassis.
|
||||
|
||||
Updates will be made column by column based on the result
|
||||
of self.what_changed(). If expected_task_state is provided,
|
||||
it will be checked against the in-database copy of the chassis
|
||||
before updates are made.
|
||||
of self.what_changed().
|
||||
|
||||
:param context: Security context
|
||||
"""
|
||||
|
||||
@@ -54,9 +54,7 @@ class Port(base.IronicObject):
|
||||
"""Save updates to this Port.
|
||||
|
||||
Updates will be made column by column based on the result
|
||||
of self.what_changed(). If expected_task_state is provided,
|
||||
it will be checked against the in-database copy of the port
|
||||
before updates are made.
|
||||
of self.what_changed().
|
||||
|
||||
:param context: Security context
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user