Skip to content

Latest commit

 

History

History
353 lines (344 loc) · 23.1 KB

File metadata and controls

353 lines (344 loc) · 23.1 KB

source

: hpe3par_host.py

hpe3par_host - Manage HPE 3PAR Host

Synopsis

  • 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

Parameters

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
    Choices:
  • no
  • yes
If true, then chapSecret is treated as Hex.
force_path_removal
    Choices:
  • no
  • yes
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
    Choices:
  • GENERIC
  • GENERIC_ALUA
  • GENERIC_LEGACY
  • HPUX_LEGACY
  • AIX_LEGACY
  • EGENERA
  • ONTAP_LEGACY
  • VMWARE
  • OPENVMS
  • HPUX
  • WINDOWS_SERVER
ID of the persona to assign to the host. Uses the default persona unless you specify the host persona.
state
required
    Choices:
  • present
  • absent
  • modify
  • 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
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 }}"