hitachivantara.vspone_block.vsp.hv_hg module – Manages host group on Hitachi VSP storage system.

Note

This module is part of the hitachivantara.vspone_block collection (version 4.4.2).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install hitachivantara.vspone_block. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: hitachivantara.vspone_block.vsp.hv_hg.

New in hitachivantara.vspone_block 3.0.0

Synopsis

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.9

Parameters

Parameter

Comments

connection_info

dictionary / required

Information required to establish a connection to the storage system.

address

string / required

IP address or hostname of the storage system.

api_token

string

Token used to operate on locked resources.

connection_type

string

Type of connection to the storage system.

Choices:

  • "direct" ← (default)

password

string

Password for authentication. This is a required field.

username

string

Username for authentication. This is a required field.

spec

dictionary

Specification for hostgroup operation.

asymmetric_access_priority

string

Asymmetric access priority level for ALUA host group. Required for the Asymmetric access priority level for ALUA host group task.

Choices:

  • "low"

  • "high"

host_group_number

integer

The host group number. Required for the Asymmetric access priority level for ALUA host group /Release the host reservation status by specifying a host group /Release the host reservation status by specifying the LU path tasks.

host_mode

string

Host mode of host group. Optional for the Create a host group task. Required for the Update host mode and host mode options task.

Choices:

  • "LINUX"

  • "VMWARE"

  • "HP"

  • "OPEN_VMS"

  • "TRU64"

  • "SOLARIS"

  • "NETWARE"

  • "WINDOWS"

  • "HI_UX"

  • "AIX"

  • "VMWARE_EXTENSION"

  • "WINDOWS_EXTENSION"

  • "UVM"

  • "HP_XP"

  • "DYNIX"

host_mode_options

list / elements=integer

List of host group host mode option numbers. Optional for the Create a host group task. Required for the Update host mode and host mode options task.

0 # RESERVED

2 # VERITAS_DB_EDITION_ADV_CLUSTER

6 # TPRLO

7 # AUTO_LUN_RECOGNITION

12 # NO_DISPLAY_FOR_GHOST_LUN

13 # SIM_REPORT_AT_LINK_FAILURE

14 # HP_TRUECLUSTER_WITH_TRUECOPY

15 # RAID_HACMP

22 # VERITAS_CLUSTER_SERVER

23 # REC_COMMAND_SUPPORT

25 # SUPPORT_SPC_3_PERSISTENT_RESERVATION

33 # SET_REPORT_DEVICE_ID_ENABLE

39 # CHANGE_NEXUS_SPECIFIED_IN_SCSI_TARGET_RESET

40 # VVOL_EXPANSION

41 # PRIORITIZED_DEVICE_RECOGNITION

42 # PREVENT_OHUB_PCI_RETRY

43 # QUEUE_FULL_RESPONSE

48 # HAM_SVOL_READ

49 # BB_CREDIT_SETUP_1

50 # BB_CREDIT_SETUP_2

51 # ROUND_TRIP_SETUP

52 # HAM_AND_CLUSTER_SW_FOR_SCSI_2

54 # EXTENDED_COPY

57 # HAM_RESPONSE_CHANGE

60 # LUN0_CHANGE_GUARD

61 # EXPANDED_PERSISTENT_RESERVE_KEY

63 # VSTORAGE_APIS_ON_T10_STANDARDS

65 # ROUND_TRIP_EXTENDED_SETUP

67 # CHANGE_OF_ED_TOV_VALUE

68 # PAGE_RECLAMATION_LINUX

69 # ONLINE_LUSE_EXPANSION

71 # CHANGE_UNIT_ATTENTION_FOR_BLOCKED_POOL_VOLS

72 # AIX_GPFS

73 # WS2012

78 # NON_PREFERRED_PATH

91 # DISABLE_IO_WAIT_FOR_OPEN_STACK

95 # CHANGE_SCSI_LU_RESET_NEXUS_VSP_HUS_VM

96 # CHANGE_SCSI_LU_RESET_NEXUS

97 # PROPRIETARY_ANCHOR_COMMAND_SUPPORT

100 # HITACHI_HBA_EMULATION_CONNECTION_OPTION

102 # GAD_STANDARD_INQURY_EXPANSION_HCS

105 # TASK_SET_FULL_RESPONSE_FOR_IO_OVERLOAD

110 # ODX Support for WS2012

113 # iSCSI CHAP Authentication Log

114 # Auto Asynchronous Reclamation on ESXi 6.5+

122 # TASK_SET_FULL_RESPONSE_AFTER_QOS_UPPER_LIMIT

124 # GUARANTEED_RESPONSE_DURING_CONTROLLER_FAILURE

131 # WCE_BIT_OFF_MODE

ldevs

list / elements=string

LDEVs to be mapped/unmapped with the host group. Supported format can be decimal or HEX. Optional for the Create a host group task. Required for the Present LDEVS/Unpresent LDEVS tasks.

lun

integer

LUN ID to be releases the host reservation status of the LU mapped to a specified LU path. Required for the Release the host reservation status by specifying the LU path task.

name

string

Name of the host group. If not given, it will create the name with prefix “smrha-” and add 10 digit random number at the end, for example “smrha-0806262996”. Optional for the Create a host group task. Required for the Update host mode and host mode options/Add WWNs to a host group /Remove WWNs from a host group/Present LDEVS/Unpresent LDEVS/Delete/Change or unset nick name of a WWN tasks.

port

string / required

FC Port. Required for the Create a host group/Update host mode and host mode options/Add WWNs to a host group /Remove WWNs from a host group/Present LDEVS/Unpresent LDEVS/Delete/Change or unset nick name of a WWN /Asymmetric access priority level for ALUA host group/Release the host reservation status by specifying a host group /Release the host reservation status by specifying the LU path tasks.

should_delete_all_ldevs

boolean

If the value is true, destroy the logical devices that are no longer attached to any host group or iSCSI target.

Choices:

  • false

  • true

should_release_host_reserve

boolean

If the value is true, release the host reserve. Required for the Release the host reservation status by specifying a host group /Release the host reservation status by specifying the LU path tasks.

Choices:

  • false

  • true

state

string

Subtask operation.

Choices:

  • "present_ldev"

  • "unpresent_ldev"

  • "add_wwn"

  • "remove_wwn"

  • "set_host_mode_and_hmo"

  • "present" ← (default)

wwns

list / elements=dictionary

List of host WWN to add or remove. Required for the Create a host group/Add WWNs to a host group /Remove WWNs from a host group tasks.

nick_name

string

Nickname of the host. Optional for the Create a host group/Add WWNs to a host group /Remove WWNs from a host group tasks. Required for the Change or unset nick name of a WWN task.

wwn

string / required

WWN of the host. Required for the Create a host group/Add WWNs to a host group /Remove WWNs from a host group/Change or unset nick name of a WWN tasks.

state

string

Set state to present for create and update host group

Set state to absent for delete host group

Choices:

  • "present" ← (default)

  • "absent"

storage_system_info

dictionary

Information about the storage system. This field is an optional field.

serial

string

The serial number of the storage system.

Attributes

Attribute

Support

Description

check_mode

Support: none

Determines if the module should run in check mode.

Notes

Note

  • The output parameters entitlement_status, subscriber_id and partner_id were removed in version 3.4.0. They were also deprecated due to internal API simplification and are no longer supported.

  • Connection type gateway was removed starting from version 3.4.0. Please use an earlier version if you require this connection type.

Examples

- name: Create host group with LDEVs and WWNs
  hitachivantara.vspone_block.vsp.hv_hg:
    state: present
    connection_info:
      address: storage1.company.com
      username: "dummy_user"
      password: "dummy_password"
    spec:
      name: 'testhg26dec'
      port: 'CL1-A'
      host_mode: 'VMWARE_EXTENSION'
      host_mode_options: [40]
      wwns:
        - wwn: '100000109B583B2D'
          nick_name: 'test1'
        - wwn: '100000109B583B2C'
          nick_name: 'test2'
      ldevs: [393, 851]

- name: Delete host group
  hitachivantara.vspone_block.vsp.hv_hg:
    state: absent
    connection_info:
      address: storage1.company.com
      username: "dummy_user"
      password: "dummy_password"
    spec:
      name: 'testhg26dec'
      port: 'CL1-A'

- name: Present LDEVs to hostgroup
  hitachivantara.vspone_block.vsp.hv_hg:
    state: present
    connection_info:
      address: storage1.company.com
      username: "dummy_user"
      password: "dummy_password"
    spec:
      state: present_ldev
      name: 'testhg26dec'
      port: 'CL1-A'
      ldevs: [300, 400]

- name: Unpresent LDEVs from hostgroup
  hitachivantara.vspone_block.vsp.hv_hg:
    state: present
    connection_info:
      address: storage1.company.com
      username: "dummy_user"
      password: "dummy_password"
    spec:
      state: unpresent_ldev
      name: 'testhg26dec'
      port: 'CL1-A'
      ldevs: [800, 801]

- name: Add WWNs to hostgroup
  hitachivantara.vspone_block.vsp.hv_hg:
    state: present
    connection_info:
      address: storage1.company.com
      username: "dummy_user"
      password: "dummy_password"
    spec:
      state: add_wwn
      name: 'testhg26dec'
      port: 'CL1-A'
      wwns:
        - wwn: '200000109B3C0FD3'
          nick_name: 'test1'
        - wwn: '200000109B3C0FD4'
        - wwn: '200000109B3C0FD5'

- name: Remove WWNs from hostgroup
  hitachivantara.vspone_block.vsp.hv_hg:
    state: present
    connection_info:
      address: storage1.company.com
      username: "dummy_user"
      password: "dummy_password"
    spec:
      state: remove_wwn
      name: 'testhg26dec'
      port: 'CL1-A'
      wwns:
        - wwn: '200000109B3C0FD3'

- name: Update host group
  hitachivantara.vspone_block.vsp.hv_hg:
    state: present
    connection_info:
      address: storage1.company.com
      username: "dummy_user"
      password: "dummy_password"
    spec:
      state: set_host_mode_and_hmo
      name: 'testhg26dec'
      port: 'CL1-A'
      host_mode: 'VMWARE_EXTENSION'
      host_mode_options: [54, 63]

- name: Asymmetric access priority level for ALUA host group.
  hitachivantara.vspone_block.vsp.hv_hg:
    state: present
    connection_info:
      address: storage1.company.com
      username: "dummy_user"
      password: "dummy_password"
    spec:
      host_group_number: 208
      port: 'CL1-A'
      asymmetric_access_priority: 'high'

- name: Release the host reservation status by specifying the LU path.
  hitachivantara.vspone_block.vsp.hv_hg:
    state: present
    connection_info:
      address: storage1.company.com
      username: "dummy_user"
      password: "dummy_password"
    spec:
      host_group_number: 150
      port: 'CL1-A'
      should_release_host_reserve: true
      lun: 0

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

hostGroups

dictionary

Information of host group.

Returned: always

host_group_id

integer

ID of the host group.

Returned: success

Sample: 93

host_group_name

string

Name of the host group.

Returned: success

Sample: "ansible-test-hg"

host_mode

string

Host mode of the host group.

Returned: success

Sample: "STANDARD"

host_mode_options

list / elements=dictionary

List of host mode options for the host group.

Returned: success

host_mode_option

string

Name of the host mode option.

Returned: success

Sample: "EXTENDED_COPY"

host_mode_option_number

integer

Number of the host mode option.

Returned: success

Sample: 54

lun_paths

list / elements=dictionary

List of LUN paths for the host group.

Returned: success

ldevId

integer

ID of the logical device.

Returned: success

Sample: 166

lunId

integer

ID of the LUN.

Returned: success

Sample: 0

port

string

Port associated with the host group.

Returned: success

Sample: "CL1-A"

resource_group_id

integer

Resource group ID associated with the host group.

Returned: success

Sample: 0

storage_id

string

Storage ID associated with the host group.

Returned: success

Sample: "storage-39f4eef0175c754bb90417358b0133c3"

wwns

list / elements=dictionary

List of WWNs associated with the host group.

Returned: success

id

string

ID of the WWN.

Returned: success

Sample: "1212121212121212"

name

string

Name of the WWN.

Returned: success

Sample: ""

Authors

  • Hitachi Vantara LTD (@hitachi-vantara)