huawei.enterprise.hw_enterprise_replication_const_group module – Remote Replication Consistency Group 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_replication_const_group.
Synopsis
Supports the operations of create, modify, delete, split, switch, enable ,disable, add pair to Remote ReplicationCgs, remove pair from Remote ReplicationCgs
Support get the details of Remote Replication 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. |
|
Remote Replication Consistency Group description |
|
Link compression. Choices:
|
|
Parameter required for all query operations. The response will include the storage parameters that match the indicate filter criteria. Choices:
|
|
IP or FQDN of the huawei enterprise management system. MultiIP config as ip1,ip2 |
|
Remote Replication Consistency Group unique id. Either id or name is required when operate Remote Replication Consistency Group. id has higher priority than name when both pass to parameter. |
|
ID of remote protection group. Only create replication const group need to set. local_lun_id and remote_lun_id must be set at same time. |
|
Remote Replication Consistency Group unique name. Either id or name is required when operate Remote Replication Consistency Group. name has lower priority than id when both pass to parameter. |
|
Replication pair IDs. |
|
The password of the PowerStore host. |
|
ID of local protection group. Required when create replication const group. |
|
Recovery policy automatic,manual Recovery policy defaults to Choices:
|
|
Remote device ID. Required when create replication const group. |
|
ID of remote protection group. Only create replication const group need to set. local_lun_id and remote_lun_id must be set at same time. |
|
ID of the remote storage pool. Only create replication const group need to set. Mutually exclusive with local_lun_id and remote_lun_id. Priority is higher than local_lun_id and remote_lun_id. |
|
ID of the remote storage vstore. Only create replication const group need to set. |
|
Replication model. Required when create replication const group. Choices:
|
|
Huawei Enterprise Storage rest api Timeout time. Default: |
|
Rate. speed defaults to Choices:
|
|
Define whether the Remote Replication 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.
Currently, specifying name when creating a Replication consistency group is not supported. The name of the Replication consistency group is automatically generated by the storage system based on the protection group name. Therefore, you can configure any str name here during creation. The function of specifying a name to create a Replication consistency group will be supported later once the storage system updates its capabilities.
You Can modify Replication consistency group name after you created it.
The modules present in this collection named as ‘huawei.enterprise’ are built to support the Huawei Enterprise Storage System.
Examples
tasks:
- name: Create Remote Replication Consistency Group
register: remote_replication_cgs_info
huawei.enterprise.hw_enterprise_replication_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: "< name >"
protect_group_id: "< protect_group_id >"
remote_array_id: "< remote_array_id >"
remote_pool_id: "< remote_pool_id >"
remote_vstore_id: "< remote_vstore_id >"
local_lun_id: "< local_lun_id >"
remote_lun_id: "< remote_lun_id >"
replication_model: "< synchronous|asynchronous >"
speed: "< low|medium|high|highest >"
vstore_id: "< vstore_id >"
state: "present"
- name: Modify Remote Replication Consistency Group By Id
register: remote_replication_cgs_info
huawei.enterprise.hw_enterprise_replication_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: "{{ remote_replication_cgs_info.replication_const_group_detail.id }}"
new_name: "< remote_replication_new_name >"
description: "< description >"
speed: "< low|medium|high|highest >"
recovery_policy: "< automatic|manual >"
enable_compression: < true | false >
state: "present"
- name: Modify Remote Replication Consistency Group By Name
register: remote_replication_cgs_info
huawei.enterprise.hw_enterprise_replication_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: "< remote_replication_cgs_name >"
new_name: "< remote_replication_new_name >"
description: "< description >"
speed: "< low|medium|high|highest >"
recovery_policy: "< automatic|manual >"
enable_compression: < true | false >
vstore_id: "< vstore_id >"
state: "present"
- name: Query Multi Replication Consistency Group
register: all_remote_replication_cgs
huawei.enterprise.hw_enterprise_replication_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
- health_status
- running_status
- recovery_policy
- replication_model
- speed
- name: Query Remote Replication Consistency Group By Id
register: remote_replication_cgs_info
huawei.enterprise.hw_enterprise_replication_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: "{{ remote_replication_cgs_info.replication_const_group_detail.id }}"
state: "present"
filter:
- id
- name
- health_status
- running_status
- recovery_policy
- replication_model
- speed
- name: Query Remote Replication Consistency Group By Name
register: remote_replication_cgs_info
huawei.enterprise.hw_enterprise_replication_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: "< remote_replication_cgs_name >"
vstore_id: "< vstore_id >"
state: "present"
filter:
- id
- name
- health_status
- running_status
- recovery_policy
- replication_model
- speed
- name: Delete Remote Replication Consistency Group By Id
huawei.enterprise.hw_enterprise_replication_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: "{{ remote_replication_cgs_info.replication_const_group_detail.id }}"
state: "absent"
- name: Delete Remote Replication Consistency Group By Name
huawei.enterprise.hw_enterprise_replication_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: "< remote_replication_cgs_name >"
vstore_id: "< vstore_id >"
state: "absent"
- name: Synchronize Remote Replication Consistency Group
register: remote_replication_cgs_info
huawei.enterprise.hw_enterprise_replication_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
operation: "synchronize"
id: "{{ remote_replication_cgs_info.replication_const_group_detail.id }}"
state: "present"
- name: Split Remote Replication Consistency Group
register: remote_replication_cgs_info
huawei.enterprise.hw_enterprise_replication_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
operation: "split"
id: "{{ remote_replication_cgs_info.replication_const_group_detail.id }}"
state: "present"
- name: Switch Remote Replication Consistency Group
register: remote_replication_cgs_info
huawei.enterprise.hw_enterprise_replication_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
operation: "switch"
id: "{{ remote_replication_cgs_info.replication_const_group_detail.id }}"
state: "present"
- name: Enable Protection For Remote Replication Consistency Group Secondary Resource
register: remote_replication_cgs_info
huawei.enterprise.hw_enterprise_replication_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
operation: "enable"
id: "{{ remote_replication_cgs_info.replication_const_group_detail.id }}"
access: "read_only"
state: "present"
- name: Disable Protection Remote Replication Consistency Group Secondary Resource
register: remote_replication_cgs_info
huawei.enterprise.hw_enterprise_replication_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
operation: "disable"
id: "{{ remote_replication_cgs_info.replication_const_group_detail.id }}"
access: "read_write"
state: "present"
- name: Add Pair to Remote Replication Consistency Group
register: remote_replication_cgs_info
huawei.enterprise.hw_enterprise_replication_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
operation: "add_pair"
id: "{{ remote_replication_cgs_info.replication_const_group_detail.id }}"
pair_id: "< pair_id >"
state: "present"
- name: Remove Pair to Remote Replication Consistency Group
register: remote_replication_cgs_info
huawei.enterprise.hw_enterprise_replication_const_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
operation: "remove_pair"
id: "{{ remote_replication_cgs_info.replication_const_group_detail.id }}"
pair_id: "< pair_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 Remote Replication Consistency Group. Returned: When host exists Sample: |
|
Remote Replication Consistency Group health status. Returned: success |
|
The system generated ID given to the Remote Replication Consistency Group. Returned: success |
|
Name of the Remote Replication Consistency Group. Returned: success |
|
Remote Replication Consistency Group recovery policy. Returned: success |
|
Replication mode. Returned: success |
|
Remote Replication Consistency Group running status. Returned: success |
|
Rate. Returned: success |
|
id of storage vstore Returned: success |
|
name of storage vstore Returned: success |