77import os
88
99# Authentication scopes for different environments
10- TEST_OBSERVABILITY_SCOPE = "https://api.test.powerplatform.com/.default"
11- PREPROD_OBSERVABILITY_SCOPE = "https://api.preprod.powerplatform.com/.default"
1210PROD_OBSERVABILITY_SCOPE = "https://api.powerplatform.com/.default"
1311
1412# Cluster categories for different environments
15- TEST_OBSERVABILITY_CLUSTER_CATEGORY = "test"
16- PREPROD_OBSERVABILITY_CLUSTER_CATEGORY = "preprod"
1713PROD_OBSERVABILITY_CLUSTER_CATEGORY = "prod"
1814
1915# Default environment names
@@ -28,43 +24,7 @@ def get_observability_authentication_scope() -> list[str]:
2824 Returns:
2925 list[str]: The authentication scope for the current environment.
3026 """
31- environment = _get_current_environment ()
32-
33- environment_lower = environment .lower ()
34-
35- if environment_lower == "development" :
36- # For now, map "development" to preprod scope for local testing
37- return [PREPROD_OBSERVABILITY_SCOPE ]
38- elif environment_lower == "test" :
39- return [TEST_OBSERVABILITY_SCOPE ]
40- elif environment_lower == "production" :
41- return [PROD_OBSERVABILITY_SCOPE ]
42- else :
43- # Default to production scope
44- return [PROD_OBSERVABILITY_SCOPE ]
45-
46-
47- def get_observability_cluster_category () -> str :
48- """
49- Returns the cluster category for the observability service based on the current environment.
50-
51- Returns:
52- str: The cluster category for the current environment.
53- """
54- environment = _get_current_environment ()
55-
56- environment_lower = environment .lower ()
57-
58- if environment_lower == "development" :
59- # For now, map "development" to preprod scope for local testing
60- return PREPROD_OBSERVABILITY_CLUSTER_CATEGORY
61- elif environment_lower == "test" :
62- return TEST_OBSERVABILITY_CLUSTER_CATEGORY
63- elif environment_lower == "production" :
64- return PROD_OBSERVABILITY_CLUSTER_CATEGORY
65- else :
66- # Default to production cluster category
67- return PROD_OBSERVABILITY_CLUSTER_CATEGORY
27+ return [PROD_OBSERVABILITY_SCOPE ]
6828
6929
7030def is_development_environment () -> bool :
0 commit comments