huawei.enterprise.hw_enterprise_hyper_domain module – HyperMetro Domain 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_domain.

Synopsis

  • Supports the operations of create, modify, and delete HyperMetro Domain.

  • Support get the details of HyperMetro Domain 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 domain description.

dev_esn

string

Remote device esn required when creat a hyperMetro domain.

dev_id

string

Remote device id required when creat a hyperMetro domain.

dev_name

string

Remote device name required when creat a hyperMetro domain.

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"

  • "remote_devices"

  • "domain_type"

  • "description"

  • "running_status"

hostname

string / required

IP or FQDN of the huawei enterprise management system.

MultiIP config as ip1,ip2

id

string

HyperMetro domain unique id. Either id or name is required when operate HyperMetro Domain.

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

name

string

HyperMetro domain unique name. Either id or name is required when operate HyperMetro Domain.

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

password

string / required

The password of the PowerStore host.

socket_timeout

integer

Huawei Enterprise Storage rest api Timeout time.

Default: 60

state

string

Define whether the HyperMetro Domain 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.

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 Domain
    register: hypermetro_domain_info
    huawei.enterprise.hw_enterprise_hyper_domain:
      hostname: "{{ hostname }}"
      username: "{{ username }}"
      password: "{{ password }}"
      valid_certs: "{{ valid_certs }}"
      socket_timeout: "{{ socket_timeout }}"
      storage_port: "{{ storage_port }}"
      use_log: "{{ use_log }}"
      name: "< hypermetro_domain_name >"
      description: "< description >"
      dev_id:  "< device_id >"
      dev_esn:  "< device_esn >"
      dev_name:  "< device_name >"
      state: "present"

  - name: Modify HyperMetro Domain By Id
    register: hypermetro_domain_info
    huawei.enterprise.hw_enterprise_hyper_domain:
      hostname: "{{ hostname }}"
      username: "{{ username }}"
      password: "{{ password }}"
      valid_certs: "{{ valid_certs }}"
      socket_timeout: "{{ socket_timeout }}"
      storage_port: "{{ storage_port }}"
      use_log: "{{ use_log }}"
      id: "{{ hypermetro_domain_info.hypermetro_domain_detail.id }}"
      new_name: "< hyper_domain_new_name >"
      description: "< description >"
      state: "present"

  - name: Modify HyperMetro Domain By Name
    register: hypermetro_domain_info
    huawei.enterprise.hw_enterprise_hyper_domain:
      hostname: "{{ hostname }}"
      username: "{{ username }}"
      password: "{{ password }}"
      valid_certs: "{{ valid_certs }}"
      socket_timeout: "{{ socket_timeout }}"
      storage_port: "{{ storage_port }}"
      use_log: "{{ use_log }}"
      name: "< hypermetro_domain_name >"
      new_name: "< hypermetro_domain_new_name >"
      description: "< description >"
      state: "present"

  - name: Query Multi HyperMetro Domain
    register: all_hypermetro_domain
    huawei.enterprise.hw_enterprise_hyper_domain:
      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
        - remote_devices
        - domain_type
        - description
        - running_status

  - name: Query HyperMetro Domain By Id
    register: hypermetro_domain_info
    huawei.enterprise.hw_enterprise_hyper_domain:
      hostname: "{{ hostname }}"
      username: "{{ username }}"
      password: "{{ password }}"
      valid_certs: "{{ valid_certs }}"
      socket_timeout: "{{ socket_timeout }}"
      storage_port: "{{ storage_port }}"
      use_log: "{{ use_log }}"
      id: "{{ hypermetro_domain_info.hypermetro_domain_detail.id }}"
      state: "present"
      filter:
        - id
        - name
        - remote_devices
        - domain_type
        - description
        - running_status

  - name: Query HyperMetro Domain By Name
    register: hypermetro_domain_info
    huawei.enterprise.hw_enterprise_hyper_domain:
      hostname: "{{ hostname }}"
      username: "{{ username }}"
      password: "{{ password }}"
      valid_certs: "{{ valid_certs }}"
      socket_timeout: "{{ socket_timeout }}"
      storage_port: "{{ storage_port }}"
      use_log: "{{ use_log }}"
      name: "< hypermetro_domain_name >"
      state: "present"
      filter:
        - id
        - name
        - remote_devices
        - domain_type
        - description
        - running_status

  - name: Delete HyperMetro Domain By Id
    huawei.enterprise.hw_enterprise_hyper_domain:
      hostname: "{{ hostname }}"
      username: "{{ username }}"
      password: "{{ password }}"
      valid_certs: "{{ valid_certs }}"
      socket_timeout: "{{ socket_timeout }}"
      storage_port: "{{ storage_port }}"
      use_log: "{{ use_log }}"
      id: "{{ hypermetro_domain_info.hypermetro_domain_detail.id }}"
      state: "absent"

  - name: Delete HyperMetro Domain By Name
    huawei.enterprise.hw_enterprise_hyper_domain:
      hostname: "{{ hostname }}"
      username: "{{ username }}"
      password: "{{ password }}"
      valid_certs: "{{ valid_certs }}"
      socket_timeout: "{{ socket_timeout }}"
      storage_port: "{{ storage_port }}"
      use_log: "{{ use_log }}"
      name: "< hypermetro_domain_name >"
      state: "absent"

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

hypermetro_domain_detail

complex

Details of the HyperMetro Domain.

Returned: When HyperMetro Domain exists

Sample: {"description": "", "id": "4d56e60-fc10-4f51-a698-3362f0d", "name": "sample_hypemetro_domain", "remote_devices": "[{\"devESN\":\"210235G6LLZ0B8000001\",\"devId\":\"testid\",\"devName\":\"S5600T\"}]", "running_status": "1"}

description

string

HyperMetro domain description.

Returned: success

domain_type

string

HyperMetro domain type.

Returned: success

id

string

The system generated ID given to the HyperMetro Domain.

Returned: success

name

string

Name of the HyperMetro Domain.

Returned: success

remote_devices

list / elements=string

List of remote devices.

Returned: success

running_status

string

HyperMetro domain running status.

Returned: success

remark

string

task execute remark

Returned: always

Sample: "Task sample_hypermetro_domain create successfully"

Authors

  • Huawei eSDK Ansible Team