From ec78868ee0c8d8cfdbb88e17bfb9c82c68c40b0a Mon Sep 17 00:00:00 2001 From: Ruby Loo Date: Thu, 10 Jul 2014 12:38:38 -0400 Subject: [PATCH] Update webapi doc with link and console http://docs.openstack.org/developer/ironic/webapi/v1.html is updated as follows: - changes the path descriptor of NodeStates to use '(node_uuid)' instead of '' to be consistent with other paths - adds [GET/PUT] /v1/nodes/(node_uuid)/states/console to show how to access the node's console - fixes the "Links" section so that Link information is shown Change-Id: I9d4a32550b81bb5ccf2fa23d8b591d8a945c04cc --- doc/source/webapi/v1.rst | 7 +++++-- ironic/api/controllers/link.py | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/source/webapi/v1.rst b/doc/source/webapi/v1.rst index 79b2886a3e..985555545a 100644 --- a/doc/source/webapi/v1.rst +++ b/doc/source/webapi/v1.rst @@ -34,7 +34,7 @@ Drivers Links ===== -.. autotype:: ironic.api.controllers.v1.link:Link +.. autotype:: ironic.api.controllers.link.Link :members: @@ -58,7 +58,10 @@ NodeStates ========== .. rest-controller:: ironic.api.controllers.v1.node:NodeStatesController - :webprefix: /v1/nodes//states + :webprefix: /v1/nodes/(node_uuid)/states + +.. rest-controller:: ironic.api.controllers.v1.node:NodeConsoleController + :webprefix: /v1/nodes/(node_uuid)/states/console .. autotype:: ironic.api.controllers.v1.node.NodeStates :members: diff --git a/ironic/api/controllers/link.py b/ironic/api/controllers/link.py index ca98bdae4c..46e9dcc86d 100644 --- a/ironic/api/controllers/link.py +++ b/ironic/api/controllers/link.py @@ -49,3 +49,10 @@ class Link(base.APIBase): href = build_url(resource, resource_args, bookmark=bookmark, base_url=url) return Link(href=href, rel=rel_name, type=type) + + @classmethod + def sample(cls): + sample = cls(href="http://localhost:6385/chassis/" + "eaaca217-e7d8-47b4-bb41-3f99f20eed89", + rel="bookmark") + return sample