Merge "TrivialFix for the docstring and json format"
This commit is contained in:
commit
a1cc94046d
@ -4337,13 +4337,21 @@ def qos_specs_create(context, values):
|
|||||||
"""Create a new QoS specs.
|
"""Create a new QoS specs.
|
||||||
|
|
||||||
:param values dictionary that contains specifications for QoS
|
:param values dictionary that contains specifications for QoS
|
||||||
e.g. {'name': 'Name',
|
|
||||||
'consumer': 'front-end',
|
Expected format of the input parameter:
|
||||||
'specs': {
|
|
||||||
'total_iops_sec': 1000,
|
.. code-block:: json
|
||||||
'total_bytes_sec': 1024000
|
|
||||||
}
|
{
|
||||||
}
|
'name': 'Name',
|
||||||
|
'consumer': 'front-end',
|
||||||
|
'specs':
|
||||||
|
{
|
||||||
|
'total_iops_sec': 1000,
|
||||||
|
'total_bytes_sec': 1024000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
specs_id = str(uuid.uuid4())
|
specs_id = str(uuid.uuid4())
|
||||||
session = get_session()
|
session = get_session()
|
||||||
|
@ -36,10 +36,18 @@ CONTROL_LOCATION = ['front-end', 'back-end', 'both']
|
|||||||
def create(context, name, specs=None):
|
def create(context, name, specs=None):
|
||||||
"""Creates qos_specs.
|
"""Creates qos_specs.
|
||||||
|
|
||||||
:param specs dictionary that contains specifications for QoS
|
:param specs: Dictionary that contains specifications for QoS
|
||||||
e.g. {'consumer': 'front-end',
|
|
||||||
|
Expected format of the input parameter:
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
'consumer': 'front-end',
|
||||||
'total_iops_sec': 1000,
|
'total_iops_sec': 1000,
|
||||||
'total_bytes_sec': 1024000}
|
'total_bytes_sec': 1024000
|
||||||
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# Validate the key-value pairs in the qos spec.
|
# Validate the key-value pairs in the qos spec.
|
||||||
utils.validate_dictionary_string_length(specs)
|
utils.validate_dictionary_string_length(specs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user