huawei.enterprise.hw_enterprise_lun_group module – Lun 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_lun_group.
Synopsis
Supports the provisioning operations on a lun group such as create, modify, associate, disassociate, delete and get the details of a lun 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 |
|---|---|
Application type. Required for v5 Storage when created LUN Group Choices:
|
|
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 lun group. Required when create lun group. |
|
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 |
|
Lun group unique id, Mutually exclusive with “name”, Priority is higher than name. |
|
Id of lun, Required when associate or disassociate lun. Mutually exclusive with “name”, Priority is higher than lun_name. |
|
Id of lun, Required when associate or disassociate lun. Mutually exclusive with “id”, Priority is higher than lun_id. |
|
Lun group unique name, Required for create operation. Mutually exclusive with id. |
|
Lun group new unique name, Required for modify lun group source name. |
|
Required when need associate or disassociate object. Choices:
|
|
The password of the PowerStore host. |
|
Id of snapshot, Required when associate or disassociate snapshot. Mutually exclusive with “name”, Priority is higher than snapshot_name. |
|
Id of snapshot, Required when associate or disassociate snapshot. Mutually exclusive with “id”, Priority is higher than snapshot_id. |
|
Huawei Enterprise Storage rest api Timeout time. Default: |
|
Define whether the lun group 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
The check_mode is not supported.
Description must be set when create lun group.
The modules present in this collection named as ‘huawei.enterprise’ are built to support the Huawei Enterprise Storage System.
Examples
---
tasks:
- name: Create LUN Group
register: lun_group_info
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< lun_group_name >"
description: "< lun_group_description >"
app_type: "< other | oracle | exchange | sqlserver | vmware | hyper_v >"
vstore_id: "< vstore_id >"
state: "present"
- name: Modify LUN Group By Name
register: lun_group_info
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< lun_group_name >"
new_name: "< new_name >"
description: "< lun_group_description >"
vstore_id: "< vstore_id >"
state: "present"
- name: Modify LUN Group By ID
register: lun_group_info
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ lun_group_info.lun_group_detail.id }}"
new_name: "< new_name >"
description: "< lun_group_description >"
vstore_id: "< vstore_id >"
state: "present"
- name: Associate LUN To LUN Group By ID
register: lun_group_info
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ lun_group_info.lun_group_detail.id }}"
lun_id: "< lun_id >"
lun_name: "< lun_name >"
associate_type: "< lun >"
operation: "< associate >"
vstore_id: "< vstore_id >"
state: "present"
- name: Associate LUN To LUN Group By Name
register: lun_group_info
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< lun_group_name >"
lun_id: "< lun_id >"
lun_name: "< lun_name >"
associate_type: "< lun >"
operation: "< associate >"
vstore_id: "< vstore_id >"
state: "present"
- name: Associate Snapshot To LUN Group By ID
register: lun_group_info
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ lun_group_info.lun_group_detail.id }}"
snapshot_id: "< snapshot_id >"
snapshot_name: "< snapshot_name >"
operation: "< associate >"
associate_type: "< snapshot >"
vstore_id: "{{ vstore_id }}"
state: "present"
- name: Associate Snapshot To LUN Group By Name
register: lun_group_info
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< lun_group_name >"
snapshot_id: "< snapshot_id >"
snapshot_name: "< snapshot_name >"
operation: "< associate >"
associate_type: "< snapshot >"
vstore_id: "{{ vstore_id }}"
state: "present"
- name: Disassociate LUN To LUN Group By ID
register: lun_group_info
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ lun_group_info.lun_group_detail.id }}"
lun_id: "< lun_id >"
lun_name: "< lun_name >"
associate_type: "< lun >"
operation: "< disassociate >"
vstore_id: "< vstore_id >"
state: "present"
- name: Disassociate LUN to LUN Group By Name
register: lun_group_info
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< lun_group_name >"
lun_id: "< lun_id >"
lun_name: "< lun_name >"
associate_type: "< lun >"
operation: "< disassociate >"
vstore_id: "< vstore_id >"
state: "present"
- name: Disassociate Snapshot To LUN Group By ID
register: lun_group_info
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ lun_group_info.lun_group_detail.id }}"
snapshot_id: "< snapshot_id >"
snapshot_name: "< snapshot_name >"
operation: "< disassociate >"
associate_type: "< snapshot >"
vstore_id: "< vstore_id >"
state: "present"
- name: Disassociate Snapshot To LUN Group By Name
register: lun_group_info
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< lun_group_name >"
snapshot_id: "< snapshot_id >"
snapshot_name: "< snapshot_name >"
operation: "< disassociate >"
associate_type: "< snapshot >"
vstore_id: "< vstore_id >"
state: "present"
- name: Query LUN Group By ID
register: lun_group_info
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "< lun_group_id >"
vstore_id: "< vstore_id >"
filter:
- id
- name
- description
- vstore_id
- vstore_name
- capacity
- used_capacity
- protection_capacity
- lun_number
- is_add_mapping_view
state: "present"
- name: Query LUN Group By Name
register: lun_group_info
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< lun_group_name >"
vstore_id: "< vstore_id >"
filter:
- id
- name
- description
- vstore_id
- vstore_name
- capacity
- used_capacity
- protection_capacity
- lun_number
- is_add_mapping_view
state: "present"
- name: Query Multi LUN Group
register: all_lun_group
huawei.enterprise.hw_enterprise_lun_group:
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
- description
- vstore_id
- vstore_name
- capacity
- used_capacity
- protection_capacity
- lun_number
- is_add_mapping_view
state: "present"
- name: Delete LUN Group By Name
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< lun_group_name >"
vstore_id: "< vstore_id >"
state: "absent"
- name: Delete LUN Group By ID
huawei.enterprise.hw_enterprise_lun_group:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ lun_group_info.lun_group_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 lun group. Returned: When lun group exists Sample: |
|
Total capacity of lun group. Returned: always |
|
The system generated ID given to the lun group. Returned: always |
|
Is lun group add to mapping view or not. Returned: always |
|
Number of lun in lun group. Returned: always |
|
Name of the lun group. Returned: always |
|
Data protection capacity of lun group. Returned: always |
|
Used capacity of lun group. Returned: always |
|
ID of storage vstore. Returned: always |
|
Name of storage vstore. Returned: always |
|
Task execute remark Returned: always Sample: |