hitachivantara.vspone_block.vsp.hv_resource_group module – Manages resource groups on VSP block storage systems.
Note
This module is part of the hitachivantara.vspone_block collection (version 4.6.1).
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
This module allows the creation and deletion of resource groups on VSP block storage systems.
It also enables adding or removing various types of resources to/from the resource group.
For examples, go to URL https://github.com/hitachi-vantara/vspone-block-ansible/blob/main/playbooks/vsp_direct/resource_group.yml
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.9
Parameters
Parameter |
Comments |
|---|---|
Information required to establish a connection to the storage system. |
|
IP address or hostname of the storage system. |
|
Token used to operate on locked resources. |
|
Type of connection to the storage system. Choices:
|
|
Password for authentication. This is a required field. |
|
Username for authentication. This is a required field. |
|
Specification for the resource group. |
|
Timeout for an add resource operation. The default timeout is 300 seconds. |
|
Last LDEV number. If you specify this attribute, you must also specify start_ldev. If you specify ldevs, you cannot specify this attribute. Required for add/remove LDEVs using LDEV range by ID. |
|
List of external parity groups to be added or removed from the resource group. |
|
For delete operations, specifies if the operation should be forced. Optional for Delete a Resource Group by ID forcefully. Choices:
|
|
List of host groups to be added or removed from the resource group. Required for Create, Add, or Remove operations involving host groups. |
|
Name of the host group. Required for create/add/remove operations involving host groups. |
|
Port name associated with the host group. Required for create/add/remove operations involving host groups. |
|
The ID of the resource group. Optional for the following tasks: - Add the following resources to an existing Resource Group by ID: LDEVs, ports, host groups, NVM subsystem IDs - Remove the following resources from an existing Resource Group by ID: LDEVs, ports, host groups, NVM subsystem IDs - Delete a Resource Group by ID - Delete a Resource Group by ID forcefully Required for the following tasks: - Add LDEVs using LDEV range to an existing Resource Group by ID - Remove LDEVs using LDEV range from an existing Resource Group by ID |
|
List of iSCSI targets to be added or removed from the resource group. Optional for add/remove operations by Name. |
|
Name of the iSCSI target. Required for add/remove operations by Name. |
|
Port name associated with the iSCSI target. Required for add/remove operations by Name. |
|
List of LDEVs to be added or removed from the resource group. Optional for the Create a Resource Group with LDEVs or with the following resources: LDEVs, parity groups, ports, host groups, NVM subsystem IDs. Also used for add/remove operations by ID or Name. |
|
The name of the resource group. Required for the following tasks: - Create a Resource Group without any resources - Create a Resource Group with virtual storage serial number of VSM - Create a Resource Group with LDEVs - Create a Resource Group with the following resources: LDEVs, parity groups, ports, host groups, NVM subsystem IDs - Create a Resource Group with storage pool IDs and parity groups - Add the following resources to an existing Resource Group by Name: LDEVs, ports, host groups, iSCSI targets - Remove the following resources from an existing Resource Group by Name: LDEVs, ports, host groups, iSCSI targets - Delete a Resource Group by Name |
|
List of NVM subsystem IDs to be added or removed from the resource group. Optional for Create or Add/Remove operations by ID. |
|
List of parity groups to be added or removed from the resource group. Optional for the Create a Resource Group with LDEVs, parity groups, ports, host groups, NVM subsystem IDs, or with storage pool IDs. |
|
List of ports to be added or removed from the resource group. Optional for Create or Add/Remove operations by ID or Name. |
|
First LDEV number. If you specify this attribute, you must also specify end_ldev. If you specify ldevs, you cannot specify this attribute. Required for add/remove LDEVs using LDEV range by ID. |
|
- 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:
|
|
Pool volumes to be added or removed from the resource group. Optional for Create a Resource Group with storage pool IDs and parity groups. |
|
Virtual storage model name associated with the resource group. Required for the Create a Resource Group with virtual storage serial number of VSM task. Choices:
|
|
Virtual storage serial number associated with the resource group. Required for the Create a Resource Group with virtual storage serial number of VSM task. |
|
The desired state of the resource group task. Choices:
|
|
Information about the storage system. This field is optional. |
|
The serial number of the storage system. |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: none |
Determines if the module should run in check mode. |
Notes
Note
If any resource is locked in the target storage system, the operations related to resource groups cannot be performed. In such cases, unlock the resources before running resource group related operations.
Connection type
gatewaywas removed starting from version 3.4.0. Please use an earlier version if you require this connection type.
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 |
|---|---|
The resource group information. Returned: always |
|
List of host groups in the resource group. Returned: success |
|
The ID of the host group. Returned: success Sample: |
|
The name of the host group. Returned: success Sample: |
|
The port name associated with the host group. Returned: success Sample: |
|
The ID of the resource group. Returned: success Sample: |
|
List of iSCSI targets in the resource group. Returned: success |
|
The ID of the iSCSI target. Returned: success Sample: |
|
The name of the iSCSI target. Returned: success Sample: |
|
The port name associated with the iSCSI target. Returned: success Sample: |
|
List of LDEVs in the resource group. Returned: success Sample: |
|
List of LDEVs in hexadecimal format in the resource group. Returned: success Sample: |
|
The lock status of the resource group. Returned: success Sample: |
|
The name of the resource group. Returned: success Sample: |
|
List of parity groups in the resource group. Returned: success Sample: |
|
List of ports in the resource group. Returned: success Sample: |
|
The virtual storage ID associated with the resource group. Returned: success Sample: |
|
The virtual storage serial number associated with the resource group. Returned: success Sample: |