# write access)
superuser {HA1}ec018ffe72b8e75bb4d508ed5b6d079c read,write
+When using the RAPI, username and password can be sent to the server
+by using the standard HTTP basic access authentication. This means that
+for accessing the protected URL ``https://cluster.example.com/resource``,
+the address ``https://username:password@cluster.example.com/resource`` should
+be used instead.
+Alternatively, the appropriate parameter of your HTTP client
+(such as ``-u`` for ``curl``) can be used.
.. [#pwhash] Using the MD5 hash of username, realm and password is
described in :rfc:`2617` ("HTTP Authentication"), sections 3.2.2.2
.. pyassert::
- constants.IPOLICY_ALL_KEYS == set([constants.ISPECS_MIN,
- constants.ISPECS_MAX,
+ constants.IPOLICY_ALL_KEYS == set([constants.ISPECS_MINMAX,
constants.ISPECS_STD,
constants.IPOLICY_DTS,
constants.IPOLICY_VCPU_RATIO,
.. |ispec-std| replace:: :pyeval:`constants.ISPECS_STD`
-|ispec-min|, |ispec-max|, |ispec-std|
- A sub- `dict` with the following fields, which sets the limit and standard
- values of the instances:
-
- :pyeval:`constants.ISPEC_MEM_SIZE`
- The size in MiB of the memory used
- :pyeval:`constants.ISPEC_DISK_SIZE`
- The size in MiB of the disk used
- :pyeval:`constants.ISPEC_DISK_COUNT`
- The numbers of disks used
- :pyeval:`constants.ISPEC_CPU_COUNT`
- The numbers of cpus used
- :pyeval:`constants.ISPEC_NIC_COUNT`
- The numbers of nics used
- :pyeval:`constants.ISPEC_SPINDLE_USE`
- The numbers of virtual disk spindles used by this instance. They are
- not real in the sense of actual HDD spindles, but useful for
- accounting the spindle usage on the residing node
+:pyeval:`constants.ISPECS_MINMAX`
+ A list of dictionaries, each with the following two fields:
+
+ |ispec-min|, |ispec-max|
+ A sub- `dict` with the following fields, which sets the limit of the
+ instances:
+
+ :pyeval:`constants.ISPEC_MEM_SIZE`
+ The size in MiB of the memory used
+ :pyeval:`constants.ISPEC_DISK_SIZE`
+ The size in MiB of the disk used
+ :pyeval:`constants.ISPEC_DISK_COUNT`
+ The numbers of disks used
+ :pyeval:`constants.ISPEC_CPU_COUNT`
+ The numbers of cpus used
+ :pyeval:`constants.ISPEC_NIC_COUNT`
+ The numbers of nics used
+ :pyeval:`constants.ISPEC_SPINDLE_USE`
+ The numbers of virtual disk spindles used by this instance. They
+ are not real in the sense of actual HDD spindles, but useful for
+ accounting the spindle usage on the residing node
+|ispec-std|
+ A sub- `dict` with the same fields as |ispec-min| and |ispec-max| above,
+ which sets the standard values of the instances.
:pyeval:`constants.IPOLICY_DTS`
A `list` of disk templates allowed for instances using this policy
:pyeval:`constants.IPOLICY_VCPU_RATIO`
.. highlight:: shell-example
-Using wget::
+Using ``wget``::
$ wget -q -O - https://%CLUSTERNAME%:5080/2/info
-or curl::
+or ``curl``::
$ curl https://%CLUSTERNAME%:5080/2/info
+Note: with ``curl``, the request method (GET, POST, PUT) can be specified
+using the ``-X`` command line option, and the username/password can be
+specified with the ``-u`` option. In case of POST requests with a body, the
+Content-Type can be set to JSON (as per the Protocol_ section) using the
+parameter ``-H "Content-Type: application/json"``.
Python
++++++
.. pyassert::
- constants.VALID_STORAGE_TYPES == set([constants.ST_FILE,
- constants.ST_LVM_PV,
- constants.ST_LVM_VG])
+ constants.STS_REPORT == set([constants.ST_FILE,
+ constants.ST_LVM_PV,
+ constants.ST_LVM_VG])
Requests a list of storage units on a node. Requires the parameters
-``storage_type`` (one of :pyeval:`constants.ST_FILE`,
-:pyeval:`constants.ST_LVM_PV` or :pyeval:`constants.ST_LVM_VG`) and
-``output_fields``. The result will be a job id, using which the result
-can be retrieved.
+``storage_type`` for storage types that support space reporting
+(one of :pyeval:`constants.ST_FILE`, :pyeval:`constants.ST_LVM_PV`
+or :pyeval:`constants.ST_LVM_VG`) and ``output_fields``. The result
+will be a job id, using which the result can be retrieved.
.. _rapi-res-nodes-node_name-storage-modify: