hitachivantara.vspone_block.vsp.hv_resource_group module – Manages resource groups on Hitachi VSP storage systems.

Note

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

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_resource_group.

New in hitachivantara.vspone_block 3.2.0

Synopsis

Requirements

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

  • python >= 3.8

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

This field is used to pass the value of the lock token 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 / required

Specification for the resource group.

force

boolean

For delete operations, specifies if the operation should be forced.

Choices:

  • false ← (default)

  • true

host_groups

list / elements=dictionary

List of host groups to be added or removed from the resource group.

name

string / required

Name of the host group.

port

string / required

Port name associated with the host group.

id

integer

The ID of the resource group.

iscsi_targets

list / elements=dictionary

List of iSCSI targets to be added or removed from the resource group.

name

string / required

Name of the iSCSI target.

port

string / required

Port name associated with the iSCSI target.

ldevs

list / elements=integer

List of LDEVs to be added or removed from the resource group.

name

string

The name of the resource group.

nvm_subsystem_ids

list / elements=integer

List of NVM subsystem IDs to be added or removed from the resource group.

parity_groups

list / elements=string

List of parity groups to be added or removed from the resource group.

ports

list / elements=string

List of ports to be added or removed from the resource group.

state

string

Operation to be performed on the resources in the resource group.

add_resource - To add resources to the resource group.

remove_resource - To remove resources from the resource group.

Choices:

  • "add_resource" ← (default)

  • "remove_resource"

storage_pool_ids

list / elements=integer

Pool volumes to be added or removed from the resource group.

virtual_storage_model

string

Virtual storage model name associated with the resource group.

Choices:

  • "VSP_5100H"

  • "VSP_5200H"

  • "VSP_5500H"

  • "VSP_5600H"

  • "VSP_5100"

  • "VSP_5200"

  • "VSP_5500"

  • "VSP_5600"

  • "VSP_E1090"

  • "VSP_E590"

  • "VSP_E790"

  • "VSP_E990"

  • "VSP_F350"

  • "VSP_F370"

  • "VSP_F400"

  • "VSP_F600"

  • "VSP_F700"

  • "VSP_F800"

  • "VSP_F900"

  • "VSP_G130"

  • "VSP_G150"

  • "VSP_G200"

  • "VSP_G350"

  • "VSP_G370"

  • "VSP_G400"

  • "VSP_G600"

  • "VSP_G700"

  • "VSP_G800"

  • "VSP_G900"

  • "VSP_ONE_B28"

  • "VSP_ONE_B26"

  • "VSP_ONE_B24"

  • "VSP_E790H"

  • "VSP_E590H"

  • "VSP_G1000"

  • "VSP_G1500"

  • "VSP_F1500"

  • "VSP_E1090H"

virtual_storage_serial

string

Virtual storage serial number associated with the resource group.

state

string

The desired state of the resource group task.

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.

Examples

- name: Create a Resource Group with virtual storage serial number of VSM
  hitachivantara.vspone_block.vsp.hv_resource_group:
    connection_info:
      address: storage1.company.com
      username: "admin"
      password: "secret"
    spec:
      name: "my_resource_group_1"
      virtual_storage_serial: "69200"
      virtual_storage_model: "VSP G370"

- name: Get Resource Group by name
  hitachivantara.vspone_block.vsp.hv_resource_group:
    connection_info:
      address: storage1.company.com
      username: "admin"
      password: "secret"
    spec:
      name: "my_resource_group"

- name: Create a Resource Group with LDEVs, parity groups, ports, and host groups
  hitachivantara.vspone_block.vsp.hv_resource_group:
    connection_info:
      address: storage1.company.com
      username: "admin"
      password: "secret"
    spec:
      ldevs: [1, 2, 3]
      parity_groups: ["PG1", "PG2"]
      ports: ["CL1-A", "CL1-C"]
      host_groups:
        - port: "CL1-A"
          name: "my_host_group_1"
        - port: "CL1-A"
          name: "my_host_group_2"

- name: Add resources to an existing Resource Group by ID
  hitachivantara.vspone_block.vsp.hv_resource_group:
    connection_info:
    address: storage1.company.com
    username: "admin"
    password: "secret"
    spec:
    state: add_resource
    id: 4
    ldevs: [3, 4]
    host_groups:
      - port: "CL1-A"
        name: "my_host_group_3"
    iscsi_targets:
      - port: "CL1-C"
        name: "my_iscsi_target_2"

- name: Remove resources from an existing Resource Group by ID
  hitachivantara.vspone_block.vsp.hv_resource_group:
    connection_info:
      address: storage1.company.com
      username: "admin"
      password: "secret"
    spec:
      id: 4
      state: remove_resource
      ldevs: [3, 4]
      host_groups:
        - port: "CL1-A"
          name: "my_host_group_3"
      iscsi_targets:
        - port: "CL1-C"
          name: "my_iscsi_target_2"

- name: Delete a Resource Group by ID forcefully
  hitachivantara.vspone_block.vsp.hv_resource_group:
    connection_info:
      address: storage1.company.com
      username: "admin"
      password: "secret"
    state: absent
    spec:
      id: 4
      force: true

Return Values

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

Key

Description

resource_groups

list / elements=dictionary

The resource group information.

Returned: always

host_groups

list / elements=dictionary

List of host groups in the resource group.

Returned: success

id

integer

The ID of the host group.

Returned: success

Sample: 1

name

string

The name of the host group.

Returned: success

Sample: "my_host_group_1"

port

string

The port name associated with the host group.

Returned: success

Sample: "CL1-A"

id

integer

The ID of the resource group.

Returned: success

Sample: 4

iscsi_targets

list / elements=dictionary

List of iSCSI targets in the resource group.

Returned: success

id

integer

The ID of the iSCSI target.

Returned: success

Sample: 1

name

string

The name of the iSCSI target.

Returned: success

Sample: "my_iscsi_target_1"

port

string

The port name associated with the iSCSI target.

Returned: success

Sample: "CL1-C"

ldevs

list / elements=integer

List of LDEVs in the resource group.

Returned: success

Sample: [1, 2, 3]

lock_status

string

The lock status of the resource group.

Returned: success

Sample: "Unlocked"

name

string

The name of the resource group.

Returned: success

Sample: "my_resource_group"

parity_groups

list / elements=string

List of parity groups in the resource group.

Returned: success

Sample: ["PG1", "PG2"]

ports

list / elements=string

List of ports in the resource group.

Returned: success

Sample: ["CL1-A", "CL1-C"]

Authors

  • Hitachi Vantara LTD (@hitachi-vantara)