Remove target_power_state
Maybe this is useful for tracking power transition, but seems we should expose task_state or something else to users instead of just using ironic's feild, this is the first step of refactoring. Change-Id: Ibe83f3bfd534e2600769f39045da4d2812ebf5e1
This commit is contained in:
parent
d383c22477
commit
ed9c19d02c
@ -296,8 +296,7 @@ Instance Management (instances)
|
||||
Instances can be managed through several sub-resources.
|
||||
|
||||
A Instance can be rebooted, turned on, or turned off by requesting a change to
|
||||
its power state. This is handled asynchronously and tracked in the
|
||||
``target_power_state`` field after the request is received.
|
||||
its power state. This is handled asynchronously.
|
||||
|
||||
|
||||
Instance State Summary
|
||||
@ -322,7 +321,6 @@ Response
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- power_state: power_state
|
||||
- target_power_state: target_power_state
|
||||
|
||||
**Example instance state:**
|
||||
|
||||
|
@ -210,13 +210,6 @@ project_id_body:
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
target_power_state:
|
||||
description: |
|
||||
If a power state transition has been requested, this field represents the
|
||||
requested (ie, "target") state.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
type_description:
|
||||
description: |
|
||||
The description of the type.
|
||||
|
@ -1,4 +1,3 @@
|
||||
{
|
||||
"power_state": "power off",
|
||||
"target_power_state": null
|
||||
"power_state": "power off"
|
||||
}
|
||||
|
@ -85,15 +85,11 @@ class InstanceStates(base.APIBase):
|
||||
# Just support power state at present.
|
||||
# We can expend other fields for other type state.
|
||||
power_state = wtypes.text
|
||||
"""Represent the current (not transition) power state of the instance"""
|
||||
|
||||
target_power_state = wtypes.text
|
||||
"""The user modified desired power state of the instance."""
|
||||
"""Represent the current power state of the instance"""
|
||||
|
||||
@classmethod
|
||||
def sample(cls):
|
||||
sample = cls(target_power_state=ir_states.POWER_ON,
|
||||
power_state=ir_states.POWER_ON)
|
||||
sample = cls(power_state=ir_states.POWER_ON)
|
||||
return sample
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user