From 2241dcc7a48b18b8f3533c8b179c5a3c3764a68f Mon Sep 17 00:00:00 2001 From: bmc-msft <41130664+bmc-msft@users.noreply.github.com> Date: Mon, 24 May 2021 12:33:06 -0400 Subject: [PATCH] update azure-mgmt-resource to 18.0.0 (#903) --- src/api-service/__app__/onefuzzlib/azure/creds.py | 15 +-------------- src/api-service/__app__/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/api-service/__app__/onefuzzlib/azure/creds.py b/src/api-service/__app__/onefuzzlib/azure/creds.py index 7b0ca022a8..e3669f1317 100644 --- a/src/api-service/__app__/onefuzzlib/azure/creds.py +++ b/src/api-service/__app__/onefuzzlib/azure/creds.py @@ -3,7 +3,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. -import json import os from typing import Any, List from uuid import UUID @@ -131,19 +130,7 @@ def get_scaleset_principal_id() -> UUID: credential=get_identity(), subscription_id=get_subscription() ) uid = client.resources.get_by_id(get_scaleset_identity_resource_path(), api_version) - - # workaround issue from azure-mgmt-resource, where properties is now a str - # instead of an obj. - # https://github.com/Azure/azure-sdk-for-python/pull/18686/files - if isinstance(uid.properties, str): - as_str = uid.properties - if as_str.startswith("{'"): - as_str = as_str.replace("'", '"') - prop = json.loads(as_str) - else: - prop = uid.properties - - return UUID(prop["principalId"]) + return UUID(uid.properties["principalId"]) @cached diff --git a/src/api-service/__app__/requirements.txt b/src/api-service/__app__/requirements.txt index e1cd13329a..5709839a46 100644 --- a/src/api-service/__app__/requirements.txt +++ b/src/api-service/__app__/requirements.txt @@ -14,7 +14,7 @@ azure-mgmt-core==1.2.2 azure-mgmt-loganalytics~=8.0.0 azure-mgmt-network==18.0.0 azure-mgmt-storage~=18.0.0 -azure-mgmt-resource~=17.0.0 +azure-mgmt-resource~=18.0.0 azure-mgmt-subscription~=1.0.0 azure-nspkg==3.0.2 azure-storage-blob==12.8.1