lots of typing fixes
This commit is contained in:
parent
51f580a304
commit
3665c34961
43 changed files with 260 additions and 178 deletions
|
@ -1,3 +1,5 @@
|
|||
from typing import Tuple
|
||||
|
||||
from azure.identity import ClientSecretCredential
|
||||
from azure.mgmt.alertsmanagement import AlertsManagementClient
|
||||
|
||||
|
@ -12,7 +14,7 @@ class AlarmProxyAzureCdnAutomation(BaseAutomation):
|
|||
short_name = "monitor_proxy_azure_cdn"
|
||||
description = "Import alarms for Azure CDN proxies"
|
||||
|
||||
def automate(self):
|
||||
def automate(self, full: bool = False) -> Tuple[bool, str]:
|
||||
credential = ClientSecretCredential(
|
||||
tenant_id=app.config['AZURE_TENANT_ID'],
|
||||
client_id=app.config['AZURE_CLIENT_ID'],
|
||||
|
@ -33,4 +35,4 @@ class AlarmProxyAzureCdnAutomation(BaseAutomation):
|
|||
alarm.update_state(AlarmState.OK, "Azure monitor alert not firing")
|
||||
else:
|
||||
alarm.update_state(AlarmState.CRITICAL, "Azure monitor alert firing")
|
||||
return True, []
|
||||
return True, ""
|
Loading…
Add table
Add a link
Reference in a new issue