]> xenbits.xensource.com Git - osstest/openstack-nova.git/commitdiff
api-ref: document the power_state enum values
authorMatt Riedemann <mriedem@us.ibm.com>
Tue, 1 Nov 2016 21:39:17 +0000 (17:39 -0400)
committerMatt Riedemann <mriedem@us.ibm.com>
Tue, 1 Nov 2016 21:39:17 +0000 (17:39 -0400)
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

index 6035277cc8508f2b9e45c47231a37841f2fc9f01..437f475246f738116d8c69ca8b8162cc96c82532 100644 (file)
@@ -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