Red Hat Training

A Red Hat training course is available for Red Hat Gluster Storage

9.3. Actions

The following sections describe the actions associated with host resources.
The API contains a number of possible actions for hosts: install, activate, fence, deactivate, approve, iscsilogin, iscsidiscover and commitnetconfig.
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug

9.3.1. Install Action

Install VDSM and related software on the host. The host type defines additional parameters for the action.
  • Red Hat Enterprise Linux host - This host type requires a root_password element that refers to the password for the host's root user.

Example 9.11. Action to install VDSM to a Red Hat Enterprise Linux host

POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/install HTTP/1.1
Accept: application/xml
Content-type: application/xml

<action>
    <root_password>p@55w0Rd!</root_password>
</action>
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug

9.3.2. Activate Action

Activate the host for use, such as creating bricks.

Example 9.12. Action to activate a host

POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/activate HTTP/1.1
Accept: application/xml
Content-type: application/xml

<action/>
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug

9.3.3. Fence Action

An API user controls a host's power management device with the fence action. The capabilities lists available fence_type options.

Example 9.13. Action to fence a host

POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/fence
Accept: application/xml
Content-Type: application/xml

<action>
    <fence_type>start</fence_type>
</action>
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug

9.3.4. Deactivate Action

Deactivate the host to perform maintenance tasks.

Example 9.14. Action to deactivate a host

POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/deactivate HTTP/1.1
Accept: application/xml
Content-type: application/xml

<action/>
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug

9.3.5. Commit Network Configuration Action

An API user commits the network configuration to persist a host network interface attachment or detachment, or persist the creation and deletion of a bonded interface.

Example 9.15. Action to commit network configuration

POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/commitnetconfig HTTP/1.1
Accept: application/xml
Content-type: application/xml

<action/>

Important

Networking configuration is only committed after the Red Hat Storage Console has established that host connectivity is not lost as a result of the configuration changes. If host connectivity is lost, the host requires a reboot and automatically reverts to the previous networking configuration.
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug