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:
Hasko, Vladimir 2023-08-03 12:48:36 +00:00 committed by zuul
parent 4541a4e276
commit 19248854d4
225 changed files with 2433 additions and 2143 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/antiddos
html_location: docs/antiddos/api-ref
link: /anti-ddos/api-ref/
pdf_name: antiddos-api-ref
rst_location: api-ref/source
service_type: antiddos
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/antiddos
html_location: docs/antiddos/umn
link: /anti-ddos/umn/
pdf_name: antiddos-umn
rst_location: umn/source
service_type: antiddos
title: User Guide
type: umn

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 @@
---
environment: internal
html_location: docs/apig/api-ref
link: /api-gateway/api-ref/
pdf_name: apig-api-ref
rst_location: api-ref/source
service_type: apig
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
environment: internal
html_location: docs/apig/umn
link: /api-gateway/umn/
pdf_name: apig-umn
rst_location: umn/source
service_type: apig
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/bms
html_location: docs/bms/api-ref
link: /bare-metal-server/api-ref/
pdf_name: bms-api-ref
rst_location: api-ref/source
service_type: bms
title: API Reference
type: api-ref

View File

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

View File

@ -0,0 +1,9 @@
---
hc_location: bpicg/bms
html_location: docs/bms/image-creation-guide
link: /bare-metal-server/image-creation-guide/
pdf_name: bms-image-creation-guide
rst_location: doc/image-creation-guide/source
service_type: bms
title: Private Image Creation Guide
type: image-creation-guide

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/bms
html_location: docs/bms/umn
link: /bare-metal-server/umn/
pdf_name: bms-umn
rst_location: umn/source
service_type: bms
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 @@
---
environment: internal
html_location: docs/cci/api-ref
link: /cloud-container-instance/api-ref/
pdf_name: cci-api-ref
rst_location: api-ref/source
service_type: cci
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
environment: internal
html_location: docs/cci/umn
link: /cloud-container-instance/umn/
pdf_name: cci-umn
rst_location: umn/source
service_type: cci
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/csbs
html_location: docs/csbs/api-ref
link: /cloud-server-backup-service/api-ref/
pdf_name: csbs-api-ref
rst_location: api-ref/source
service_type: csbs
title: API Reference
type: api-ref

View File

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

View File

@ -0,0 +1,9 @@
---
environment: internal
html_location: docs/cse/api-ref
link: /cloud-service-engine/api-ref/
pdf_name: cse-api-ref
rst_location: api-ref/source
service_type: cse
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
environment: internal
html_location: docs/cse/umn
link: /cloud-service-engine/umn/
pdf_name: cse-umn
rst_location: umn/source
service_type: cse
title: User Guide
type: umn

View File

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

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/css
html_location: docs/css/umn
link: /cloud-search-service/umn/
pdf_name: css-umn
rst_location: umn/source
service_type: css
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,8 @@
---
html_location: docs/dataartsstudio/api-ref
link: /data-arts-studio/api-ref/
pdf_name: dataarts_studio-api-ref
rst_location: api-ref/source
service_type: dataarts_studio
title: API Reference
type: api-ref

View File

@ -0,0 +1,8 @@
---
html_location: docs/dataartsstudio/umn
link: /data-arts-studio/umn/
pdf_name: dataarts_studio-umn
rst_location: umn/source
service_type: dataarts_studio
title: User Guide
type: umn

View File

@ -0,0 +1,9 @@
---
environment: internal
html_location: docs/dbss/api-ref
link: /database-security-service/api-ref/
pdf_name: dbss-api-ref
rst_location: api-ref/source
service_type: dbss
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
environment: internal
html_location: docs/dbss/umn
link: /database-security-service/umn/
pdf_name: dbss-umn
rst_location: umn/source
service_type: dbss
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/dcs
html_location: docs/dcs/api-ref
link: /distributed-cache-service/api-ref/
pdf_name: dcs-api-ref
rst_location: api-ref/source
service_type: dcs
title: API Reference
type: api-ref

View File

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

View File

@ -0,0 +1,9 @@
---
environment: internal
html_location: docs/ddm/api-ref
link: /distributed-database-middleware/api-ref/
pdf_name: ddm-api-ref
rst_location: api-ref/source
service_type: ddm
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
environment: internal
html_location: docs/ddm/umn
link: /distributed-database-middleware/umn/
pdf_name: ddm-umn
rst_location: umn/source
service_type: ddm
title: User Guide
type: umn

View File

@ -0,0 +1,8 @@
---
hc_location: api/dds
html_location: docs/dds/api-ref
link: /document-database-service/api-ref/
rst_location: api-ref/source
service_type: dds
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/dds
html_location: docs/dds/umn
link: /document-database-service/umn/
pdf_name: dds-umn
rst_location: umn/source
service_type: dds
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/dis
html_location: docs/dis/api-ref
link: /data-ingestion-service/api-ref/
pdf_name: dis-api-ref
rst_location: api-ref/source
service_type: dis
title: API Reference
type: api-ref

View File

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

View File

@ -0,0 +1,9 @@
---
hc_location: api/dli
html_location: docs/dli/api-ref
link: /data-lake-insight/api-ref/
pdf_name: dli-api-ref
rst_location: api-ref/source
service_type: dli
title: API Reference
type: api-ref

View File

@ -0,0 +1,9 @@
---
hc_location: usermanual/dli
html_location: docs/dli/umn
link: /data-lake-insight/umn/
pdf_name: dli-umn
rst_location: umn/source
service_type: dli
title: User Guide
type: umn

View File

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

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