source
: hpe3par_host.py
- On HPE 3PAR - Create Host. - Delete Host. - Add Initiator Chap. - Remove Initiator Chap. - Add Target Chap. - Remove Target Chap. - Add FC Path to Host - Remove FC Path from Host - Add ISCSI Path to Host - Remove ISCSI Path from Host
Parameter |
Choices/Defaults |
Comments |
|---|---|---|
|
chap_name
|
|
The chap name.
Required with actions add_initiator_chap, add_target_chap
|
|
chap_secret
|
|
The chap secret for the host or the target
Required with actions add_initiator_chap, add_target_chap
|
|
chap_secret_hex
|
|
If true, then chapSecret is treated as Hex.
|
|
force_path_removal
|
|
If true, remove WWN(s) or iSCSs even if there are VLUNs that are exported to the host.
|
|
host_domain
|
|
Create the host in the specified domain, or in the default domain, if unspecified
|
|
host_fc_wwns
|
|
Set one or more WWNs for the host.
Required with action add_fc_path_to_host, remove_fc_path_from_host
|
|
host_iscsi_names
|
|
Set one or more iSCSI names for the host.
Required with action add_iscsi_path_to_host, remove_iscsi_path_from_host
|
|
host_name
required |
|
Name of the Host.
|
|
host_new_name
required |
|
New name of the Host.
|
|
host_persona
|
|
ID of the persona to assign to the host. Uses the default persona unless you specify the host persona.
|
|
state
required |
|
Whether the specified Host should exist or not. State also provides actions to add and remove initiator and target chap, add fc/iscsi path to host.
|
|
storage_system_ip
required |
|
The storage system IP address.
|
|
storage_system_password
required |
|
The storage system password.
|
|
storage_system_username
required |
|
The storage system user name.
|
Examples --------
- name: Create Host "{{ host_name }}"
hpe3par_host:
storage_system_ip="{{ storage_system_ip }}"
storage_system_username="{{ storage_system_username }}"
storage_system_password="{{ storage_system_password }}"
state=present
host_name="{{ host_name }}"
- name: Modify Host "{{ host_name }}"
hpe3par_host:
storage_system_ip="{{ storage_system_ip }}"
storage_system_username="{{ storage_system_username }}"
storage_system_password="{{ storage_system_password }}"
state=modify
host_name="{{ host_name }}"
host_new_name="{{ host_new_name }}"
- name: Delete Host "{{ new_name }}"
hpe3par_host:
storage_system_ip="{{ storage_system_ip }}"
storage_system_username="{{ storage_system_username }}"
storage_system_password="{{ storage_system_password }}"
state=absent
host_name="{{ host_new_name }}"