@@ -69,6 +69,8 @@ def __init__(self):
69
69
self .total_slice_count_seed = self .config .get_runtime_config ().get (Constants .TOTAL_SLICE_COUNT_SEED , 0 )
70
70
self .local_bqm = self .globals .get_config ().get_global_config ().get_bqm_config ().get (
71
71
Constants .LOCAL_BQM , False )
72
+ excluded_projects = self .config .get_runtime_config ().get (Constants .EXCLUDED_PROJECTS , "" )
73
+ self .excluded_projects = [e .strip () for e in excluded_projects .split ("," ) if e .strip ()]
72
74
73
75
def get_logger (self ):
74
76
"""
@@ -987,6 +989,8 @@ def get_poas(self, *, token: str, sliver_id: str = None, poa_id: str = None, sta
987
989
def get_metrics_overview (self , * , token : str = None , excluded_projects : List [str ] = None ):
988
990
"""
989
991
Get metrics overview
992
+ :param token: token
993
+ :param excluded_projects: list of projects to exclude
990
994
"""
991
995
try :
992
996
controller = self .controller_state .get_management_actor ()
@@ -1002,6 +1006,11 @@ def get_metrics_overview(self, *, token: str = None, excluded_projects: List[str
1002
1006
project , tags , project_name = fabric_token .first_project
1003
1007
user_id = fabric_token .uuid
1004
1008
1009
+ if excluded_projects :
1010
+ excluded_projects .extend (self .excluded_projects )
1011
+ else :
1012
+ excluded_projects = self .excluded_projects
1013
+
1005
1014
active_states = SliceState .list_values_ex_closing_dead ()
1006
1015
active_slice_count = controller .get_slice_count (states = active_states , user_id = user_id , project = project ,
1007
1016
excluded_projects = excluded_projects )
0 commit comments