api.py (manila-8.1.3) | : | api.py (manila-8.1.4) | ||
---|---|---|---|---|
skipping to change at line 3789 | skipping to change at line 3789 | |||
@require_context | @require_context | |||
def share_type_get(context, id, inactive=False, expected_fields=None): | def share_type_get(context, id, inactive=False, expected_fields=None): | |||
"""Return a dict describing specific share_type.""" | """Return a dict describing specific share_type.""" | |||
return _share_type_get(context, id, | return _share_type_get(context, id, | |||
session=None, | session=None, | |||
inactive=inactive, | inactive=inactive, | |||
expected_fields=expected_fields) | expected_fields=expected_fields) | |||
def _share_type_get_by_name(context, name, session=None): | def _share_type_get_by_name(context, name, session=None): | |||
result = (model_query(context, models.ShareTypes, session=session). | result = (_share_type_get_query(context, session=session). | |||
options(joinedload('extra_specs')). | ||||
filter_by(name=name). | filter_by(name=name). | |||
first()) | first()) | |||
if not result: | if not result: | |||
raise exception.ShareTypeNotFoundByName(share_type_name=name) | raise exception.ShareTypeNotFoundByName(share_type_name=name) | |||
return _dict_with_specs(result) | return _dict_with_specs(result) | |||
@require_context | @require_context | |||
def share_type_get_by_name(context, name): | def share_type_get_by_name(context, name): | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 1 lines changed or added |