Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
update azure-mgmt-resource to 18.0.0 (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmc-msft authored May 24, 2021
1 parent db4c03e commit 2241dcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
15 changes: 1 addition & 14 deletions src/api-service/__app__/onefuzzlib/azure/creds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/api-service/__app__/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2241dcc

Please sign in to comment.