huawei.enterprise.hw_enterprise_hyper_cdp module – HyperCdp 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_cdp.
Synopsis
Create, delete, modify, revert, cancel_revert and get the detail of a LUN HyperCdp
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. |
|
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 |
|
HyperCdp unique id, Mutually exclusive with “name”, Priority is higher than name. |
|
HyperCdp unique name, Required for create operation. Mutually exclusive with id. |
|
Parent Lun ID, Required for create operation. |
|
The password of the PowerStore host. |
|
Protection period of a secure snapshot. The protection period of a secure snapshot ranges from 1 day to 20 years. |
|
Unit of the secure snapshot protection period. Choices:
|
|
Specifies whether the secure snapshot function is enabled. Choices:
|
|
Huawei Enterprise Storage rest api Timeout time. Default: |
|
Define whether the LUN HyperCdp 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.
The modules present in this collection named as ‘huawei.enterprise’ are built to support the Huawei Enterprise Storage System.
Examples
tasks:
- name: Create HyperCdp
register: hyper_cdp_info
huawei.enterprise.hw_enterprise_hyper_cdp:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< hyper_cdp_name >"
parent_id: "< parent_id >"
secure_snap_enabled: < true|false >
protect_period: "< protect_period >"
protect_period_unit: "< day|month|year >"
vstore_id: "< vstore_id >"
state: "present"
- name: Modify HyperCdp By Id
register: hyper_cdp_info
huawei.enterprise.hw_enterprise_hyper_cdp:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ hyper_cdp_info.hyper_cdp_detail.id }}"
new_name: "< hyper_cdp_new_name >"
secure_snap_enabled: < true|false >
protect_period: "< protect_period >"
protect_period_unit: "< day|month|year >"
state: "present"
- name: Modify HyperCdp By Name
register: hyper_cdp_info
huawei.enterprise.hw_enterprise_hyper_cdp:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< hyper_cdp_name >"
new_name: "< hyper_cdp_new_name >"
secure_snap_enabled: < true|false >
protect_period: "< protect_period >"
protect_period_unit: "< day|month|year >"
vstore_id: "< vstore_id >"
state: "present"
- name: Query Multi HyperCdp
register: all_hyper_cdp
huawei.enterprise.hw_enterprise_hyper_cdp:
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 >"
state: "present"
filter:
- id
- name
- parent_id
- parent_name
- running_status
- speed
- protect_period
- protect_period_unit
- vstore_id
- vstore_name
- name: Query HyperCdp detail By Name
register: hyper_cdp_info
huawei.enterprise.hw_enterprise_hyper_cdp:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< hyper_cdp_name >"
vstore_id: "< vstore_id >"
state: "present"
filter:
- id
- name
- parent_id
- parent_name
- running_status
- speed
- protect_period
- protect_period_unit
- vstore_id
- vstore_name
- name: Query HyperCdp Detail By Id
register: hyper_cdp_info
huawei.enterprise.hw_enterprise_hyper_cdp:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ hyper_cdp_info.hyper_cdp_detail.id }}"
state: "present"
filter:
- id
- name
- parent_id
- parent_name
- running_status
- speed
- protect_period
- protect_period_unit
- vstore_id
- vstore_name
- name: Delete HyperCdp By Name
huawei.enterprise.hw_enterprise_hyper_cdp:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< hyper_cdp_name >"
vstore_id: "< vstore_id >"
state: "absent"
- name: Delete HyperCdp By Id
huawei.enterprise.hw_enterprise_hyper_cdp:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ hyper_cdp_info.hyper_cdp_detail.id }}"
state: "absent"
- name: Revert HyperCdp By Id
register: hyper_cdp_info
huawei.enterprise.hw_enterprise_hyper_cdp:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ hyper_cdp_info.hyper_cdp_detail.id }}"
operation : "revert"
state: "present"
- name: Cancel Revert HyperCdp By Id
register: hyper_cdp_info
huawei.enterprise.hw_enterprise_hyper_cdp:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ hyper_cdp_info.hyper_cdp_detail.id }}"
operation : "cancel_revert"
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 LUN HyperCdp. Returned: When host exists Sample: |
|
The system generated ID given to the HyperCdp. Returned: success |
|
Name of the LUN HyperCdp. Returned: success |
|
Source LUN ID of the HyperCDP object. Returned: success |
|
Source LUN name of the HyperCDP object. Returned: success |
|
Protection period of a secure snapshot. Returned: success |
|
Unit of the secure snapshot protection period. Returned: success |
|
Running status of the HyperCDP object. Returned: success |
|
Rollback speed. Returned: success |
|
id of storage vstore. Returned: always |
|
Name of storage vstore. Returned: always |
|
task execute remark Returned: always Sample: |