huawei.enterprise.hw_enterprise_smart_qos module – Smart qos 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.
To use it in a playbook, specify: huawei.enterprise.hw_enterprise_smart_qos.
Synopsis
Supports the provisioning operations on a Smart qos such as create, modify, activate, deactivate, associate, disassociate, delete and get the details of a smart qos.
Parameters
Parameter |
Comments |
|---|---|
Object id, Required for associate and disassociate operation. |
|
Object type, Required for associate and disassociate operation. Choices:
|
|
Maximum burst bandwidth, Optional parameters for create and modify operation. The value is an integer ranging from 1 to 999,999,999, expressed in MB/s. |
|
Maximum burst IOPS, Optional parameters for create and modify operation. The value is an integer ranging from 100 to 999,999,999. |
|
Burst time, Optional parameters for create and modify operation. The value is an integer ranging from 1 to 999,999,999 (unit:second). When either one of the burst_bandwidth and burst_iops is delivered, this field must be delivered. |
|
Cycle period of a SmartQoS policy, Optional parameters for create and modify operation. The value is an int array.The cycle period is expressed in days when schedule_policy is set to weekly. 0 to 6 map to Sunday to Saturday. This field is mandatory when schedule_policy is set to weekly. |
|
Smart qos description. |
|
Validity period of SmartQoS policy settings, Required for create operation, Optional parameters for modify operation. The value is smaller than 24 hours. |
|
Parameter required for all query operations. The response will include the storage parameters that match the indicate filter criteria. Choices:
|
|
List of file system ids in a SmartQoS policy, Optional parameters for create and modify operation. This field contains a maximum of 512 file system IDs and is mutually exclusive with lun_list. File systems and LUNs/LUN snapshots cannot coexist in one SmartQoS policy. |
|
list of host ids in a smart qos policy, Optional parameters for create operation. |
|
Smart qos unique id, Mutually exclusive with name, Priority is higher than name. |
|
I/O property information in a SmartQoS policy, Optional parameters for create and modify operation. Choices:
|
|
I/O latency, Optional parameters for create and modify operation. The value can be “500” or “1500”. |
|
list of lun ids in a smart qos policy, Optional parameters for create and modify operation. |
|
Maximum bandwidth of a smart qos policy, Optional parameters for create and modify operation. The value is an integer ranging from 1 to 999,999,999, expressed in MB/s. |
|
Maximum IOPS of a SmartQoS policy, Optional parameters for create and modify operation. The value is an integer ranging from 100 to 999,999,999. |
|
Maximum read I/O bandwidth for a SmartQoS policy, Optional parameters for create and modify operation. The value is an integer ranging from 100 to 999,999,999. |
|
Maximum IOPS of read I/Os for a SmartQoS policy, Optional parameters for create and modify operation. The value is an integer ranging from 100 to 999,999,999. |
|
Maximum read I/O bandwidth for a SmartQoS policy, Optional parameters for create and modify operation. The value is an integer ranging from 100 to 999,999,999. |
|
Maximum IOPS of write I/Os for a SmartQoS policy, Optional parameters for create and modify operation. The value is an integer ranging from 100 to 999,999,999. |
|
Minimum bandwidth, Optional parameters for create and modify operation. The value is an integer ranging from 1 to 999,999,999, expressed in MB/s. |
|
Minimum IOPS, Optional parameters for create and modify operation. The value is an integer ranging from 100 to 999,999,999. |
|
Smart qos unique name, Required for create operation. Mutually exclusive with id. |
|
Smart qos unique new name, optional parameters for modify operation. |
|
Required for activate, associate, deactivate, disassociate operation. Choices:
|
|
Policy type, Optional parameters for create operation. Choices:
|
|
Priority of a SmartQoS policy, Optional parameters for create and modify operation. When the priority of a SmartQoS policy is set to high, the performance objective of the SmartQoS policy is ensured first. The default value is normal. Choices:
|
|
Scheduling policy, Required for create operation, Optional parameters for modify operation. Choices:
|
|
Date (UTC) for SmartQoS policy settings to take effect, Required for create operation, Optional parameters for modify operation. The hour, minute, and second are ignored, and only the values of the year, month, and day are effective (UTC time). |
|
Time for SmartQoS policy settings to take effect, Required for create operation, Optional parameters for modify operation. The time is returned in the hh:mm format. |
|
Define whether the smart qos should exist or not. Choices:
|
|
id of storage vstore. It defaults to 0:SystemVstore if not specified. |
Notes
Note
The check_mode is not supported.
One of the max_bandwidth, max_iops, min_bandwidth, min_iops, latency must be set.
The duration should be greater than or equal to 30 minutes.
When io_type is set to
read_or_write, at least one of max_read_iops, max_read_bandwidth, max_write_iops and max_write_bandwidth must be set.
Examples
---
tasks:
- name: Create SmartQos
register: create_smart_qos_info
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< smart_qos_name >"
schedule_policy: "< once | daily | weekly >"
schedule_start_time: "< schedule_start_time >"
start_time: "< start_time >"
duration: "< duration >"
vstore_id: "< vstore_id >"
description: "< description >"
io_type: "< read_and_write | read_or_write >"
lun_list:
- "< lun_id1 >"
- "< lun_id2 >"
max_bandwidth: "< max_bandwidth_value >"
max_iops: "< max_iops_value >"
priority: "< normal | high >"
cycle_set:
- "< 0 >"
- "< 1 >"
- "< 2 >"
- "< 3 >"
- "< 4 >"
- "< 5 >"
- "< 6 >"
policy_type: "< normal | hierarchical >"
burst_bandwidth: "< burst_bandwidth_value >"
burst_iops: "< burst_iops_value >"
burst_time: "< burst_time >"
host_list:
- "< host_id1 >"
- "< host_id2 >"
min_bandwidth: "< min_bandwidth_value >"
min_iops: "< min_iops_value >"
latency: "< 500 | 1500 >"
fs_list:
- "< fs_id1 >"
- "< fs_id2 >"
max_read_bandwidth: "< max_read_bandwidth_value >"
max_write_bandwidth: "< max_write_bandwidth_value >"
max_read_iops: "< max_read_iops_value >"
max_write_iops: "< max_write_iops_value >"
state: "present"
- name: Modify SmartQos By Id
register: modify_smart_qos_info
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ query_smart_qos_info.smart_qos_detail.id }}"
new_name: "< smart_qos_new_name >"
schedule_policy: "< once | daily | weekly >"
schedule_start_time: "< schedule_start_time >"
start_time: "< start_time >"
duration: "< duration >"
description: "< description >"
io_type: "< read_and_write | read_or_write >"
lun_list:
- "< lun_id1 >"
- "< lun_id2 >"
max_bandwidth: "< max_bandwidth_value >"
max_iops: "< max_iops_value >"
priority: "< normal | high >"
cycle_set:
- "< 0 >"
- "< 1 >"
- "< 2 >"
- "< 3 >"
- "< 4 >"
- "< 5 >"
- "< 6 >"
burst_bandwidth: "< burst_bandwidth_value >"
burst_iops: "< burst_iops_value >"
burst_time: "< burst_time >"
min_bandwidth: "< min_bandwidth_value >"
min_iops: "< min_iops_value >"
latency: "< 500 | 1500 >"
fs_list:
- "< fs_id1 >"
- "< fs_id2 >"
max_read_bandwidth: "< max_read_bandwidth_value >"
max_write_bandwidth: "< max_write_bandwidth_value >"
max_read_iops: "< max_read_iops_value >"
max_write_iops: "< max_write_iops_value >"
state: "present"
- name: Modify SmartQos By Name
register: modify_smart_qos_info
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< smart_qos_name >"
new_name: "< smart_qos_new_name >"
schedule_policy: "< once | daily | weekly >"
schedule_start_time: "< schedule_start_time >"
start_time: "< start_time >"
duration: "< duration >"
vstore_id: "< vstore_id >"
description: "< description >"
io_type: "< read_and_write | read_or_write >"
lun_list:
- "< lun_id1 >"
- "< lun_id2 >"
max_bandwidth: "< max_bandwidth_value >"
max_iops: "< max_iops_value >"
priority: "< normal | high >"
cycle_set:
- "< 0 >"
- "< 1 >"
- "< 2 >"
- "< 3 >"
- "< 4 >"
- "< 5 >"
- "< 6 >"
burst_bandwidth: "< burst_bandwidth_value >"
burst_iops: "< burst_iops_value >"
burst_time: "< burst_time >"
min_bandwidth: "< min_bandwidth_value >"
min_iops: "< min_iops_value >"
latency: "< 500 | 1500 >"
fs_list:
- "< fs_id1 >"
- "< fs_id2 >"
max_read_bandwidth: "< max_read_bandwidth_value >"
max_write_bandwidth: "< max_write_bandwidth_value >"
max_read_iops: "< max_read_iops_value >"
max_write_iops: "< max_write_iops_value >"
state: "present"
- name: Query SmartQos Detail By Name
register: query_smart_qos_info
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< smart_qos_name >"
vstore_id: "< vstore_id >"
filter:
- id
- name
- vstore_name
- vstore_id
- health_status
- running_status
- max_bandwidth
- max_iops
- min_bandwidth
- min_iops
- class_type
- parent_policy_name
- schedule_policy
- schedule_start_time
- start_time
- duration
- description
- lun_list
- priority
- cycle_set
- burst_bandwidth
- burst_iops
- burst_time
- latency
- fs_list
- enable_status
- io_type
- max_read_bandwidth
- max_write_bandwidth
- max_read_iops
- max_write_iops
state: "present"
- name: Query SmartQos Detail By Id
register: query_smart_qos_info
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ query_smart_qos_info.smart_qos_detail.id }}"
filter:
- id
- name
- vstore_name
- vstore_id
- health_status
- running_status
- max_bandwidth
- max_iops
- min_bandwidth
- min_iops
- class_type
- parent_policy_name
- schedule_policy
- schedule_start_time
- start_time
- duration
- description
- lun_list
- priority
- cycle_set
- burst_bandwidth
- burst_iops
- burst_time
- latency
- fs_list
- enable_status
- io_type
- max_read_bandwidth
- max_write_bandwidth
- max_read_iops
- max_write_iops
state: "present"
- name: Query All SmartQos Detail
register: all_smart_qos_info
huawei.enterprise.hw_enterprise_smart_qos:
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
- health_status
- running_status
- max_bandwidth
- max_iops
- min_bandwidth
- min_iops
- class_type
- parent_policy_name
- schedule_policy
- schedule_start_time
- start_time
- duration
- description
- lun_list
- priority
- cycle_set
- burst_bandwidth
- burst_iops
- burst_time
- latency
- fs_list
- enable_status
- io_type
- max_read_bandwidth
- max_write_bandwidth
- max_read_iops
- max_write_iops
state: "present"
- name: Delete SmartQos By Name
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< smart_qos_name >"
vstore_id: "< vstore_id >"
state: "absent"
- name: Delete SmartQos By Id
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ query_smart_qos_info.smart_qos_detail.id }}"
state: "absent"
- name: Activate SmartQos By Name
register: activate_smart_qos_by_name
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< smart_qos_name >"
operation: "activate"
vstore_id: "< vstore_id >"
state: "present"
- name: Activate SmartQos By Id
register: activate_smart_qos_by_id
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ query_smart_qos_info.smart_qos_detail.id }}"
operation: "activate"
state: "present"
- name: DeActivate SmartQos By Name
register: deactivate_smart_qos_by_name
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< smart_qos_name >"
operation: "deactivate"
vstore_id: "< vstore_id >"
state: "present"
- name: DeActivate SmartQos By Id
register: deactivate_smart_qos_by_id
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ query_smart_qos_info.smart_qos_detail.id }}"
operation: "deactivate"
state: "present"
- name: Create SmartQos Associate By Name
register: create_smart_qos_associate
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< smart_qos_name >"
operation: "associate"
associate_obj_id_list:
- "< object_id1 >"
- "< object_id2 >"
associate_obj_type: "< host | smart_qos | lun_group >"
vstore_id: "< vstore_id >"
state: "present"
- name: Create SmartQos Associate By Id
register: create_smart_qos_associate
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ query_smart_qos_info.smart_qos_detail.id }}"
operation: "associate"
associate_obj_id_list:
- "< object_id1 >"
- "< object_id2 >"
associate_obj_type: "< host | smart_qos | lun_group >"
state: "present"
- name: Remove SmartQos Associate By Name
register: remove_smart_qos_associate
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< smart_qos_name >"
operation: "disassociate"
associate_obj_id_list:
- "< object_id1 >"
- "< object_id2 >"
associate_obj_type: "< host | smart_qos | lun_group >"
vstore_id: "< vstore_id >"
state: "present"
- name: Remove SmartQos Associate By Id
register: remove_smart_qos_associate
huawei.enterprise.hw_enterprise_smart_qos:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ query_smart_qos_info.smart_qos_detail.id }}"
operation: "disassociate"
associate_obj_id_list:
- "< object_id1 >"
- "< object_id2 >"
associate_obj_type: "< host | smart_qos | lun_group >"
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: |
|
task execute remark Returned: always Sample: |
|
Details of the smart qos. Returned: When smart qos exists Sample: |
|
Health status. Returned: always |
|
The system generated ID given to the smart qos. Returned: always |
|
Max bandwidth. Returned: always |
|
Max iops. Returned: always |
|
Min bandwidth. Returned: always |
|
Min iops. Returned: always |
|
Name of the smart qos. Returned: always |
|
Running status. Returned: always |
|
Vstore id. Returned: always |
|
Vstore name. Returned: always |