diff --git a/cinder/db/sqlalchemy/api.py b/cinder/db/sqlalchemy/api.py index 73968d166e5..2eabaa2d98b 100644 --- a/cinder/db/sqlalchemy/api.py +++ b/cinder/db/sqlalchemy/api.py @@ -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() diff --git a/cinder/volume/qos_specs.py b/cinder/volume/qos_specs.py index 1f5204d1a3d..4e334e7de1d 100644 --- a/cinder/volume/qos_specs.py +++ b/cinder/volume/qos_specs.py @@ -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)