From c175c8d57941bf8cb73cf575365b93d7ea569529 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Tue, 1 Nov 2016 17:39:17 -0400 Subject: [PATCH] api-ref: document the power_state enum values The OS-EXT-STS:power_state attribute in a server GET response is enum values which are meaningless unless you look at the nova/compute/power_states.py code. This change adds a mapping to the description on that field in the api-ref. Note there are gaps in the sequence, those are for unused values as seen in the nova.objects.fields.InstancePowerState class. Change-Id: I2ef9f493e66ab04b13f439e73247dc306a1514b4 --- api-ref/source/parameters.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 6035277cc850..437f475246f7 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -3158,7 +3158,14 @@ OS-EXT-SRV-ATTR:instance_name: type: string OS-EXT-STS:power_state: description: | - The power state of the instance. + The power state of the instance. This is an enum value that is mapped as:: + + 0: NOSTATE + 1: RUNNING + 3: PAUSED + 4: SHUTDOWN + 6: CRASHED + 7: SUSPENDED in: body required: true type: integer