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
This module allows the creation and deletion of resource groups on Hitachi VSP 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.8
Parameters
Parameter |
Comments |
---|---|
Information required to establish a connection to the storage system. |
|
IP address or hostname of the storage system. |
|
This field is used to pass the value of the lock token 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. |
|
For delete operations, specifies if the operation should be forced. Choices:
|
|
List of host groups to be added or removed from the resource group. |
|
Name of the host group. |
|
Port name associated with the host group. |
|
The ID of the resource group. |
|
List of iSCSI targets to be added or removed from the resource group. |
|
Name of the iSCSI target. |
|
Port name associated with the iSCSI target. |
|
List of LDEVs to be added or removed from the resource group. |
|
The name of the resource group. |
|
List of NVM subsystem IDs to be added or removed from the resource group. |
|
List of parity groups to be added or removed from the resource group. |
|
List of ports to be added or removed from the resource group. |
|
Operation to be performed on the resources in the resource group.
Choices:
|
|
Pool volumes to be added or removed from the resource group. |
|
Virtual storage model name associated with the resource group. Choices:
|
|
Virtual storage serial number associated with the resource group. |
|
The desired state of the resource group task. Choices:
|
|
Information about the storage system. This field is an optional field. |
|
The serial number of the storage system. |
Attributes
Attribute |
Support |
Description |
---|---|---|
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 |
---|---|
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: |
|
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: |