History | View | Annotate | Download (38.7 kB)
RAPI: Use FillOpCode for replacing disks
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
RAPI: Use FillOpCode for modifying instance
RAPI: Use FillOpCode for migrating instance
RAPI: Use FillOpCode for exporting instance
Rename OpStartupInstance and LUStartupInstance
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Rename OpNodeEvacuationStrategy and LUNodeEvacuationStrategy
Rename OpMigrateNode and LUMigrateNode
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Rename OpModifyNodeStorage and LUModifyNodeStorage
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Rename OpQueryNodeStorage and LUQueryNodeStorage
Rename OpSetNodeParams and LUSetNodeParams
Rename OpDiagnoseOS and LUDiagnoseOS
Rename OpMigrateInstance and LUMigrateInstance
Rename OpQueryInstanceData and LUQueryInstanceData
Rename OpRebootInstance and LURebootInstance
Rename OpReinstallInstance and LUReinstallInstance
Rename OpRemoveInstance and LURemoveInstance
Rename OpRenameInstance and LURenameInstance
Rename OpReplaceDisks and LUReplaceDisks
Rename OpSetInstanceParams and LUSetInstanceParams
Rename OpShutdownInstance and LUShutdownInstance
Rename OpAddGroup and LUAddGroup
Rename OpAssignGroupNodes and LUAssignGroupNodes
Rename OpRemoveGroup and LURemoveGroup
Rename OpRenameGroup and LURenameGroup
Rename OpSetGroupParams and LUSetGroupParams
Rename OpActivateInstanceDisks and LUActivateInstanceDisks
Rename OpCreateInstance and LUCreateInstance
Rename OpDeactivateInstanceDisks and LUDeactivateInstanceDisks
Rename OpGrowDisk and LUGrowDisk
Rename OpPrepareExport and LUPrepareExport
Rename OpRedistributeConfig and LURedistributeConfig
Rename OpSetClusterParams and LUSetClusterParams
Rename OpExportInstance and LUExportInstance
Fix typos in RAPI docstrings, add unittest
This patch fixes a number of typos and standardizes RAPI resourcedocstrings. A unittest is added.
Expose OpAssignGroupNodes over RAPI and RAPI client
Signed-off-by: Adeodato Simo <dato@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
RAPI: Add resource to grow instance disk
RAPI: Add resource to modify cluster
Expose OpSetGroupParams in RAPI and RAPI client
This creates the /2/groups/<name>/modify resource; at the moment, only the"alloc_policy" attribute can be modified.
Add the "alloc_policy" attribute to node groups
This can be set at group creation time and via OpSetGroupParams. The defaultis "preferred", and existing node groups from previous Ganeti version willget the attribute set to this value.
Signed-off-by: Adeodato Simo <dato@google.com>...
Group operations: expose add/remove/rename in RAPI
Expose new node group attributes in CLI and RAPI
Querying node groups: RAPI support
This implements /groups and /groups/%s RAPI end points.
Signed-off-by: Adeodato Simo <dato@google.com>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
RAPI: Implement OS parameters for instance reinstallation
Dictionaries are hard to encode into query strings, therefore the“/2/instances/[instance_name]/reinstall” resource is changed to acceptits parameters via the request body. The old query string parameters are...
RAPI: implement no_install during instance creation
Signed-off-by: Lance Albertson <ramereth@gmail.com>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
RAPI: export the node group UUID in the node query
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Export the capability flags in query, rapi, ialloc
Export more information via LUQueryInstances/RAPI
Currently, the custom instance parameters (hv, be, nicp) are onlyqueryable via LUQueryInstanceData. LUQueryInstance returns only thefilled parameters, thus its users (especially RAPI) have no way to know...
Change behaviour of OpDiagnoseOS w.r.t. 'valid'
This patch changes the behaviour of OpDiagnoseOS with regards to the'valid' field to be similar to the one for the hidden/blacklistedfields: unless this field is requested, invalid OSes are filtered out....
rlib2: Set tag operation param “name” to None for cluster tags
Otherwise parameter verification in the master daemon fails.
RAPI: Allow modifying instance
Allow renaming instances via RAPI
RAPI: Support migrating instances
RAPI: Add os params to instance creation v1
Since the RAPI QA suite doesn't seem to offer easy testing of failedcreations, I didn't add this to the QA. Pointers on how to do it arewelcome.
The patch also changes the 'os' argument to be required, since that is...
Update the RAPI node migrate for the 'live' change
This patch adds handling of the new 'mode' parameter to the RAPI server,while keeping compatibility with the old mode. Note that in the old mode(when 'live' is being passed), the auto-mode doesn't work....
Merge remote branch 'origin/devel-2.1'
Conflicts: test/ganeti.rapi.client_unittest.py: Trivial test/ganeti.rapi.rlib2_unittest.py: Trivial...
rlib2: Use constants for disk and NIC parameters
These constants were added in commit bd061c35, but the parsing codewas not updated. This also fixes a bug where a NIC's MAC addresswasn't used.
Add oper_vcpus instance status field
This introduces a new instance status field, named "oper_vcpus".It contains the actual number of VCPUs an instance is using asseen by the hypervisor.
Signed-off-by: Balazs Lecz <leczb@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
RAPI: switch evacuate node to the new model
This patch removes the last use of the old-style OpEvacuateNode. It alsofixes the dry-run mode for this RAPI resource - the dry-run parameterwas not used at all before.
Signed-off-by: Iustin Pop <iustin@google.com>...
RAPI changes for instance moves
Two new resources are added:- /2/instances/$name/prepare-export- /2/instances/$name/export
The documentation for the existing resource for creating instances is updatedfor remote imports. The RAPI client is extended for the new resources....
Merge branch 'devel-2.1'
RAPI: /2/{nodes,instances}/$name should return 404 for unknown items
Currently they return a 500 Server Error, not really usefulfor detecting nonexistent items.
Conflicts: daemons/ganeti-noded lib/daemon.py lib/rapi/baserlib.py lib/rapi/rlib2.py lib/utils.py
Signed-off-by: Luca Bigliardi <shammash@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
RAPI: Add new request data format for instance creation
As mentioned in commit d975f482d, the current way of creating aninstance via RAPI is not very flexible. With this patch, a newinstance creation request data format is introduced and documented.Support can be detected by checking the list of features returned...
Add new /2/features RAPI resource
The /2/features RAPI resource can be used to detect optionalfeatures implemented by the RAPI server. This will be usedto recognize servers implementing a new request format forinstance creation requests.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Fix wrong variable name in commit d975f482
RAPI: Add initial support for instance creation request version
The way the resource /2/instances expects its request data (e.g.instance name, disks, NICs) to be formatted in a dict is notvery extensible. HV and BE parameters are interleaved with allother values. In commit 495cfdf0 a new parameter “mode” was added...
RAPI: Allow waiting for job changes
Conflicts: doc/security.rst trivial lib/cli.py trivial
Signed-off-by: Balazs Lecz <leczb@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Fix heading to the one of epydoc
Signed-off-by: René Nussbaumer <rn@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Improving the RAPI documentation
Adding missing documentation to make the docs better
Also fixed a typo I noticed.
Adding RAPI call to deactivate-disks for an instance
Adding RAPI call for activate-disks on an instance
rapi: Don't access request's private object directly
This way the request handlers don't need as much knowledgeabout the inside of the request and context objects and itmakes the code a bit shorter.
http.server: No longer enfore JSON encoding for body
The HTTP layer shouldn't care about the contents of the request data orresponses. This requires further changes in the RAPI code to handle clientrequests correctly.
Convert to static methods (where appropriate)
Many methods are simple pure functions, and not depending on the objectstate. We convert these to staticmethods.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Add targeted pylint disables
This patch should have only:
- pylint disables- docstring changes- whitespace changes
Merge branch 'devel-2.0' into devel-2.1
Add targetted pylint disables
This patch adds targeted pylint disables, where it makes sense (eitherdue to limitations in pylint or due to historical usage), and also a fewblanket ones in rapi where all the names are… “different”.
Command line/RAPI support for --no-name-check
This patch adds --no-name-check to gnt-instance add and gnt-backupimport. This is opposite to the opcode parameter (name_check) as it issimilar to ip_check and start.
It also adds it to RAPI and gnt-instance batch-create as a parameter in...
Re-add “nic.bridges” field to RAPI bulk instance list
Commit 495cfdf0 removed “nic.bridges” from the defaultlist for bulk instance list RAPI requests.
Code and docstring style fixes
Found using pylint and epydoc.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Update client os lists to name+variant format
List of OSes are displayed by gnt-os list, rapi, and gnt-instancereinstall --select-os, and checked by burnin. In all of these show thelist with name+variant, if the os has variants.
Signed-off-by: Guido Trotter <ultrotter@google.com>...
Export the uuid in RAPI
This also simplifies a little the field declaration in RAPI.
Add RAPI resource to redistribute config
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Luca Bigliardi <shammash@google.com>
Merge branch 'next' into branch-2.1
rapi: export more static node information
Currently not all static node information is exported over rapi, andthis makes it less complete than gnt-node list. This patch attempts toreduce the difference.
rapi: Add /2/instances/[instance_name]/info resource
rapi: Add /2/nodes/[node_name]/storage/repair resource
Simplify handling of boolean args in rapi
This patch replaces hardcoded boolean-type args withbool(_checkIntVariable). There should be no other cases of this left, Ithink.
rapi: Add /2/instances/[instance_name]/replace-disks resource
rlib2: Remove leftover DOC_URI constant
rapi: Add /2/nodes/[node_name]/storage/modify resource
rlib2: Import rapi
This fixes ganeti-rapi which was broken in commit 7a95a954.
rapi: Add /2/nodes/[node_name]/storage resource
rapi: Add /2/nodes/[node_name]/migrate resource
rapi: Add /2/[node_name]/evacuate resource
This can be used to evacuate a node.