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
.
9.3.1. Install Action Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
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'sroot
user.
Example 9.11. Action to install VDSM to a Red Hat Enterprise Linux host
9.3.2. Activate Action Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
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/>
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/activate HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action/>
9.3.3. Fence Action Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
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
9.3.4. Deactivate Action Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
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/>
POST /api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/deactivate HTTP/1.1
Accept: application/xml
Content-type: application/xml
<action/>
9.3.5. Commit Network Configuration Action Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
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/>
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 Gluster 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.