huawei.enterprise.hw_enterprise_replication_pair module – Remote Replication Pairs 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_replication_pair.
Synopsis
Supports the operations of create, modify, delete, synchronize, split, switch, enable or disable Remote Replications Pairs on huawei Enterprise Storage
Support get the details of Remote Replication Pairs
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 pair description |
|
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 Pairs unique id. |
|
ID of the local lun resource. Required when create a remote replication pair. |
|
The password of the PowerStore host. |
|
Remote device ID. |
|
ID of the remote lun resource. Required when create a remote replication group. |
|
Replication model. Synchronous remote replication, asynchronous remote replication. Speed defaults to Choices:
|
|
Huawei Enterprise Storage rest api Timeout time. Default: |
|
Rate. Low,medium,high,highest Speed defaults to Choices:
|
|
Define whether the Remote Replication Pairs 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 Remote Replications Pairs
register: replication_pair_info
huawei.enterprise.hw_enterprise_replication_pair:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
local_lun_id: "< local_lun_id >"
remote_device_id: "< remote_device_id >"
remote_lun_id: "< remote_lun_id >"
replication_model: "< synchronous|asynchronous >"
speed: "< low|medium|high|highest >"
recovery_policy: "< automatic|manual >"
state: "present"
- name: Modify Remote Replications Pairs By Id
register: replication_pair_info
huawei.enterprise.hw_enterprise_replication_pair:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ replication_pair_info.replication_pair_detail.id }}"
speed: "< low|medium|high|highest >"
recovery_policy: "< automatic|manual >"
state: "present"
- name: Query Multi Remote Replication Pairs
register: all_remote_replication_pair
huawei.enterprise.hw_enterprise_replication_pair:
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
- health_status
- running_status
- recovery_policy
- replication_model
- speed
- local_lun_name
- local_lun_id
- remote_lun_name
- remote_lun_id
- local_res_type
- name: Query Remote Replication Pairs By Id
register: replication_pair_info
huawei.enterprise.hw_enterprise_replication_pair:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ replication_pair_info.replication_pair_detail.id }}"
state: "present"
filter:
- id
- health_status
- running_status
- recovery_policy
- replication_model
- speed
- local_lun_name
- local_lun_id
- remote_lun_name
- remote_lun_id
- local_res_type
- name: Delete Remote Replication Pairs detail By Id
huawei.enterprise.hw_enterprise_replication_pair:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ replication_pair_info.replication_pair_detail.id }}"
state: "absent"
- name: Synchronize Remote Replications Pairs
register: replication_pair_info
huawei.enterprise.hw_enterprise_replication_pair:
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: "{{ replication_pair_info.replication_pair_detail.id }}"
state: "present"
- name: Split Remote Replications Pairs
register: replication_pair_info
huawei.enterprise.hw_enterprise_replication_pair:
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: "{{ replication_pair_info.replication_pair_detail.id }}"
state: "present"
- name: Switch Remote Replications Pairs
register: replication_pair_info
huawei.enterprise.hw_enterprise_replication_pair:
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: "{{ replication_pair_info.replication_pair_detail.id }}"
state: "present"
- name: Enable remote Replications Pairs Force Protection Secondary Resource
register: replication_pair_info
huawei.enterprise.hw_enterprise_replication_pair:
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: "{{ replication_pair_info.replication_pair_detail.id }}"
access: "read_only"
state: "present"
- name: Disable remote Replications Pairs Force Protection Secondary Resources
register: replication_pair_info
huawei.enterprise.hw_enterprise_replication_pair:
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: "{{ replication_pair_info.replication_pair_detail.id }}"
access: "read_write"
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 Pair. Returned: When Remote Replication Pair exists Sample: |
|
Remote Replication Pair health status. Returned: success |
|
The system generated ID given to the Remote Replication Pair. Returned: success |
|
ID of the local resource. Returned: success |
|
Name of the local resource. Returned: success |
|
Remote Replication Pair recovery policy. Returned: success |
|
ID of the remote resource. Returned: success |
|
Name of the remote resource. Returned: success |
|
Remote Replication Pair running status. Returned: success |
|
Synchronization rate of the Remote Replication Pair. Returned: success |
|
id of storage vstore Returned: success |
|
name of storage vstore Returned: success |