Revision b4fcee5b
b/doc/rapi.rst | ||
---|---|---|
330 | 330 |
Returns a list of features supported by the RAPI server. Available |
331 | 331 |
features: |
332 | 332 |
|
333 |
``instance-create-reqv1`` |
|
333 |
.. pyassert:: |
|
334 |
|
|
335 |
rlib2.ALL_FEATURES == set([rlib2._INST_CREATE_REQV1, |
|
336 |
rlib2._INST_REINSTALL_REQV1, |
|
337 |
rlib2._NODE_MIGRATE_REQV1, |
|
338 |
rlib2._NODE_EVAC_RES1]) |
|
339 |
|
|
340 |
:pyeval:`rlib2._INST_CREATE_REQV1` |
|
334 | 341 |
Instance creation request data version 1 supported. |
335 |
``instance-reinstall-reqv1``
|
|
342 |
:pyeval:`rlib2._INST_REINSTALL_REQV1`
|
|
336 | 343 |
Instance reinstall supports body parameters. |
344 |
:pyeval:`rlib2._NODE_MIGRATE_REQV1` |
|
345 |
Whether migrating a node (``/2/nodes/[node_name]/migrate``) supports |
|
346 |
request body parameters. |
|
347 |
:pyeval:`rlib2._NODE_EVAC_RES1` |
|
348 |
Whether evacuating a node (``/2/nodes/[node_name]/evacuate``) returns |
|
349 |
a new-style result (see resource description) |
|
337 | 350 |
|
338 | 351 |
|
339 | 352 |
``/2/modify`` |
... | ... | |
1192 | 1205 |
~~~~~~~~ |
1193 | 1206 |
|
1194 | 1207 |
If no mode is explicitly specified, each instances' hypervisor default |
1195 |
migration mode will be used. Query parameters: |
|
1208 |
migration mode will be used. Body parameters: |
|
1209 |
|
|
1210 |
.. opcode_params:: OP_NODE_MIGRATE |
|
1211 |
:exclude: node_name |
|
1196 | 1212 |
|
1197 |
``live`` (bool) |
|
1198 |
If set, use live migration if available. |
|
1199 |
``mode`` (string) |
|
1200 |
Sets migration mode, ``live`` for live migration and ``non-live`` for |
|
1201 |
non-live migration. Supported by Ganeti 2.2 and above. |
|
1213 |
The query arguments used up to and including Ganeti 2.4 are deprecated |
|
1214 |
and should no longer be used. The new request format can be detected by |
|
1215 |
the presence of the :pyeval:`rlib2._NODE_MIGRATE_REQV1` feature string. |
|
1202 | 1216 |
|
1203 | 1217 |
|
1204 | 1218 |
``/2/nodes/[node_name]/role`` |
b/lib/build/sphinx_ext.py | ||
---|---|---|
39 | 39 |
from ganeti import utils |
40 | 40 |
from ganeti import opcodes |
41 | 41 |
from ganeti import ht |
42 |
from ganeti import rapi |
|
43 |
|
|
44 |
import ganeti.rapi.rlib2 |
|
42 | 45 |
|
43 | 46 |
|
44 | 47 |
COMMON_PARAM_NAMES = map(operator.itemgetter(0), opcodes.OpCode.OP_PARAMS) |
45 | 48 |
|
46 | 49 |
#: Namespace for evaluating expressions |
47 |
EVAL_NS = dict(compat=compat, constants=constants, utils=utils, errors=errors) |
|
50 |
EVAL_NS = dict(compat=compat, constants=constants, utils=utils, errors=errors, |
|
51 |
rlib2=rapi.rlib2) |
|
48 | 52 |
|
49 | 53 |
|
50 | 54 |
class OpcodeError(sphinx.errors.SphinxError): |
b/lib/rapi/rlib2.py | ||
---|---|---|
110 | 110 |
# Feature string for node evacuation with LU-generated jobs |
111 | 111 |
_NODE_EVAC_RES1 = "node-evac-res1" |
112 | 112 |
|
113 |
ALL_FEATURES = frozenset([ |
|
114 |
_INST_CREATE_REQV1, |
|
115 |
_INST_REINSTALL_REQV1, |
|
116 |
_NODE_MIGRATE_REQV1, |
|
117 |
_NODE_EVAC_RES1, |
|
118 |
]) |
|
119 |
|
|
113 | 120 |
# Timeout for /2/jobs/[job_id]/wait. Gives job up to 10 seconds to change. |
114 | 121 |
_WFJC_TIMEOUT = 10 |
115 | 122 |
|
... | ... | |
151 | 158 |
"""Returns list of optional RAPI features implemented. |
152 | 159 |
|
153 | 160 |
""" |
154 |
return [_INST_CREATE_REQV1, _INST_REINSTALL_REQV1, _NODE_MIGRATE_REQV1, |
|
155 |
_NODE_EVAC_RES1] |
|
161 |
return list(ALL_FEATURES) |
|
156 | 162 |
|
157 | 163 |
|
158 | 164 |
class R_2_os(baserlib.R_Generic): |
Also available in: Unified diff