spliting metadata
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
This commit is contained in:
@ -15,19 +15,18 @@ import copy
|
||||
|
||||
import otc_metadata.data
|
||||
|
||||
__all__ = ['Service']
|
||||
__all__ = ["Service"]
|
||||
|
||||
BUILTIN_DATA = otc_metadata.data.read_data('docs.yaml')
|
||||
BUILTIN_DATA = otc_metadata.data.read_data("docs.yaml")
|
||||
|
||||
|
||||
def _normalize_type(service_type):
|
||||
if service_type:
|
||||
return service_type.replace('_', '-')
|
||||
return service_type.replace("_", "-")
|
||||
|
||||
|
||||
class Service(object):
|
||||
"""Encapsulation of the OTC Docs data
|
||||
"""
|
||||
"""Encapsulation of the OTC Docs data"""
|
||||
|
||||
def __init__(self):
|
||||
self._service_data = BUILTIN_DATA
|
||||
@ -35,4 +34,4 @@ class Service(object):
|
||||
@property
|
||||
def all_services(self):
|
||||
"Service Categories data listing."
|
||||
return copy.deepcopy(self._service_data['services'])
|
||||
return copy.deepcopy(self._service_data["services"])
|
||||
|
Reference in New Issue
Block a user