Compare commits
1 Commits
main
...
environmen
Author | SHA1 | Date | |
---|---|---|---|
ed955c066f |
@ -87,10 +87,13 @@ class Services(object):
|
||||
res.append(copy.deepcopy(cat))
|
||||
return res
|
||||
|
||||
def services_by_category(self, category):
|
||||
def services_by_category(self, category, environment=None):
|
||||
"""List services matching category"""
|
||||
res = []
|
||||
for srv in self.all_services:
|
||||
if environment:
|
||||
if "environment" in srv and srv["environment"] != environment:
|
||||
continue
|
||||
if srv["service_category"] == category:
|
||||
res.append(copy.deepcopy(srv))
|
||||
return res
|
||||
|
Loading…
x
Reference in New Issue
Block a user