From 9c5510312e3948e851e9661d4f4fad5229c0406e Mon Sep 17 00:00:00 2001 From: Joanna Taryma Date: Thu, 23 Feb 2017 15:52:59 -0800 Subject: [PATCH] Updated ramdisk API docstrings Added information about raised exceptions and conditions under which they are raised. Change-Id: Idde5f4da91cee51603a27720efbdc18601f9b780 --- ironic/api/controllers/v1/ramdisk.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ironic/api/controllers/v1/ramdisk.py b/ironic/api/controllers/v1/ramdisk.py index c6939c19be..921a374927 100644 --- a/ironic/api/controllers/v1/ramdisk.py +++ b/ironic/api/controllers/v1/ramdisk.py @@ -93,7 +93,10 @@ class LookupController(rest.RestController): :param node_uuid: UUID of a node. :raises: NotFound if requested API version does not allow this endpoint. - :raises: NotFound if suitable node was not found. + :raises: NotFound if suitable node was not found or node's provision + state is not allowed for the lookup. + :raises: IncompleteLookup if neither node UUID nor any valid MAC + address was provided. """ if not api_utils.allow_ramdisk_endpoints(): raise exception.NotFound() @@ -156,6 +159,11 @@ class HeartbeatController(rest.RestController): :param node_ident: the UUID or logical name of a node. :param callback_url: the URL to reach back to the ramdisk. + :raises: NodeNotFound if node with provided UUID or name was not found. + :raises: InvalidUuidOrName if node_ident is not valid name or UUID. + :raises: NoValidHost if RPC topic for node could not be retrieved. + :raises: NotFound if requested API version does not allow this + endpoint. """ if not api_utils.allow_ramdisk_endpoints(): raise exception.NotFound()