env list
This commit is contained in:
parent
a432d6f39f
commit
7381111202
@ -418,20 +418,21 @@ class Services(object):
|
|||||||
break
|
break
|
||||||
return res
|
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
|
"""Retrieve all services sorted by categories
|
||||||
"""
|
"""
|
||||||
res = self.service_categories
|
res = self.service_categories
|
||||||
for i, category in enumerate(res):
|
for i, category in enumerate(res):
|
||||||
res[i]["services"] = []
|
res[i]["services"] = []
|
||||||
for srv in self.all_services:
|
for srv in self.all_services:
|
||||||
if environment and cloud_environment:
|
if environments and cloud_environment:
|
||||||
cloud_environment_check = False
|
cloud_environment_check = False
|
||||||
if srv["is_global"] is not True:
|
if srv["is_global"] is not True:
|
||||||
for srv_cloud_environment in srv["cloud_environments"]:
|
for srv_cloud_environment in srv["cloud_environments"]:
|
||||||
if srv_cloud_environment["name"] == cloud_environment:
|
if srv_cloud_environment["name"] == cloud_environment:
|
||||||
if srv_cloud_environment["visibility"] == environment:
|
for environment in environments:
|
||||||
cloud_environment_check = True
|
if srv_cloud_environment["visibility"] == environment:
|
||||||
|
cloud_environment_check = True
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
if cloud_environment_check is False:
|
if cloud_environment_check is False:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user