This commit is contained in:
Gode, Sebastian 2025-04-28 13:17:59 +00:00
parent a432d6f39f
commit 7381111202

View File

@ -418,18 +418,19 @@ class Services(object):
break
return res
def all_services_with_categories(self, cloud_environment, environment):
def all_services_by_categories(self, cloud_environment, environments):
"""Retrieve all services sorted by categories
"""
res = self.service_categories
for i, category in enumerate(res):
res[i]["services"] = []
for srv in self.all_services:
if environment and cloud_environment:
if environments and cloud_environment:
cloud_environment_check = False
if srv["is_global"] is not True:
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:
cloud_environment_check = True
else: