feat: split metadata into smal pieces
All checks were successful
gl/check check status: success (b532f938e9012f7910822aec1adfeb687ee5220b)
gl/gate gate status: success (b532f938e9012f7910822aec1adfeb687ee5220b)

This commit is contained in:
Artem Goncharov 2023-06-01 16:50:12 +02:00
parent 177ba3a3fa
commit b532f938e9
108 changed files with 1133 additions and 538 deletions

View File

@ -9,13 +9,13 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
__all__ = ['__version__', 'Docs'] __all__ = ["__version__", "Docs"]
import pbr.version import pbr.version
from otc_metadata.services import Services # flake8: noqa from otc_metadata.services import Services # flake8: noqa
__version__ = pbr.version.VersionInfo('otc-metadata').version_string() __version__ = pbr.version.VersionInfo("otc-metadata").version_string()
_service_manager = None _service_manager = None

View File

@ -12,30 +12,45 @@
# limitations under the License. # limitations under the License.
import os import os
import pathlib
import yaml import yaml
__all__ = ['read_data'] __all__ = ["read_data"]
DATA_DIR = os.path.dirname(__file__) DATA_DIR = os.path.dirname(__file__)
def read_data(filename): def read_data(filename):
"""Return data that is shipped inside the Python package. """Return data that is shipped inside the Python package."""
"""
filepath = os.path.join(DATA_DIR, filename) filepath = os.path.join(DATA_DIR, filename)
with open(filepath, 'r') as fd: with open(filepath, "r") as fd:
return yaml.safe_load(fd) data = yaml.safe_load(fd)
# Merge data found in individual element files
data.setdefault("documents", list())
data.setdefault("services", list())
data.setdefault("service_categories", list())
for item in pathlib.Path(DATA_DIR, "documents").glob("*.yaml"):
with open(item, "r") as fp:
data["documents"].append(yaml.safe_load(fp))
for item in pathlib.Path(DATA_DIR, "services").glob("*.yaml"):
with open(item, "r") as fp:
data["services"].append(yaml.safe_load(fp))
for item in pathlib.Path(DATA_DIR, "service_categories").glob(
"*.yaml"
):
with open(item, "r") as fp:
data["service_categories"].append(yaml.safe_load(fp))
return data
def rewrite_data(filename, data): def rewrite_data(filename, data):
"""Rewrites data formatting it """Rewrites data formatting it"""
"""
from ruamel.yaml import YAML from ruamel.yaml import YAML
_yaml = YAML() _yaml = YAML()
_yaml.indent(mapping=2, sequence=4, offset=2) _yaml.indent(mapping=2, sequence=4, offset=2)
filepath = os.path.join(DATA_DIR, filename) filepath = os.path.join(DATA_DIR, filename)
with open(filepath, 'w') as fd: with open(filepath, "w") as fd:
_yaml.dump(data, fd) _yaml.dump(data, fd)

View File

@ -0,0 +1,9 @@
---
hc_location: api/aom
html_location: docs/aom/api-ref
link: /application-operations-management/api-ref/
pdf_name: aom-api-ref
rst_location: api-ref/source
service_type: aom
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/aom
html_location: docs/aom/umn
link: /application-operations-management/umn/
pdf_name: aom-umn
rst_location: umn/source
service_type: aom
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/as
html_location: docs/as/api-ref
link: /auto-scaling/api-ref/
pdf_name: as-api-ref
rst_location: api-ref/source
service_type: as
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: devg/as
html_location: docs/as/dev
link: /auto-scaling/dev-guide/
pdf_name: as-dev-guide
rst_location: dev_guide/source
service_type: as
title: Developer Guide
type: dev

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/as
html_location: docs/as/umn
link: /auto-scaling/umn/
pdf_name: as-umn
rst_location: umn/source
service_type: as
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/cbr
html_location: docs/cbr/api-ref
link: /cloud-backup-recovery/api-ref/
pdf_name: cbr-api-ref
rst_location: api-ref/source
service_type: cbr
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/cbr
html_location: docs/cbr/umn
link: /cloud-backup-recovery/umn/
pdf_name: cbr-umn
rst_location: umn/source
service_type: cbr
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api2/cce
html_location: docs/cce/api-ref
link: /cloud-container-engine/api-ref/
pdf_name: cce-api-ref
rst_location: api-ref/source
service_type: cce
title: API Reference
type: api-ref

View File

@ -0,0 +1,8 @@
---
hc_location: usermanual2/cce
html_location: docs/cce/umn
link: /cloud-container-engine/umn/
rst_location: umn/source
service_type: cce
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/ces
html_location: docs/ces/api-ref
link: /cloud-eye/api-ref/
pdf_name: ces-api-ref
rst_location: api-ref/source
service_type: ces
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/ces
html_location: docs/ces/umn
link: /cloud-eye/umn/
pdf_name: ces-umn
rst_location: umn/source
service_type: ces
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/cts
html_location: docs/cts/api-ref
link: /cloud-trace-service/api-ref/
pdf_name: cts-api-ref
rst_location: api-ref/source
service_type: cts
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/cts
html_location: docs/cts/umn
link: /cloud-trace-service/umn/
pdf_name: cts-umn
rst_location: umn/source
service_type: cts
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/dc
html_location: docs/dc/api-ref
link: /direct-connect/api-ref/
pdf_name: dc-api-ref
rst_location: api-ref/source
service_type: dc
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/dc
html_location: docs/dc/umn
link: /direct-connect/umn/
pdf_name: dc-umn
rst_location: umn/source
service_type: dc
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/deh
html_location: docs/deh/api-ref
link: /dedicated-host/api-ref/
pdf_name: deh-api-ref
rst_location: api-ref/source
service_type: deh
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/deh
html_location: docs/deh/umn
link: /dedicated-host/umn/
pdf_name: deh-umn
rst_location: umn/source
service_type: deh
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/dns
html_location: docs/dns/api-ref
link: /domain-name-service/api-ref/
pdf_name: dns-api-ref
rst_location: api-ref/source
service_type: dns
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/dns
html_location: docs/dns/umn
link: /domain-name-service/umn/
pdf_name: dns-umn
rst_location: umn/source
service_type: dns
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/ecs
html_location: docs/ecs/api-ref
link: /elastic-cloud-server/api-ref/
pdf_name: ecs-api-ref
rst_location: api-ref/source
service_type: ecs
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: devg/ecs
html_location: docs/ecs/dev
link: /elastic-cloud-server/dev-guide/
pdf_name: ecs-dev-guide
rst_location: dev_guide/source
service_type: ecs
title: Developer Guide
type: dev

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/ecs
html_location: docs/ecs/umn
link: /elastic-cloud-server/umn/
pdf_name: ecs-umn
rst_location: umn/source
service_type: ecs
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/eip
html_location: docs/eip/api-ref
link: /elastic-ip/api-ref/
pdf_name: eip-api-ref
rst_location: api-ref/source
service_type: eip
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/eip
html_location: docs/eip/umn
link: /elastic-ip/umn/
pdf_name: eip-umn
rst_location: umn/source
service_type: eip
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/elb
html_location: docs/elb/api-ref
link: /elastic-load-balancing/api-ref/
pdf_name: elb-api-ref
rst_location: api-ref/source
service_type: elb
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/elb
html_location: docs/elb/umn
link: /elastic-load-balancing/umn/
pdf_name: elb-umn
rst_location: umn/source
service_type: elb
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/evs
html_location: docs/evs/api-ref
link: /elastic-volume-service/api-ref/
pdf_name: evs-api-ref
rst_location: api-ref/source
service_type: evs
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: devg/evs
html_location: docs/evs/dev
link: /elastic-volume-service/dev-guide/
pdf_name: evs-dev-guide
rst_location: dev_guide/source
service_type: evs
title: Developer Guide
type: dev

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/evs
html_location: docs/evs/umn
link: /elastic-volume-service/umn/
pdf_name: evs-umn
rst_location: umn/source
service_type: evs
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/iam
html_location: docs/iam/api-ref
link: /identity-access-management/api-ref/
pdf_name: iam-api-ref
rst_location: api-ref/source
service_type: iam
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/iam
html_location: docs/iam/umn
link: /identity-access-management/umn/
pdf_name: iam-umn
rst_location: umn/source
service_type: iam
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/ims
html_location: docs/ims/api-ref
link: /image-management-service/api-ref/
pdf_name: ims-api-ref
rst_location: api-ref/source
service_type: ims
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: devg/ims
html_location: docs/ims/dev
link: /image-management-service/dev-guide/
pdf_name: ims-dev-guide
rst_location: dev_guide/source
service_type: ims
title: Developer Guide
type: dev

View File

@ -0,0 +1,8 @@
---
html_location: docs/ims/public-images
link: /image-management-service/public-images/
pdf_name: ims-public-images
rst_location: doc/public-images/source
service_type: ims
title: Public Image Introduction
type: public-images

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/ims
html_location: docs/ims/umn
link: /image-management-service/umn/
pdf_name: ims-umn
rst_location: umn/source
service_type: ims
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/kms
html_location: docs/kms/api-ref
link: /key-management-service/api-ref/
pdf_name: kms-api-ref
rst_location: api-ref/source
service_type: kms
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/kms
html_location: docs/kms/umn
link: /key-management-service/umn/
pdf_name: kms-umn
rst_location: umn/source
service_type: kms
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/nat
html_location: docs/natgw/api-ref
link: /nat-gateway/api-ref/
pdf_name: natgw-api-ref
rst_location: api-ref/source
service_type: natgw
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/nat
html_location: docs/natgw/umn
link: /nat-gateway/umn/
pdf_name: natgw-umn
rst_location: umn/source
service_type: natgw
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/obs
html_location: docs/obs/api-ref
link: /object-storage-service/api-ref/
pdf_name: obs-api-ref
rst_location: api-ref/source
service_type: obs
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: pfs/obs
html_location: docs/obs/pfs
link: /object-storage-service/parallel-file-system/
pdf_name: obs-pfs
rst_location: doc/parallel-file-system/source
service_type: obs
title: Parallel File System (PFS)
type: parallel-file-system

View File

@ -0,0 +1,8 @@
---
html_location: docs/obs/perms-cfg
link: /object-storage-service/permissions-configuration-guide/
pdf_name: obs-perms-cfg
rst_location: doc/permissions-configuration-guide/source
service_type: obs
title: Permissions Configuration Guide
type: permissions-configuration-guide

View File

@ -0,0 +1,9 @@
---
hc_location: api_obs/obs
html_location: docs/obs/s3api
link: /object-storage-service/s3api/
pdf_name: obs-s3api
rst_location: doc/s3api/source
service_type: obs
title: S3 API Reference
type: s3api

View File

@ -0,0 +1,9 @@
---
hc_location: api_swift/obs
html_location: docs/obs/api-swift
link: /object-storage-service/swiftapi/
pdf_name: obs-swiftapi
rst_location: doc/swiftapi/source
service_type: obs
title: API Reference (Swift)
type: swiftapi

View File

@ -0,0 +1,9 @@
---
hc_location: browsertg/obs
html_location: docs/obs/tool
link: /object-storage-service/tool-guide/
pdf_name: obs-tool-guide
rst_location: doc/tool/source
service_type: obs
title: Tool Guide (OBS Browser)
type: tool-guide

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/obs
html_location: docs/obs/umn
link: /object-storage-service/umn/
pdf_name: obs-umn
rst_location: umn/source
service_type: obs
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
hc_location: api/rds
html_location: docs/rds/api-ref
link: /relational-database-service/api-ref/
pdf_name: rds-api-ref
rst_location: api-ref/source
service_type: rds
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/rds
html_location: docs/rds/umn
link: /relational-database-service/umn/
pdf_name: rds-umn
rst_location: umn/source
service_type: rds
title: User Guide
type: umn

Some files were not shown because too many files have changed in this diff Show More