huawei.enterprise.hw_enterprise_hyper_const_group module – HyperMetro 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_hyper_const_group.

Synopsis

  • Supports the operations of create, modify, delete, synchronize, pause, switch, and start HyperMetro consistency group On Huawei Enterprise Storage

  • Support get the details of HyperMetro 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

custom_vars

dictionary

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.

description

string

HyperMetro Consistency Group description.

domain_id

string

ID of a HyperMetro domain.

Required when create hyper const group.

filter

list / elements=string

Parameter required for all query operations.

The response will include the storage parameters that match the indicate filter criteria.

Choices:

  • "id"

  • "name"

  • "domain_name"

  • "local_pg_name"

  • "rmt_pg_name"

hostname

string / required

IP or FQDN of the huawei enterprise management system.

MultiIP config as ip1,ip2

id

string

HyperMetro Consistency Group unique id.

Either id or name is required when operate HyperMetro Consistency Group.

id has higher priority than name when both pass to parameter.

is_isolation

string

true means Service continuity preferred.

false means Data reliability preferred.

Default is false when not set.

Choices:

  • true

  • false

isolation_threshold_time

string

Disconnection threshold time. unit is ms.

The value range is 10 to 30000.

local_lun_id

string

ID of remote protection group.

Only create hyper const group need to set.

local_lun_id and remote_lun_id must be set at same time.

name

string

HyperMetro Consistency Group unique name.

Either id or name is required when operate HyperMetro Consistency Group.

name has lower priority than id when both pass to parameter.

password

string / required

The password of the PowerStore host.

protect_group_id

string

ID of local protection group.

Required when create hyper const group.

recovery_policy

string

Recovery policy.

Automatic, manual.

Recovery policy defaults to automatic if not specific.

Choices:

  • "automatic"

  • "manual"

remote_device_id

string

ID of the remote storage device.

Required when create hyper const group.

remote_lun_id

string

ID of remote protection group.

Only create hyper const group need to set.

local_lun_id and remote_lun_id must be set at same time.

remote_pool_id

string

ID of the remote storage pool.

Only create hyper 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.

remote_vstore_id

string

ID of the remote storage vstore.

Only create hyper const group need to set.

socket_timeout

integer

Huawei Enterprise Storage rest api Timeout time.

Default: 60

speed

string

Rate.

low,medium,high,highest.

Speed defaults to medium if not specific.

Choices:

  • "low"

  • "medium"

  • "high"

  • "highest"

state

string

Define whether the HyperMetro Consistency Group exist or not.

Choices:

  • "present"

  • "absent"

storage_port

integer

Port number for the Huawei Enterprise array.

If not passed, it will take 8088 as default.

Default: 8088

use_log

boolean

Whether to write plugin log to local filesystem.

Choices:

  • false ← (default)

  • true

username

string / required

The username of the PowerStore host.

valid_certs

string

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.

vstore_id

string

id of storage vstore.

It default to 0:System Vstore if not specified.

Notes

Note

  • The check_mode is not supported.

  • Currently, specifying name when creating a HyperMetro consistency group is not supported. The name of the HyperMetro 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 HyperMetro consistency group will be supported later once the storage system updates its capabilities.

  • You Can modify HyperMetro 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 HyperMetro Consistency Group
    register: hyper_const_group_info
    huawei.enterprise.hw_enterprise_hyper_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: "< hyper_const_group_name >"
      domain_id: "< domain_id >"
      remote_device_id: "< remote_device_id >"
      remote_vstore_id: "< remote_vstore_id >"
      protect_group_id: "< local_pg_id >"
      remote_pool_id: "<remote_pool_id>"
      local_lun_id: "< local_lun_id >"
      remote_lun_id: "< remote_lun_id >"
      state: "present"

  - name: Modify HyperMetro Consistency Group By Id
    register: hyper_const_group_info
    huawei.enterprise.hw_enterprise_hyper_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: "{{ hyper_const_group_info.hyper_const_group_detail.id }}"
      new_name: "< new_name >"
      description: "< description >"
      recovery_policy: "< automatic|manual >"
      is_isolation: "< true | false >"
      isolation_threshold_time: < threshold_time >
      speed: "< low|medium|high|highest >"
      state: "present"

  - name: Modify HyperMetro Consistency Group By Name
    register: hyper_const_group_info
    huawei.enterprise.hw_enterprise_hyper_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: "< hyper_const_group_name >"
      new_name: "{{ hyper_const_group_new_name }}"
      description: "< description >"
      recovery_policy: "< automatic|manual >"
      is_isolation: "< true | false >"
      isolation_threshold_time: < threshold_time >
      speed: "< low|medium|high|highest >"
      vstore_id: " <vstore_id> "
      state: "present"

  - name: Query Multi HyperMetro Consistency Group
    register: all_hyper_const_group
    huawei.enterprise.hw_enterprise_hyper_const_group:
      hostname: "{{ hostname }}"
      username: "{{ username }}"
      password: "{{ password }}"
      valid_certs: "{{ valid_certs }}"
      socket_timeout: "{{ socket_timeout }}"
      storage_port: "{{ storage_port }}"
      use_log: "{{ use_log }}"
      state: "present"
      filter:
        - id
        - name
        - domain_name
        - domain_id
        - local_pg_name
        - local_pg_id
        - rmt_pg_name
        - rmt_pg_id
        - recovery_policy
        - is_isolation
        - isolation_threshold_time
        - speed
        - vstore_id
        - vstore_name
        - description

  - name: Query HyperMetro Consistency Group By Id
    register: hyper_const_group_info
    huawei.enterprise.hw_enterprise_hyper_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: "{{ hyper_const_group_info.hyper_const_group_detail.id }}"
      state: "present"
      filter:
        - id
        - name
        - domain_name
        - domain_id
        - local_pg_name
        - local_pg_id
        - rmt_pg_name
        - rmt_pg_id
        - recovery_policy
        - is_isolation
        - isolation_threshold_time
        - speed
        - vstore_id
        - vstore_name
        - description

  - name: Query HyperMetro Consistency Group By Name
    register: hyper_const_group_info
    huawei.enterprise.hw_enterprise_hyper_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: "< hyper_const_group_name >"
      vstore_id: " <vstore_id> "
      state: "present"
      filter:
        - id
        - name
        - domain_name
        - domain_id
        - local_pg_name
        - local_pg_id
        - rmt_pg_name
        - rmt_pg_id
        - recovery_policy
        - is_isolation
        - isolation_threshold_time
        - speed
        - vstore_id
        - vstore_name
        - description

  - name: Delete HyperMetro Consistency Group By Id
    huawei.enterprise.hw_enterprise_hyper_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: "{{ hyper_const_group_info.hyper_const_group_detail.id }}"
      state: "absent"

  - name: Delete HyperMetro Consistency Group By Name
    huawei.enterprise.hw_enterprise_hyper_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: "< hyper_const_group_name >"
      vstore_id: " <vstore_id> "
      state: "absent"

  - name: Synchronize HyperMetro Consistency Group
    register: hyper_const_group_info
    huawei.enterprise.hw_enterprise_hyper_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: "{{ hyper_const_group_info.hyper_const_group_detail.id }}"
      state: "present"

  - name: Pause HyperMetro Consistency Group
    register: hyper_const_group_info
    huawei.enterprise.hw_enterprise_hyper_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 : "pause"
      id: "{{ hyper_const_group_info.hyper_const_group_detail.id }}"
      state: "present"

  - name: Switch HyperMetro Consistency Group
    register: hyper_const_group_info
    huawei.enterprise.hw_enterprise_hyper_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: "{{ hyper_const_group_info.hyper_const_group_detail.id }}"
      state: "present"

  - name: Force Start HyperMetro Consistency Group
    register: hyper_const_group_info
    huawei.enterprise.hw_enterprise_hyper_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 : "start"
      id: "{{ hyper_const_group_info.hyper_const_group_detail.id }}"
      state: "present"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

actions

list / elements=string

playbook action lists

Returned: always

Sample: ["create"]

changed

boolean

Whether or not the resource has changed.

Returned: always

Sample: false

hyper_const_group_info_detail

complex

Details of the HyperMetro Consistency Group.

Returned: When HyperMetro Consistency Group exists

Sample: {"description": "ansible_test_hyper_const_group", "domain_id": "18cf24f6b2e00101", "domain_name": "BlockHyperMetroDomain_012", "id": "210018cf24f6b2e00000000100000024", "is_isolation": "false", "isolation_threshold_time": "50", "local_pg_id": "27", "local_pg_name": "protect_group_new_name", "name": "ansible_test_hyper_const_group", "recovery_policy": "automatic", "rmt_pg_id": "3", "rmt_pg_name": "wanyu_create_group111", "speed": "medium", "vstore_id": "1", "vstore_name": "zb"}

description

string

Disconnection threshold.

Returned: success

domain_id

string

ID of the Hypermetro domain.

Returned: success

domain_name

string

HyperMetro domain name.

Returned: success

id

string

The system generated ID given to the HyperMetro Consistency Group.

Returned: success

is_isolation

string

Is Service continuity preferred or not.

Returned: success

isolation_threshold_time

string

Disconnection threshold.

Returned: success

local_pg_id

string

Local protection group name.

Returned: success

local_pg_name

string

Local protection group name.

Returned: success

name

string

Name of the HyperMetro Consistency Group.

Returned: success

recovery_policy

string

Disconnection threshold.

Returned: success

rmt_pg_id

string

Remote protection group name.

Returned: success

rmt_pg_name

string

Remote protection group name.

Returned: success

speed

string

Disconnection threshold.

Returned: success

vstore_id

string

Disconnection threshold.

Returned: success

vstore_name

string

Disconnection threshold.

Returned: success

remark

string

task execute remark

Returned: always

Sample: "Task ansible_test_hyper_const_group create successfully"

Authors

  • Huawei eSDK Ansible Team