huawei.enterprise.hw_enterprise_hyper_pair module – HyperMetro Pair 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_hyper_pair.
Synopsis
Supports the operations of create, delete, modify, start, stop, swap and synchronize HyperMetro Pair On Huawei Enterprise Storage
Support get the details of HyperMetro Pair 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. |
|
HyperMetro domain description. |
|
HyperMetro domain ID. |
|
Parameter required for all query operations. The response will include the storage parameters that match the indicate filter criteria. Choices:
|
|
Primary resource type of the HyperMetro pair. Should setup to 1:LUN. |
|
IP or FQDN of the huawei enterprise management system. MultiIP config as ip1,ip2 |
|
HyperMetro pair unique id. Either id or name is required when operate HyperMetro Pair. id has higher priority than name when both pass to parameter. |
|
Local lun ID. |
|
HyperMetro pair unique name. Either id or name is required when operate HyperMetro Pair. name has lower priority than id when both pass to parameter. |
|
The password of the PowerStore host. |
|
Recovery policy. speed defaults to Choices:
|
|
Remote lun ID. |
|
Huawei Enterprise Storage rest api Timeout time. Default: |
|
Synchronization rate of the HyperMetro pair. speed defaults to Choices:
|
|
Define whether the HyperMetro Pair 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 HyperMetro Pair
register: hypermetro_pair_info
huawei.enterprise.hw_enterprise_hyper_pair:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
hc_resource_type: "lun"
local_obj_id: "< local_obj_id >"
remote_obj_id: "< remote_obj_id >"
domain_id: "< domain_id > "
recovery_policy: "< automatic|manual >"
speed: "< low|medium|high|highest >"
vstore_id: "< vstore_id >"
state: "present"
- name: Modify HyperMetro Pair By Id
register: hypermetro_pair_info
huawei.enterprise.hw_enterprise_hyper_pair:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ hypermetro_pair_info.hypermetro_pair_detail.id }}"
recovery_policy: "< automatic|manual >"
speed: "< low|medium|high|highest >"
state: "present"
- name: Query Multi Hypermetro Pair
register: all_hypermetro_pair
huawei.enterprise.hw_enterprise_hyper_pair:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
state: "present"
vstore_id: "< vstore_id >"
filter:
- id
- health_status
- running_status
- recovery_policy
- speed
- domain_name
- vstore_id
- vstore_name
- name: Query HyperMetro Pair By Id
register: hypermetro_pair_info
huawei.enterprise.hw_enterprise_hyper_pair:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ hypermetro_pair_info.hypermetro_pair_detail.id }}"
state: "present"
filter:
- id
- health_status
- running_status
- recovery_policy
- speed
- domain_name
- vstore_id
- vstore_name
- name: Delete HyperMetro Pair By Id
huawei.enterprise.hw_enterprise_hyper_pair:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
use_log: "{{ use_log }}"
id: "{{ hypermetro_pair_info.hypermetro_pair_detail.id }}"
state: "absent"
- name: Force Start HyperMetro Pair
register: hypermetro_pair_info
huawei.enterprise.hw_enterprise_hyper_pair:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
use_log: "{{ use_log }}"
operation: "start"
id: "{{ hypermetro_pair_info.hypermetro_pair_detail.id }}"
state: "present"
- name: Stop HyperMetro Pair
register: hypermetro_pair_info
huawei.enterprise.hw_enterprise_hyper_pair:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
use_log: "{{ use_log }}"
operation: "stop"
id: "{{ hypermetro_pair_info.hypermetro_pair_detail.id }}"
state: "present"
- name: Swap HyperMetro Pair
register: hypermetro_pair_info
huawei.enterprise.hw_enterprise_hyper_pair:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
use_log: "{{ use_log }}"
operation: "swap"
id: "{{ hypermetro_pair_info.hypermetro_pair_detail.id }}"
state: "present"
- name: Synchronize HyperMetro Pair
register: hypermetro_pair_info
huawei.enterprise.hw_enterprise_hyper_pair:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
use_log: "{{ use_log }}"
operation: "synchronize"
id: "{{ hypermetro_pair_info.hypermetro_pair_detail.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: |
|
Details of the HyperMetro Pair. Returned: When HyperMetro Pair exists Sample: |
|
HyperMetro domain name. Returned: success |
|
HyperMetro pair health status. Returned: success |
|
The system generated ID given to the HyperMetro Pair. Returned: success |
|
HyperMetro pair recovery policy. Returned: success |
|
HyperMetro pair running status. Returned: success |
|
Synchronization rate of the HyperMetro pair. Returned: success |
|
id of storage vstore. Returned: success |
|
name of storage vstore. Returned: success |
|
task execute remark Returned: always Sample: |