Compare commits
10 Commits
cab8a437aa
...
3a84eaeec0
Author | SHA1 | Date | |
---|---|---|---|
3a84eaeec0 | |||
7b247f1e70 | |||
f9a83705e1 | |||
229823f93e | |||
c39be95a60 | |||
677c98dc0f | |||
036fbe3062 | |||
dee14208f6 | |||
16a45b69d9 | |||
94dadbd764 |
@ -373,8 +373,7 @@ documents:
|
||||
service_type: dis
|
||||
title: User Guide
|
||||
type: umn
|
||||
- environment: internal
|
||||
hc_location: api/dli
|
||||
- hc_location: api/dli
|
||||
html_location: docs/dli/api-ref
|
||||
link: /data-lake-insight/api-ref/
|
||||
pdf_name: dli-api-ref
|
||||
@ -382,8 +381,7 @@ documents:
|
||||
service_type: dli
|
||||
title: API Reference
|
||||
type: api-ref
|
||||
- environment: internal
|
||||
hc_location: usermanual/dli
|
||||
- hc_location: usermanual/dli
|
||||
html_location: docs/dli/umn
|
||||
link: /data-lake-insight/umn/
|
||||
pdf_name: dli-umn
|
||||
@ -656,7 +654,7 @@ documents:
|
||||
service_type: ims
|
||||
title: Developer Guide
|
||||
type: dev
|
||||
- html_location: docs/ims/public-images
|
||||
- environment: public
|
||||
link: /image-management-service/public-images/
|
||||
pdf_name: ims-public-images
|
||||
rst_location: doc/public-images/source
|
||||
@ -812,7 +810,7 @@ documents:
|
||||
pdf_name: obs-swiftapi
|
||||
rst_location: doc/swiftapi/source
|
||||
service_type: obs
|
||||
title: API Reference (Swift)
|
||||
title: API Reference (Swift) - Deprecated
|
||||
type: swiftapi
|
||||
- hc_location: api_obs/obs
|
||||
html_location: docs/obs/s3api
|
||||
@ -1087,8 +1085,7 @@ documents:
|
||||
service_type: waf
|
||||
title: User Guide
|
||||
type: umn
|
||||
- environment: internal
|
||||
hc_location: api/dwaf
|
||||
- hc_location: api/dwaf
|
||||
html_location: docs/wafd/api-ref
|
||||
link: /web-application-firewall-dedicated/api-ref/
|
||||
pdf_name: wafd-api-ref
|
||||
@ -1096,8 +1093,7 @@ documents:
|
||||
service_type: wafd
|
||||
title: API Reference
|
||||
type: api-ref
|
||||
- environment: internal
|
||||
hc_location: usermanual/dwaf
|
||||
- hc_location: usermanual/dwaf
|
||||
html_location: docs/wafd/umn
|
||||
link: /web-application-firewall-dedicated/umn/
|
||||
pdf_name: wafd-umn
|
||||
@ -1332,7 +1328,7 @@ services:
|
||||
service_category: big_data
|
||||
service_title: DataArts Studio
|
||||
service_type: dataarts_studio
|
||||
service_uri: dataarts-studio
|
||||
service_uri: data-arts-studio
|
||||
environment: internal
|
||||
teams:
|
||||
- name: docs-bigdata-ai-rw
|
||||
@ -1380,7 +1376,7 @@ services:
|
||||
service_uri: distributed-cache-service
|
||||
environment: public
|
||||
teams:
|
||||
- name: docs-database-rw
|
||||
- name: docs-orchestration-rw
|
||||
permission: write
|
||||
- repositories:
|
||||
- environment: internal
|
||||
@ -1483,7 +1479,7 @@ services:
|
||||
service_title: Data Lake Insight
|
||||
service_type: dli
|
||||
service_uri: data-lake-insight
|
||||
environment: internal
|
||||
environment: public
|
||||
teams:
|
||||
- name: docs-bigdata-ai-rw
|
||||
permission: write
|
||||
@ -1999,7 +1995,7 @@ services:
|
||||
service_category: network
|
||||
service_title: Virtual Private Network
|
||||
service_type: vpn
|
||||
service_uri: virtual-private-network/umn/
|
||||
service_uri: virtual-private-network
|
||||
environment: public
|
||||
teams:
|
||||
- name: docs-network-rw
|
||||
|
@ -113,6 +113,55 @@ class Services(object):
|
||||
res[cat]["docs"].append(res_doc)
|
||||
return res
|
||||
|
||||
def service_types_with_doc_types(self, environment=None):
|
||||
"""Retrieve type and title from services and corresponding docs.
|
||||
As well as a list of all available doc types with title.
|
||||
|
||||
:param str environment: Optional service environment.
|
||||
"""
|
||||
service_list = []
|
||||
docs = []
|
||||
|
||||
for service in self.all_services:
|
||||
if not service["service_title"]:
|
||||
continue
|
||||
if not service["service_type"]:
|
||||
continue
|
||||
|
||||
doc_list = []
|
||||
for doc in self.all_docs:
|
||||
if "environment" in doc:
|
||||
if doc["environment"] != environment:
|
||||
continue
|
||||
if doc["service_type"] == service["service_type"]:
|
||||
doc_list.append({
|
||||
"title": doc["title"],
|
||||
"type": doc["type"]
|
||||
})
|
||||
|
||||
new_doc = {
|
||||
"type": doc["type"],
|
||||
"title": doc["title"]
|
||||
}
|
||||
type_exists = any(
|
||||
doc_dict["type"] == new_doc["type"] for doc_dict in docs
|
||||
)
|
||||
if not type_exists:
|
||||
docs.append(new_doc)
|
||||
|
||||
service_list.append({
|
||||
"service_title": service["service_title"],
|
||||
"service_type": service["service_type"],
|
||||
"docs": doc_list
|
||||
})
|
||||
|
||||
res = {
|
||||
"services": service_list,
|
||||
"docs": docs
|
||||
}
|
||||
|
||||
return res
|
||||
|
||||
def docs_by_service_category(self, category, environment=None):
|
||||
"""List services matching category
|
||||
|
||||
|
@ -45,6 +45,7 @@ otcdocs_doc_type = '{{ doc_type }}'
|
||||
otcdocs_service_category = '{{ service_category }}'
|
||||
otcdocs_service_title = '{{ service_title }}'
|
||||
otcdocs_service_type = '{{ service_type }}'
|
||||
otcdocs_search_environment = 'hc_de'
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
|
@ -4,3 +4,4 @@ requests
|
||||
jinja2
|
||||
dirsync
|
||||
cookiecutter
|
||||
opensearch-py
|
||||
|
@ -32,9 +32,11 @@ def process_services(args, services):
|
||||
block_on_rejected_reviews=True,
|
||||
dismiss_stale_approvals=True,
|
||||
enable_push=False,
|
||||
enable_status_check=True,
|
||||
status_check_contexts=["gl/check"],
|
||||
enable_merge_whitelist=True,
|
||||
merge_whitelist_usernames=["zuul"],
|
||||
required_approvals=1,
|
||||
)
|
||||
gitea_repo_template = dict(
|
||||
default_branch="main",
|
||||
|
151
tools/index_metadata.py
Normal file
151
tools/index_metadata.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user