forked from infra/otc-metadata
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
03ecab9755 | |||
ec59663c39 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -59,6 +59,3 @@ ChangeLog
|
||||
|
||||
# Files created by releasenotes build
|
||||
releasenotes/build
|
||||
|
||||
bindep.txt
|
||||
packages.txt
|
44
README.rst
44
README.rst
@ -1,9 +1,6 @@
|
||||
============
|
||||
otc-metadata
|
||||
============
|
||||
|
||||
Link: ssh://git@gitea.eco.tsi-dev.otc-service.com:2222/infra/otc-metadata.git
|
||||
|
||||
===============================
|
||||
ssh://git@gitea.eco.tsi-dev.otc-service.com:2222/infra/otc-metadata.git
|
||||
===============================
|
||||
|
||||
Metadata about OTC for Ecosystem
|
||||
|
||||
@ -16,39 +13,6 @@ Note that this is a hard requirement.
|
||||
* Source: https://github.com/infra/ssh://git@gitea.eco.tsi-dev.otc-service.com:2222/infra/otc-metadata.git
|
||||
|
||||
Features
|
||||
========
|
||||
--------
|
||||
|
||||
* TODO
|
||||
|
||||
Overview: service.yaml
|
||||
======================
|
||||
|
||||
The :code:`service.yaml` file contains all data about services, service
|
||||
categories and the related documents of each service. The file is
|
||||
used as a base for several internal and external applications or
|
||||
websites like the Helpcenter 3.0 where the information about the document
|
||||
repositories and its properties are stored.
|
||||
|
||||
File structure
|
||||
--------------
|
||||
|
||||
The file is based on the yaml-file format and has three main sections
|
||||
which can be compared with database tables in a relational database.
|
||||
|
||||
* documents: contains the information about every single document and its type
|
||||
like umn, api-ref etc.
|
||||
|
||||
* service category: contains the keyword and title of the service category
|
||||
|
||||
* services: contains the repository information about the internal (Gitea) and
|
||||
external location (GitHub) and all the necessary parameters of the service itself
|
||||
|
||||
These sections, or better "tables" have
|
||||
their own keys and foreign keys so that the tables are linked together and
|
||||
the related information can be fetched.
|
||||
For the :code:`services` table
|
||||
the key is :code:`service_type` which has the foreign key in the
|
||||
:code:`documents` table. So a service can have multiple documents and each
|
||||
document can only be linked to one service.
|
||||
The key :code:`service_category` table is :code:`name` of the service category
|
||||
which is then used in the :code:`services` table as foreign key.
|
||||
|
@ -9,13 +9,13 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
__all__ = ["__version__", "Docs"]
|
||||
__all__ = ['__version__', 'Docs']
|
||||
|
||||
import pbr.version
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
@ -12,45 +12,30 @@
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
import yaml
|
||||
|
||||
__all__ = ["read_data"]
|
||||
__all__ = ['read_data']
|
||||
|
||||
DATA_DIR = os.path.dirname(__file__)
|
||||
|
||||
|
||||
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)
|
||||
with open(filepath, "r") as 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
|
||||
with open(filepath, 'r') as fd:
|
||||
return yaml.safe_load(fd)
|
||||
|
||||
|
||||
def rewrite_data(filename, data):
|
||||
"""Rewrites data formatting it"""
|
||||
from ruamel.yaml import YAML
|
||||
"""Rewrites data formatting it
|
||||
|
||||
"""
|
||||
from ruamel.yaml import YAML
|
||||
_yaml = YAML()
|
||||
_yaml.indent(mapping=2, sequence=4, offset=2)
|
||||
filepath = os.path.join(DATA_DIR, filename)
|
||||
with open(filepath, "w") as fd:
|
||||
with open(filepath, 'w') as fd:
|
||||
_yaml.dump(data, fd)
|
||||
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: api/antiddos
|
||||
html_location: docs/antiddos/api-ref
|
||||
link: /anti-ddos/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: antiddos
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: usermanual/antiddos
|
||||
html_location: docs/antiddos/umn
|
||||
link: /anti-ddos/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: antiddos
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: api/aom
|
||||
html_location: docs/aom/api-ref
|
||||
link: /application-operations-management/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: aom
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: usermanual/aom
|
||||
html_location: docs/aom/umn
|
||||
link: /application-operations-management/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: aom
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
environment: internal
|
||||
hc_location: api/aom2
|
||||
html_location: docs/aom2/api-ref
|
||||
link: /application-operations-management-2/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: aom2
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
environment: internal
|
||||
hc_location: usermanual/aom2
|
||||
html_location: docs/aom2/umn
|
||||
link: /application-operations-management-2/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: aom2
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: api/apig
|
||||
html_location: docs/apig/api-ref
|
||||
link: /api-gateway/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: apig
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
environment: hidden
|
||||
hc_location: devg/apig
|
||||
html_location: docs/apig/dev
|
||||
link: /api-gateway/dev-guide/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: dev_guide/source
|
||||
service_type: apig
|
||||
title: Developer Guide
|
||||
type: dev
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: usermanual/apig
|
||||
html_location: docs/apig/umn
|
||||
link: /api-gateway/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: apig
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: api-usage/guidelines
|
||||
html_location: docs/apiu/guidelines
|
||||
link: /api-usage/guidelines/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: doc/guidelines/source
|
||||
service_type: apiu
|
||||
title: API Usage Guidelines
|
||||
type: guidelines
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
environment: internal
|
||||
hc_location: api/apm
|
||||
html_location: docs/apm/api-ref
|
||||
link: /application-performance-management/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: apm
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
environment: public
|
||||
hc_location: usermanual/apm
|
||||
html_location: docs/apm/umn
|
||||
link: /application-performance-management/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: apm
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: api/as
|
||||
html_location: docs/as/api-ref
|
||||
link: /auto-scaling/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: as
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: devg/as
|
||||
html_location: docs/as/dev
|
||||
link: /auto-scaling/dev-guide/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: dev_guide/source
|
||||
service_type: as
|
||||
title: Developer Guide
|
||||
type: dev
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: usermanual/as
|
||||
html_location: docs/as/umn
|
||||
link: /auto-scaling/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: as
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
environment: public
|
||||
hc_location: api/asm
|
||||
html_location: docs/asm/api-ref
|
||||
link: /application-service-mesh/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: asm
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,12 +0,0 @@
|
||||
---
|
||||
hc_location: bestpractice/asm
|
||||
environment: internal
|
||||
html_location: docs/asm/best-practice
|
||||
link: /application-service-mesh/best-practice/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: doc/best-practice/source
|
||||
service_type: asm
|
||||
title: Best Practice
|
||||
type: best-practice
|
||||
disable_import: true
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
environment: public
|
||||
hc_location: usermanual/asm
|
||||
html_location: docs/asm/umn
|
||||
link: /application-service-mesh/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: asm
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,8 +0,0 @@
|
||||
---
|
||||
link: /business-dashboard/umn/
|
||||
rst_location: umn/source
|
||||
pdf_enabled: false
|
||||
pdf_environment: hidden
|
||||
service_type: bd
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: api/bms
|
||||
html_location: docs/bms/api-ref
|
||||
link: /bare-metal-server/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: bms
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: devg/bms
|
||||
html_location: docs/bms/dev
|
||||
link: /bare-metal-server/dev-guide/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: dev_guide/source
|
||||
service_type: bms
|
||||
title: Developer Guide
|
||||
type: dev
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: bpicg/bms
|
||||
html_location: docs/bms/image-creation-guide
|
||||
link: /bare-metal-server/image-creation-guide/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: doc/image-creation-guide/source
|
||||
service_type: bms
|
||||
title: Private Image Creation Guide
|
||||
type: image-creation-guide
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: usermanual/bms
|
||||
html_location: docs/bms/umn
|
||||
link: /bare-metal-server/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: bms
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: api/cbr
|
||||
html_location: docs/cbr/api-ref
|
||||
link: /cloud-backup-recovery/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: cbr
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,12 +0,0 @@
|
||||
---
|
||||
hc_location: bestpractice/cbr
|
||||
environment: internal
|
||||
html_location: docs/cbr/best-practice
|
||||
link: /cloud-backup-recovery/best-practice/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: doc/best-practice/source
|
||||
service_type: cbr
|
||||
title: Best Practice
|
||||
type: best-practice
|
||||
disable_import: true
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: usermanual/cbr
|
||||
html_location: docs/cbr/umn
|
||||
link: /cloud-backup-recovery/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: cbr
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,8 +0,0 @@
|
||||
---
|
||||
link: /cloud-create/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: cc
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,9 +0,0 @@
|
||||
---
|
||||
html_location: docs/cc/umn
|
||||
link: /cloud-create/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: cc
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: api2/cce
|
||||
html_location: docs/cce/api-ref
|
||||
link: /cloud-container-engine/api-ref/
|
||||
pdf_enabled: false
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: cce
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,12 +0,0 @@
|
||||
---
|
||||
hc_location: bestpractice/cce
|
||||
environment: internal
|
||||
html_location: docs/cce/best-practice
|
||||
link: /cloud-container-engine/best-practice/
|
||||
pdf_enabled: false
|
||||
pdf_environment: internal
|
||||
rst_location: doc/best-practice/source
|
||||
service_type: cce
|
||||
title: Best Practice
|
||||
type: best-practice
|
||||
disable_import: true
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: usermanual2/cce
|
||||
html_location: docs/cce/umn
|
||||
link: /cloud-container-engine/umn/
|
||||
pdf_enabled: false
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: cce
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
hc_location: api/cci
|
||||
environment: public
|
||||
html_location: docs/cci/api-ref
|
||||
link: /cloud-container-instance/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: cci
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
hc_location: usermanual/cci
|
||||
environment: public
|
||||
html_location: docs/cci/umn
|
||||
link: /cloud-container-instance/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: cci
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
environment: internal
|
||||
hc_location: api/cc
|
||||
html_location: docs/ccn/api-ref
|
||||
link: /cloud-connect/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: ccn
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
environment: internal
|
||||
hc_location: usermanual/cc
|
||||
html_location: docs/ccn/umn
|
||||
link: /cloud-connect/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: ccn
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: api/ces
|
||||
html_location: docs/ces/api-ref
|
||||
link: /cloud-eye/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: ces
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: usermanual/ces
|
||||
html_location: docs/ces/umn
|
||||
link: /cloud-eye/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: ces
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: api/cfw
|
||||
html_location: docs/cfw/api-ref
|
||||
link: /cloud-firewall/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: cfw
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: usermanual/cfw
|
||||
html_location: docs/cfw/umn
|
||||
link: /cloud-firewall/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: cfw
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: api/rms
|
||||
html_location: docs/config/api-ref
|
||||
link: /config/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: config
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: usermanual/rms
|
||||
html_location: docs/config/umn
|
||||
link: /config/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: config
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: api/csbs
|
||||
html_location: docs/csbs/api-ref
|
||||
link: /cloud-server-backup-service/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: csbs
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: usermanual/csbs
|
||||
html_location: docs/csbs/umn
|
||||
link: /cloud-server-backup-service/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: csbs
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
hc_location: api/cse
|
||||
environment: internal
|
||||
html_location: docs/cse/api-ref
|
||||
link: /cloud-service-engine/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: cse
|
||||
title: API Reference
|
||||
type: api-ref
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
hc_location: usermanual/cse
|
||||
environment: internal
|
||||
html_location: docs/cse/umn
|
||||
link: /cloud-service-engine/umn/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: umn/source
|
||||
service_type: cse
|
||||
title: User Guide
|
||||
type: umn
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
hc_location: api/css
|
||||
html_location: docs/css/api-ref
|
||||
link: /cloud-search-service/api-ref/
|
||||
pdf_enabled: true
|
||||
pdf_environment: internal
|
||||
rst_location: api-ref/source
|
||||
service_type: css
|
||||
title: API Reference
|
||||
type: api-ref
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user