huawei.enterprise.hw_enterprise_mapping_view module – Mapping view 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_mapping_view.
Synopsis
Supports the provisioning operations on a MappingView such as create, modify, delete and get the details of a Mapping view.
Support query all mapping view on storage.
Support add or remove lun group.
Support add or remove host group.
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. |
|
Description of the Mapping view. Required when create Mapping view. |
|
Parameter required for all query operations. The response will include the storage parameters that match the indicate filter criteria. Choices:
|
|
Id of host group which need to be add or remove. |
|
IP or FQDN of the huawei enterprise management system. MultiIP config as ip1,ip2 |
|
Mapping view unique id, Mutually exclusive with “name”, Priority is higher than name. |
|
Id of lun group which need to be add or remove. |
|
Mapping view unique name, Required for create operation. Mutually exclusive with id. |
|
Mapping view new unique name, Required for modify name operation. |
|
Required when need add or remove host_group/lun_group. Choices:
|
|
The password of the PowerStore host. |
|
Huawei Enterprise Storage rest api Timeout time. Default: |
|
Define whether the mapping view should 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. It defaults to 0:SystemVstore if not specified. |
Notes
Note
description param must be set when create mapping view.
The check_mode is not supported.
Host group associate must be earlier than Lun group, otherwise Lun group associate will failed.
The modules present in this collection named as ‘huawei.enterprise’ are built to support the Huawei Enterprise Storage System.
Examples
---
tasks:
- name: Create Mapping View
register: mapping_view_info
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< mapping_view_name >"
description: "< mapping_view_description >"
vstore_id: "< vstore_id >"
state: "present"
- name: Modify Mapping View By Name
register: mapping_view_info
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< mapping_view_name >"
new_name: "< new_name >"
description: "< mapping_view_description >"
vstore_id: "< vstore_id >"
state: "present"
- name: Modify Mapping View By ID
register: mapping_view_info
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ mapping_view_info.mapping_view_detail.id }}"
new_name: "< new_name >"
description: "< mapping_view_description >"
vstore_id: "< vstore_id >"
state: "present"
- name: Associate Host Group To Mapping View By ID
register: mapping_view_info
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ mapping_view_info.mapping_view_detail.id }}"
host_group_id: "< host_group_id >"
operation: "associate"
vstore_id: "< vstore_id >"
state: "present"
- name: Associate Host Group To Mapping View By Name
register: mapping_view_info
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< mapping_view_name >"
host_group_id: "< host_group_id >"
operation: "associate"
vstore_id: "< vstore_id >"
state: "present"
- name: Associate LUN Group To Mapping View By ID
register: mapping_view_info
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ mapping_view_info.mapping_view_detail.id }}"
lun_group_id: "< lun_group_id >"
operation: "associate"
vstore_id: "< vstore_id >"
state: "present"
- name: Associate LUN Group To Mapping View By Name
register: mapping_view_info
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< mapping_view_name >"
lun_group_id: "< lun_group_id >"
operation: "associate"
vstore_id: "< vstore_id >"
state: "present"
- name: Disassociate LUN Group From Mapping View By ID
register: mapping_view_info
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ mapping_view_info.mapping_view_detail.id }}"
lun_group_id: "< lun_group_id >"
operation: "disassociate"
vstore_id: "< vstore_id >"
state: "present"
- name: Disassociate LUN Group From Mapping View By Name
register: mapping_view_info
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< mapping_view_name >"
lun_group_id: "< lun_group_id >"
operation: "disassociate"
vstore_id: "< vstore_id >"
state: "present"
- name: Disassociate Host Group From Mapping View By ID
register: mapping_view_info
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ mapping_view_info.mapping_view_detail.id }}"
host_group_id: "< host_group_id >"
operation: "disassociate"
vstore_id: "< vstore_id >"
state: "present"
- name: Disassociate Host Group From Mapping View By Name
register: all_mapping_view
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< mapping_view_name >"
host_group_id: "< host_group_id >"
operation: "disassociate"
vstore_id: "< vstore_id >"
state: "present"
- name: Query Mapping View By ID
register: mapping_view_info
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ mapping_view_info.mapping_view_detail.id }}"
vstore_id: "< vstore_id >"
filter:
- id
- name
- vstore_name
- vstore_id
- lun_group_name
- lun_group_id
- host_group_name
- host_group_id
- host_name
- host_id
- description
state: "present"
- name: Query Mapping View By Name
register: mapping_view_info
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< mapping_view_name >"
vstore_id: "< vstore_id >"
filter:
- id
- name
- vstore_name
- vstore_id
- lun_group_name
- lun_group_id
- host_group_name
- host_group_id
- host_name
- host_id
- description
state: "present"
- name: Query Multi Mapping View
register: all_lun_group
huawei.enterprise.hw_enterprise_mapping_view:
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 >"
filter:
- id
- name
- vstore_name
- vstore_id
- lun_group_name
- lun_group_id
- host_group_name
- host_group_id
- host_name
- host_id
- description
state: "present"
- name: Delete Mapping View By Name
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< mapping_view_name >"
vstore_id: "< vstore_id >"
state: "absent"
- name: Delete Mapping View By ID
huawei.enterprise.hw_enterprise_mapping_view:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ mapping_view_info.mapping_view_detail.id }}"
vstore_id: "< vstore_id >"
state: "absent"
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 Mapping view. Returned: When mapping view exists Sample: |
|
The system generated ID given to the host group. Returned: always |
|
Name of the host_group. Returned: always |
|
The system generated ID given to the host. Returned: always |
|
Name of the host. Returned: always |
|
The system generated ID given to the Mapping view. Returned: always |
|
The system generated ID given to the lun group. Returned: always |
|
Name of the lun group. Returned: always |
|
Name of the Mapping view. Returned: always |
|
id of storage vstore. Returned: always |
|
Name of storage vstore. Returned: always |
|
task execute remark Returned: always Sample: |