Enhancing the Console API

Registered by Ling Gao

There are a few things need to be addressed in console API.
1. console get v1/nodes/<uuid>/states/console returns a string. It should return a JSON object with more information like:
{'console_enabled': True, 'console_info': {'type': 'blah', 'url': 'blahblah')) for the node with console enabled;
{'console_enabled': False, 'console_info': None}} for the node with console disabled.
2. Move console GET/PUT from v1/nodes/<uuid>/states/console to v1/nodes/<uuid>/console.
The user calls ironic node-get-console mainly wants to get the url of the console. So it is a little odd to have console GET under the 'states'. If GET is moved, then it makes sense to take PUT out of 'states'. And take the 'console_enabled' state out of the NodeStates. This makes console a sub-element by itself under nodes.
3. Separate console error.
Currently the error message for invoking the console is saved in last_error of the node. It overwrites the power error and provisioning error and vice versa. We can add a new column named 'console_error' in the nodes table to store the last error for invoking the console. The error can be returned by the console GET API as the following:
{'console_enabled': False, 'console_info': None, 'console_error': 'something'}}

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Ling Gao
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.