feat: split metadata into smal pieces

Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: gtema <artem.goncharov@gmail.com>
Co-committed-by: gtema <artem.goncharov@gmail.com>
This commit is contained in:
2023-06-02 07:20:02 +00:00
committed by zuul
parent 177ba3a3fa
commit bac06c250f
108 changed files with 1133 additions and 538 deletions

View File

@ -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"])