Skip to content

Commit

Permalink
Update _validators.py
Browse files Browse the repository at this point in the history
  • Loading branch information
qwuae1 authored Mar 19, 2024
1 parent e2dad8c commit 9b6177c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/vm-repair/azext_vm_repair/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# --------------------------------------------------------------------------------------------

from datetime import datetime
from json import loads
import json
from applicationinsights import TelemetryClient
from re import match, search, findall
from knack.log import get_logger
from knack.util import CLIError
Expand All @@ -14,21 +15,32 @@
from azure.cli.command_modules.resource._client_factory import _resource_client_factory
from msrestazure.azure_exceptions import CloudError
from msrestazure.tools import parse_resource_id, is_valid_resource_id
from opencensus.ext.azure.log_exporter import AzureLogHandler

from .encryption_types import Encryption
from .exceptions import AzCommandError
from .repair_utils import (
_call_az_command,
_get_repair_resource_tag,
_get_current_vmrepair_version,
_fetch_encryption_settings,
_resolve_api_version,
check_extension_version,
_check_existing_rg
)
# For test releases and testing
TEST_KEY = 'a6bdff92-33b5-426f-9123-33875d0ae98b'
PROD_KEY = '3e7130f2-759b-41d4-afb8-f1405d1d7ed9'

tc = TelemetryClient(PROD_KEY)
tc.context.application.ver = _get_current_vmrepair_version()

# pylint: disable=line-too-long, broad-except

logger = get_logger(__name__)
logger.addHandler(AzureLogHandler(
connection_string='InstrumentationKey='+PROD_KEY)
)
EXTENSION_NAME = 'vm-repair'


Expand Down

0 comments on commit 9b6177c

Please sign in to comment.