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.
|
||||
|
||||
:param values dictionary that contains specifications for QoS
|
||||
e.g. {'name': 'Name',
|
||||
'consumer': 'front-end',
|
||||
'specs': {
|
||||
'total_iops_sec': 1000,
|
||||
'total_bytes_sec': 1024000
|
||||
}
|
||||
}
|
||||
|
||||
Expected format of the input parameter:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
'name': 'Name',
|
||||
'consumer': 'front-end',
|
||||
'specs':
|
||||
{
|
||||
'total_iops_sec': 1000,
|
||||
'total_bytes_sec': 1024000
|
||||
}
|
||||
}
|
||||
|
||||
"""
|
||||
specs_id = str(uuid.uuid4())
|
||||
session = get_session()
|
||||
|
@ -36,10 +36,18 @@ CONTROL_LOCATION = ['front-end', 'back-end', 'both']
|
||||
def create(context, name, specs=None):
|
||||
"""Creates qos_specs.
|
||||
|
||||
:param specs dictionary that contains specifications for QoS
|
||||
e.g. {'consumer': 'front-end',
|
||||
:param specs: Dictionary that contains specifications for QoS
|
||||
|
||||
Expected format of the input parameter:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
'consumer': 'front-end',
|
||||
'total_iops_sec': 1000,
|
||||
'total_bytes_sec': 1024000}
|
||||
'total_bytes_sec': 1024000
|
||||
}
|
||||
|
||||
"""
|
||||
# Validate the key-value pairs in the qos spec.
|
||||
utils.validate_dictionary_string_length(specs)
|
||||
|
Loading…
x
Reference in New Issue
Block a user