hitachivantara.vspone_block.vsp.hv_vsp_one_snapshot module – Manages snapshots on VSP E series, VSP One Block 20 series, and VSP One Block 80 series storage systems.
Note
This module is part of the hitachivantara.vspone_block collection (version 4.8.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_vsp_one_snapshot.
New in hitachivantara.vspone_block 4.4.0
Synopsis
- This module enables creation, modification, and deletion of snapshots.
- Utilizes the Hitachi Virtual Storage Platform One Simple API for snapshot management across VSP One B20 series, VSP One B80 series, and VSP E series models.
- For usage examples, visit https://github.com/hitachi-vantara/vspone-block-ansible/blob/main/playbooks/vsp_direct/vsp_one_snapshot.yml
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. |
|
password string |
Password for authentication. This is a required field. |
|
username string |
Username for authentication. This is a required field. |
spec dictionary / required | Configuration parameters for the snapshot operation. |
|
master_volume_id string |
Master volume ID of the snapshot. This is a mandatory field for map, restore, and delete snapshot operations. Decimal or hexadecimal value can be provided. |
|
new_snapshots list / elements=dictionary |
List of new snapshots configurations. This is a mandatory field for create snapshot operation. |
|
master_volume_id string / required |
Specify the ID of the master volume from which snapshots are created. Decimal or hexadecimal value can be provided. |
|
pool_id integer / required |
Specify the ID of the pool in which the differential data of the snapshot is stored as an integer in the range from 0 through 127. |
|
snapshot_group_name string / required |
Specify a snapshot group name of up to 32 characters. |
|
type string / required |
Snapshot type. The value can be either snapshot or mapped_snapshot, case insensitive. |
|
pool_id integer |
Specify the ID of the pool in which the differential data of the snapshot is stored as an integer in the range from 0 through 127. This is a mandatory field for map snapshot operation. |
|
should_delete_svol boolean |
Deletes the SVOL if this field is set to true. The default value is false. Choices:
|
|
snapshot_id integer |
Snapshot ID. This is a mandatory field for map, restore, and delete snapshot operations. |
state string | Defines the snapshot operation type. Available options include Choices:
|
Attributes
Attribute | Support | Description |
|---|---|---|
check_mode | Support: none | Specifies whether the module operates in check mode. |
Examples
- name: Create VSP one snapshot pairs
# this is a test comment
hitachivantara.vspone_block.vsp.hv_vsp_one_snapshot:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
new_snapshots:
- master_volume_id: 1229
pool_id: 0
snapshot_group_name: "rd_snapshot_group_1"
type: "snapshot"
- master_volume_id: 28
pool_id: 3
snapshot_group_name: "rd_snapshot_group_4"
type: "snapshot"
- name: Map VSP one snapshot pair
hitachivantara.vspone_block.vsp.hv_vsp_one_snapshot:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
state: "map"
spec:
master_volume_id: 27
snapshot_id: 7
pool_id: 3
- name: Restore VSP one snapshot pair
hitachivantara.vspone_block.vsp.hv_vsp_one_snapshot:
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
state: "restore"
spec:
master_volume_id: 27
snapshot_id: 7
- name: Delete VSP one snapshot pair
hitachivantara.vspone_block.vsp.hv_vsp_one_snapshot:
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
state: "absent"
spec:
master_volume_id: 27
snapshot_id: 7
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
snapshots list / elements=dictionary | Snapshot information returned after operation. For map operation, it returns the information about the mapped volume. Returned: always |
|
id string |
Master volume ID of the snapshot and the snapshot ID, linked by a comma. Returned: success Sample: |
|
is_volume_capacity_expanding boolean |
Indicates if the volume capacity is expanding. Returned: success Sample: |
|
mapped_volume_id integer |
ID of the volume to be created from the snapshots. -1 if not mapped. Returned: success Sample: |
|
mapped_volume_id_hex string |
Mapped volume ID of the snapshot in hexadecimal. Empty if not mapped. Returned: success Sample: |
|
master_volume_id integer |
Master volume ID of the snapshot. Returned: success Sample: |
|
master_volume_id_hex string |
Master volume ID of the snapshot in hexadecimal. Returned: success Sample: |
|
pool_id integer |
ID of the pool in which the differential data of the snapshots is stored. Returned: success Sample: |
|
retention_period integer |
Remaining Retention Time (hours) of the snapshot. 0 if not set or expired. Returned: success Sample: |
|
root_volume_id integer |
ID of the root volume of the snapshots. Returned: success Sample: |
|
root_volume_id_hex string |
Root volume ID of the snapshot in hexadecimal. Returned: success Sample: |
|
snapshot_date string |
Date and time when the snapshot was created. Returned: success Sample: |
|
snapshot_group_name string |
Snapshot group name. Returned: success Sample: |
|
snapshot_id integer |
Snapshot ID. The mirror unit number is obtained. Returned: success Sample: |
|
status string |
Status of the snapshot. Returned: success Sample: |
|
type string |
Type of snapshot. Returned: success Sample: |
|
used_capacity_per_root_volume integer |
The amount of disk space (MiB) occupied by differential information and control information used by the snapshot group created from the same volume. Returned: success Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/hitachivantara/vspone_block/vsp.hv_vsp_one_snapshot_module.html