mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-13 02:28:10 +00:00
bump azure-cli and azure-cli-core to 2.31.0 (#1557)
* bump azure-cli and azure-cli-core to 2.31.0 and all required dependencies * Update src/cli/onefuzz/cred_wrapper.py Co-authored-by: Joe Ranweiler <joe@lemma.co> * updating credential wrapper * Update src/cli/onefuzz/azure_identity_credential_adapter.py Co-authored-by: Joe Ranweiler <joe@lemma.co> * updating credential wrapper * . Co-authored-by: stas <statis@microsoft.com> Co-authored-by: Joe Ranweiler <joe@lemma.co>
This commit is contained in:
@ -19,9 +19,9 @@ from datetime import datetime, timedelta
|
||||
from typing import Dict, List, Optional, Tuple, Union, cast
|
||||
from uuid import UUID
|
||||
|
||||
from azure.common.client_factory import get_client_from_cli_profile
|
||||
from azure.common.credentials import get_cli_profile
|
||||
from azure.cosmosdb.table.tableservice import TableService
|
||||
from azure.identity import AzureCliCredential
|
||||
from azure.mgmt.applicationinsights import ApplicationInsightsManagementClient
|
||||
from azure.mgmt.applicationinsights.models import (
|
||||
ApplicationInsightsComponentExportRequest,
|
||||
@ -190,8 +190,9 @@ class Client:
|
||||
return self.subscription_id
|
||||
|
||||
def get_location_display_name(self) -> str:
|
||||
location_client = get_client_from_cli_profile(
|
||||
SubscriptionClient, subscription_id=self.get_subscription_id()
|
||||
credential = AzureCliCredential()
|
||||
location_client = SubscriptionClient(
|
||||
credential, subscription_id=self.get_subscription_id()
|
||||
)
|
||||
locations = location_client.subscriptions.list_locations(
|
||||
self.get_subscription_id()
|
||||
@ -211,8 +212,9 @@ class Client:
|
||||
with open(self.arm_template, "r") as handle:
|
||||
arm = json.load(handle)
|
||||
|
||||
client = get_client_from_cli_profile(
|
||||
ResourceManagementClient, subscription_id=self.get_subscription_id()
|
||||
credential = AzureCliCredential()
|
||||
client = ResourceManagementClient(
|
||||
credential, subscription_id=self.get_subscription_id()
|
||||
)
|
||||
providers = {x.namespace: x for x in client.providers.list()}
|
||||
|
||||
@ -524,8 +526,9 @@ class Client:
|
||||
with open(self.arm_template, "r") as template_handle:
|
||||
template = json.load(template_handle)
|
||||
|
||||
client = get_client_from_cli_profile(
|
||||
ResourceManagementClient, subscription_id=self.get_subscription_id()
|
||||
credential = AzureCliCredential()
|
||||
client = ResourceManagementClient(
|
||||
credential, subscription_id=self.get_subscription_id()
|
||||
)
|
||||
client.resource_groups.create_or_update(
|
||||
self.resource_group, {"location": self.location}
|
||||
@ -695,8 +698,10 @@ class Client:
|
||||
logger.info("creating eventgrid subscription")
|
||||
src_resource_id = self.results["deploy"]["fuzz-storage"]["value"]
|
||||
dst_resource_id = self.results["deploy"]["func-storage"]["value"]
|
||||
client = get_client_from_cli_profile(
|
||||
StorageManagementClient, subscription_id=self.get_subscription_id()
|
||||
|
||||
credential = AzureCliCredential()
|
||||
client = StorageManagementClient(
|
||||
credential, subscription_id=self.get_subscription_id()
|
||||
)
|
||||
event_subscription_info = EventSubscription(
|
||||
destination=StorageQueueEventSubscriptionDestination(
|
||||
@ -714,8 +719,8 @@ class Client:
|
||||
),
|
||||
)
|
||||
|
||||
client = get_client_from_cli_profile(
|
||||
EventGridManagementClient, subscription_id=self.get_subscription_id()
|
||||
client = EventGridManagementClient(
|
||||
credential, subscription_id=self.get_subscription_id()
|
||||
)
|
||||
result = client.event_subscriptions.begin_create_or_update(
|
||||
src_resource_id, "onefuzz1", event_subscription_info
|
||||
@ -789,8 +794,9 @@ class Client:
|
||||
destination_address=url,
|
||||
)
|
||||
|
||||
app_insight_client = get_client_from_cli_profile(
|
||||
ApplicationInsightsManagementClient,
|
||||
credential = AzureCliCredential()
|
||||
app_insight_client = ApplicationInsightsManagementClient(
|
||||
credential,
|
||||
subscription_id=self.get_subscription_id(),
|
||||
)
|
||||
|
||||
|
@ -8,9 +8,10 @@ import json
|
||||
from typing import Callable, Dict, List
|
||||
from uuid import UUID
|
||||
|
||||
from azure.common.client_factory import get_client_from_cli_profile
|
||||
from azure.cosmosdb.table.tablebatch import TableBatch
|
||||
from azure.cosmosdb.table.tableservice import TableService
|
||||
from azure.identity import AzureCliCredential
|
||||
from azure.mgmt.resource import SubscriptionClient
|
||||
from azure.mgmt.storage import StorageManagementClient
|
||||
|
||||
|
||||
@ -91,7 +92,8 @@ def main() -> None:
|
||||
parser.add_argument("migration", choices=migrations.keys(), nargs="+")
|
||||
args = parser.parse_args()
|
||||
|
||||
client = get_client_from_cli_profile(StorageManagementClient)
|
||||
credential = AzureCliCredential()
|
||||
client = StorageManagementClient(credential)
|
||||
storage_keys = client.storage_accounts.list_keys(
|
||||
args.resource_group, args.storage_account
|
||||
)
|
||||
|
@ -6,8 +6,9 @@
|
||||
import argparse
|
||||
from uuid import UUID
|
||||
|
||||
from azure.common.client_factory import get_client_from_cli_profile
|
||||
from azure.cosmosdb.table.tableservice import TableService
|
||||
from azure.identity import AzureCliCredential
|
||||
from azure.mgmt.resource import SubscriptionClient
|
||||
from azure.mgmt.storage import StorageManagementClient
|
||||
|
||||
from deploylib.configuration import (
|
||||
@ -26,7 +27,8 @@ def main() -> None:
|
||||
parser.add_argument("--allowed_aad_tenants", type=UUID, nargs="*")
|
||||
args = parser.parse_args()
|
||||
|
||||
client = get_client_from_cli_profile(StorageManagementClient)
|
||||
credential = AzureCliCredential()
|
||||
client = StorageManagementClient(credential)
|
||||
storage_keys = client.storage_accounts.list_keys(
|
||||
args.resource_group, args.storage_account
|
||||
)
|
||||
|
@ -1,10 +1,10 @@
|
||||
azure-cli-core==2.27.2
|
||||
azure-cli==2.27.2
|
||||
azure-cli-core==2.31.0
|
||||
azure-cli==2.31.0
|
||||
azure-cosmosdb-table==1.0.6
|
||||
azure-mgmt-eventgrid==9.0.0
|
||||
azure-mgmt-resource==18.0.0
|
||||
azure-mgmt-storage==18.0.0
|
||||
azure-storage-blob==12.8.1
|
||||
azure-mgmt-resource==20.0.0
|
||||
azure-mgmt-storage==19.0.0
|
||||
azure-storage-blob==12.9.0
|
||||
pyfunctional==1.4.3
|
||||
pyopenssl==19.1.0
|
||||
adal~=1.2.5
|
||||
|
Reference in New Issue
Block a user