@@ -5,13 +5,15 @@ def func_set(self, value):
55
66 def func_get (self ):
77 return func ()
8+
89 return property (func_get , func_set )
910
11+
1012class Storage (object ):
1113 @constant
1214 def BUCKET_NAME ():
1315 return "spotlake"
14-
16+
1517 @constant
1618 def DATABASE_NAME ():
1719 return "spotlake"
@@ -28,6 +30,7 @@ def AZURE_TABLE_NAME():
2830 def GCP_TABLE_NAME ():
2931 return "gcp"
3032
33+
3134class AwsCollector (object ):
3235 @constant
3336 def LOCAL_PATH ():
@@ -45,6 +48,7 @@ def S3_LOCAL_FILES_SAVE_PATH():
4548 def S3_WORKLOAD_SAVE_PATH ():
4649 return "rawdata/aws/workloads"
4750
51+
4852class AzureCollector (object ):
4953 @constant
5054 def SLACK_WEBHOOK_URL ():
@@ -57,7 +61,7 @@ def GET_EVICTION_RATE_URL():
5761 @constant
5862 def GET_HARDWAREMAP_URL ():
5963 return "https://afd.hosting.portal.azure.net/compute/?environmentjson=true&extensionName=Microsoft_Azure_Compute&l=en&trustedAuthority=portal.azure.com"
60-
64+
6165 @constant
6266 def GET_PRICE_URL ():
6367 return "https://s2.billing.ext.azure.com/api/Billing/Subscription/GetSpecsCosts?SpotPricing=true"
@@ -71,17 +75,17 @@ def SPEC_RESOURCE_SETS_LIMIT():
7175 return 2000
7276
7377 @constant
74- def LATEST_FILENAME ():
78+ def LATEST_FILENAME ():
7579 return "latest_azure.json"
7680
7781 @constant
7882 def S3_LATEST_DATA_SAVE_PATH ():
7983 return "latest_data/latest_azure.json"
80-
84+
8185 @constant
8286 def QUERY_SELECTOR_FILENAME ():
8387 return "query-selector-azure.json"
84-
88+
8589 @constant
8690 def S3_QUERY_SELECTOR_SAVE_PATH ():
8791 return "query-selector/query-selector-azure.json"
@@ -105,11 +109,11 @@ def SERVER_SAVE_FILENAME():
105109 @constant
106110 def GET_PRICE_URL ():
107111 return "https://prices.azure.com:443/api/retail/prices?$filter=serviceName eq 'Virtual Machines' and priceType eq 'Consumption' and unitOfMeasure eq '1 Hour' and contains(productName, 'Windows') eq false and contains(meterName, 'Low Priority') eq false and contains(meterName, 'Expired') eq false and contains(location, 'Gov') eq false and contains(location, 'ATT') eq false &$skip="
108-
112+
109113 @constant
110114 def FILTER_LOCATIONS ():
111115 return ['GOV' , 'EUAP' , 'ATT' , 'SLV' , '' ]
112-
116+
113117 @constant
114118 def MAX_SKIP ():
115119 return 200
@@ -122,6 +126,7 @@ def SPOT_DATA_COLLECTION_LOG_GROUP_NAME():
122126 def LOG_STREAM_NAME ():
123127 return "Azure-Count"
124128
129+
125130class GcpCollector (object ):
126131 @constant
127132 def API_LINK ():
@@ -134,11 +139,11 @@ def S3_LATEST_DATA_SAVE_PATH():
134139 @constant
135140 def LOCAL_PATH ():
136141 return "/tmp"
137-
142+
138143 @constant
139144 def SPOT_DATA_COLLECTION_LOG_GROUP_NAME ():
140145 return "Collection-Data-Count"
141-
146+
142147 @constant
143148 def LOG_STREAM_NAME ():
144- return "GCP-Count"
149+ return "GCP-Count"
0 commit comments