10 Commits

Author SHA1 Message Date
b429f1772a remove unecessary files
All checks were successful
Run Tox Check / tox-py312 (pull_request) Successful in 16s
Run Tox Check / tox-pep8 (pull_request) Successful in 16s
2025-08-08 09:46:40 +00:00
be1e678038 fix pep8
All checks were successful
Run Tox Check / tox-py312 (pull_request) Successful in 20s
Run Tox Check / tox-pep8 (pull_request) Successful in 16s
2025-08-08 09:40:10 +00:00
95c38587fe refactor variables
Some checks failed
Run Tox Check / tox-py312 (pull_request) Successful in 15s
Run Tox Check / tox-pep8 (pull_request) Failing after 14s
2025-08-04 10:37:37 +00:00
50a11560c1 rm test file
Some checks failed
Run Tox Check / tox-py312 (pull_request) Successful in 15s
Run Tox Check / tox-pep8 (pull_request) Failing after 14s
2025-08-04 10:30:10 +00:00
d98c5b61cb add collect_statistics tool
Some checks failed
Run Tox Check / tox-py312 (pull_request) Successful in 16s
Run Tox Check / tox-pep8 (pull_request) Failing after 14s
2025-08-04 10:28:59 +00:00
71b820ebf5 New service function (#36)
Reviewed-on: #36
Reviewed-by: Tino Schreiber <tino.schreiber@t-systems.com>
Co-authored-by: Sebastian Gode <sebastian.gode@telekom.de>
Co-committed-by: Sebastian Gode <sebastian.gode@telekom.de>
2025-08-04 09:36:23 +00:00
e3741c8b53 add tox py3 check
Reviewed-by: Gode, Sebastian <sebastian.gode@t-systems.com>
Co-authored-by: tischrei <tino.schreiber@t-systems.com>
Co-committed-by: tischrei <tino.schreiber@t-systems.com>
2025-07-30 12:14:34 +00:00
167f5cb883 add opensearch update workflow
Reviewed-by: Gode, Sebastian <sebastian.gode@t-systems.com>
Co-authored-by: tischrei <tino.schreiber@t-systems.com>
Co-committed-by: tischrei <tino.schreiber@t-systems.com>
2025-07-29 09:35:01 +00:00
746279eba1 disable import for bcc and sd
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Sebastian Gode <sebastian.gode@telekom.de>
Co-committed-by: Sebastian Gode <sebastian.gode@telekom.de>
2025-07-23 12:16:18 +00:00
6919069569 delete business dashboard
Reviewed-by: Tino Schreiber <tino.schreiber@t-systems.com>
Co-authored-by: Sebastian Gode <sebastian.gode@telekom.de>
Co-committed-by: Sebastian Gode <sebastian.gode@telekom.de>
2025-07-23 12:04:48 +00:00
7 changed files with 263 additions and 0 deletions

View File

@ -0,0 +1,18 @@
name: Run Tox Check
on:
pull_request:
types: [opened, reopened, synchronize, edited]
jobs:
tox-py312:
runs-on: ubuntu
steps:
- uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-py-test@v1
tox-pep8:
runs-on: ubuntu
steps:
- uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-py-test@v1
with:
tox-env: pep8

View File

@ -0,0 +1,32 @@
name: Updates Opensearch filters
on:
pull_request:
types:
- closed
branches:
- main
jobs:
update-opensearch-filters:
if: github.event.pull_request.merged == true
runs-on: ubuntu
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies and local package otc-metadata package
run: |
python -m pip install --upgrade pip
pip install . -r tools-requirements.txt
- name: Update swiss and eu_de Opensearch indizies
run: |
python tools/index_metadata.py --hosts ${{ secrets.OPENSEARCH_HOST1 }} --target-environment public --index search_index_de --cloud-environment eu_de --username ${{ secrets.OPENSEARCH_USER }} --password ${{ secrets.OPENSEARCH_PW }} --delete-index
python tools/index_metadata.py --hosts ${{ secrets.OPENSEARCH_HOST1 }} --target-environment public --index search_index_swiss --cloud-environment swiss --username ${{ secrets.OPENSEARCH_USER }} --password ${{ secrets.OPENSEARCH_PW }} --delete-index

View File

@ -6,6 +6,7 @@ rst_location: api-ref/source
service_type: bcc
title: API Reference
type: api-ref
disable_import: true
cloud_environments:
- name: eu_de
visibility: internal

View File

@ -6,6 +6,7 @@ rst_location: umn/source
service_type: bcc
title: User Guide
type: umn
disable_import: true
cloud_environments:
- name: eu_de
visibility: internal

View File

@ -6,6 +6,7 @@ rst_location: umn/source
service_type: sd
title: User Guide
type: umn
disable_import: true
cloud_environments:
- name: swiss
visibility: public

View File

@ -453,3 +453,25 @@ class Services(object):
res.sort(key=lambda x: x.get("name", "").lower())
return res
def all_services_by_cloud_environment(self, cloud_environment, environments):
"""Retrieve all services filtered by cloud_environment
"""
res = []
for srv in self.all_services:
if environments and cloud_environment:
for srv_cloud_environment in srv["cloud_environments"]:
if srv_cloud_environment["name"] == cloud_environment:
for environment in environments:
if srv_cloud_environment["visibility"] == environment:
res.append(srv)
else:
continue
else:
raise Exception("No cloud_environment or environments "
"specified in function all_services_by_cloud_environment.")
# Sort services
res.sort(key=lambda x: x.get("service_title", "").lower())
return res

188
tools/collect_statistics.py Normal file

File diff suppressed because it is too large Load Diff