Added testservice

This commit is contained in:
Gode, Sebastian 2025-04-15 09:09:41 +00:00
parent f5bdf81d2d
commit 83ecc3ec19
6 changed files with 46 additions and 3 deletions

View File

@ -0,0 +1,13 @@
---
hc_location: usermanual/testservice
html_location: docs/testservice/umn
link: /testservice/umn/
rst_location: umn/source
service_type: testservice
title: User Guide
type: umn
cloud_environments:
- name: eu_de
visibility: public
pdf_visibility: public
pdf_enabled: true

View File

@ -0,0 +1,13 @@
---
service_type: testservice
repositories:
- environment: public
repo: opentelekomcloud-docs/testservice
type: github
cloud_environments:
- eu_de
- environment: internal
repo: docs/testservice
type: gitea
cloud_environments:
- eu_de

View File

@ -0,0 +1,12 @@
---
environment: public
is_global: false
service_category: security-services
service_title: Test Service
service_type: testservice
service_uri: testservice
cloud_environments:
- name: eu_de
teams:
- name: docs-security-services-rw
permission: write

View File

@ -350,9 +350,11 @@ class Services(object):
res = dict()
res = {}
services = self.all_services
print(services)
for service in services:
if service["service_type"] == service_type:
res = service
print(res)
for repositories in self.all_repositories:
if repositories["service_type"] == service["service_type"]:
res["repositories"] = repositories["repositories"]

View File

@ -149,13 +149,15 @@ def main():
args = parser.parse_args()
logging.basicConfig(level=logging.DEBUG)
services = []
if args.service_type:
services = [data.get_service_with_repo_by_service_type(service_type=args.service_type)]
else:
services = data.services_with_repos()
print(services)
for service in services:
print(service)
process_repositories(args, service)

View File

@ -461,10 +461,11 @@ def main():
+ " without updating service-based-view"
)
exit(1)
if args.service_type:
services = [data.service_dict.get(args.service_type)]
services = [data.get_service_with_repo_by_service_type(service_type=args.service_type)]
else:
services = data.all_services
services = data.services_with_repos()
if args.token:
api_session.headers.update({"Authorization": f"token {args.token}"})