huawei.enterprise.hw_enterprise_snap_const_group module – Snapshot Consistency Group Operations for Huawei Enterprise Storage
Note
This module is part of the huawei.enterprise collection (version 2.0.0).
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 huawei.enterprise.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: huawei.enterprise.hw_enterprise_snap_const_group.
Synopsis
Supports the operations of create, modify, delete, active, deActive, rollback, cancelRollBack, restore and mapping Snapshot Consistency Group On Huawei Enterprise Storage
Support get the details of Snapshot Consistency Group information
Requirements
The below requirements are needed on the host that executes this module.
Huawei Dorado v5/v6/v7 and OceanStor v5/v6/v7 Storage
Parameters
Parameter |
Comments |
|---|---|
Parameters used to extend those not currently supported by the module. Configuration needs to be based on the REST API documentation for storage. If necessary, you can contact the plugin technical support for assistance. |
|
Snapshot Consistency Group description |
|
Parameter required for all query operations. The response will include the storage parameters that match the indicate filter criteria. Choices:
|
|
Used to deliver the mapping information. |
|
IP or FQDN of the huawei enterprise management system. MultiIP config as ip1,ip2 |
|
Snapshot Consistency Group unique id. Either id or name is required when operate Snapshot Consistency Group id has higher priority than name when both pass to parameter. |
|
new LUN group name use to mapping Snapshot Consistency Group. |
|
Snapshot Consistency Group unique name. Either id or name is required when operate Snapshot Consistency Group. name has lower priority than id when both pass to parameter. |
|
Parent object ID (Snapshot Consistency Group ID). Required when creating snapshot |
|
The password of the PowerStore host. |
|
Huawei Enterprise Storage rest api Timeout time. Default: |
|
Rollback speed Choices:
|
|
Define whether the Snapshot Consistency Group exist or not. Choices:
|
|
Port number for the Huawei Enterprise array. If not passed, it will take 8088 as default. Default: |
|
Whether to write plugin log to local filesystem. Choices:
|
|
The username of the PowerStore host. |
|
The path of the SSL certificate variable to specify whether to validate SSL certificate or not. If don’t set means no need to verify ssl cert. |
|
id of storage vstore vstore id default to 0:System Vstore if not specified. |
Notes
Note
The check_mode is not supported.
The modules present in this collection named as ‘huawei.enterprise’ are built to support the Huawei Enterprise Storage System.
Examples
tasks:
- name: Create SnapshotCGs
register: snapshot_cgs_info
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< snapshot_cgs_name >"
parent_id: "< parent_id >"
description: "< description >"
vstore_id: "< vstore_id >"
state: "present"
- name: Modify SnapshotCGs By ID
register: snapshot_cgs_info
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ snapshot_cgs_info.snapshot_cgs_detail.id }}"
new_name: "< snapshot_cgs_new_name >"
speed: "< low|medium|high|highest >"
description: "< description >"
state: "present"
- name: Modify SnapshotCGs By Name
register: snapshot_cgs_info
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< snapshot_cgs_name >"
new_name: "< snapshot_cgs_new_name >"
speed: "< low|medium|high|highest >"
description: "< description >"
vstore_id: "< vstore_id >"
state: "present"
- name: Query Multi SnapshotCGs
register: all_snapshot_cgs
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
vstore_id: "< vstore_id >"
state: "present"
filter:
- id
- name
- vstore_name
- vstore_id
- parent_id
- parent_name
- description
- speed
- running_status
- name: Query SnapshotCGs By ID
register: snapshot_cgs_info
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ snapshot_cgs_info.snapshot_cgs_detail.id }}"
state: "present"
filter:
- id
- name
- vstore_name
- vstore_id
- parent_id
- parent_name
- description
- speed
- running_status
- name: Query SnapshotCGs By Name
register: snapshot_cgs_info
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< snapshot_cgs_name >"
vstore_id: "< vstore_id >"
state: "present"
filter:
- id
- name
- vstore_name
- vstore_id
- parent_id
- parent_name
- description
- speed
- running_status
- name: Delete SnapshotCGs By ID
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ snapshot_cgs_info.snapshot_cgs_detail.id }}"
state: "absent"
- name: Delete SnapshotCGs By Name
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< snapshot_cgs_name >"
vstore_id: "< vstore_id >"
state: "absent"
- name: Active SnapshotCGs
register: snapshot_cgs_info
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ snapshot_cgs_info.snapshot_cgs_detail.id }}"
name: "< snapshot_cgs_name >"
vstore_id: "< vstore_id >"
operation: "active"
state: "present"
- name: DeActive SnapshotCGs
register: snapshot_cgs_info
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ snapshot_cgs_info.snapshot_cgs_detail.id }}"
name: "< snapshot_cgs_name >"
vstore_id: "< vstore_id >"
operation: "de_active"
state: "present"
- name: RollBack SnapshotCGs
register: snapshot_cgs_info
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ snapshot_cgs_info.snapshot_cgs_detail.id }}"
name: "< snapshot_cgs_name >"
vstore_id: "< vstore_id >"
operation: "rollback"
state: "present"
- name: CancelRollBack SnapshotCGs
register: snapshot_cgs_info
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ snapshot_cgs_info.snapshot_cgs_detail.id }}"
name: "< snapshot_cgs_name >"
vstore_id: "< vstore_id >"
operation: "cancel_rollback"
state: "present"
- name: Restore SnapshotCGs
register: snapshot_cgs_info
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ snapshot_cgs_info.snapshot_cgs_detail.id }}"
name: "< snapshot_cgs_name >"
vstore_id: "< vstore_id >"
operation: "restore"
state: "present"
- name: Mapping SnapshotCGs
register: snapshot_cgs_info
huawei.enterprise.hw_enterprise_snap_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ snapshot_cgs_info.snapshot_cgs_detail.id }}"
name: "< snapshot_cgs_name >"
vstore_id: "< vstore_id >"
operation: "mapping"
lun_group_name: "{{ lun_group_name }}"
host_id: "{{ host_id }}"
state: "present"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
playbook action lists Returned: always Sample: |
|
Whether or not the resource has changed. Returned: always Sample: |
|
task execute remark Returned: always Sample: |
|
Details of the Snapshot Consistency Group. Returned: When Snapshot Consistency Group exists Sample: |
|
description of snapshot consistent group. Returned: success |
|
The system generated ID given to the Snapshot Consistency Group. Returned: always |
|
Name of the Snapshot Consistency Group. Returned: always |
|
ID of the parent object (LUN consistency group ID). Returned: always |
|
Name of the parent object (LUN consistency group ID). Returned: always |
|
HyperMetro domain name. Returned: always |
|
Rollback speed. Returned: always |
|
id of storage vstore. Returned: always |
|
name of storage vstore. Returned: always |