Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update _validators.py #7396

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading