Artem Goncharov b532f938e9
All checks were successful
gl/check check status: success (b532f938e9012f7910822aec1adfeb687ee5220b)
gl/gate gate status: success (b532f938e9012f7910822aec1adfeb687ee5220b)
feat: split metadata into smal pieces
2023-06-01 16:51:48 +02:00

38 lines
1.0 KiB
Python

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import copy
import otc_metadata.data
__all__ = ["Service"]
BUILTIN_DATA = otc_metadata.data.read_data("docs.yaml")
def _normalize_type(service_type):
if service_type:
return service_type.replace("_", "-")
class Service(object):
"""Encapsulation of the OTC Docs data"""
def __init__(self):
self._service_data = BUILTIN_DATA
@property
def all_services(self):
"Service Categories data listing."
return copy.deepcopy(self._service_data["services"])