Skip to content
Merged
Show file tree
Hide file tree
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
Stop using vendored SDK in core
  • Loading branch information
jiasli committed May 12, 2021
commit e8197e937f36adb3ef93c93ee92e65392431eb2d
4 changes: 3 additions & 1 deletion src/azure-cli-core/azure/cli/core/_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

_AZ_LOGIN_MESSAGE = "Please run 'az login' to setup account."

_USE_VENDORED_SUBSCRIPTION_SDK = True
_USE_VENDORED_SUBSCRIPTION_SDK = False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the vendor SDK has been deleted, why do we still keep the logic of this switch?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case there is a track 3 someday. 😏

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂😂



def load_subscriptions(cli_ctx, all_clouds=False, refresh=False):
Expand Down Expand Up @@ -301,6 +301,7 @@ def _new_account(self):
"""Build an empty Subscription which will be used as a tenant account.
API version doesn't matter as only specified attributes are preserved by _normalize_properties."""
if _USE_VENDORED_SUBSCRIPTION_SDK:
# pylint: disable=no-name-in-module, import-error
from azure.cli.core.vendored_sdks.subscriptions.models import Subscription
SubscriptionType = Subscription
else:
Expand Down Expand Up @@ -1047,6 +1048,7 @@ def _get_subscription_client_class(self): # pylint: disable=no-self-use
"""
if _USE_VENDORED_SUBSCRIPTION_SDK:
# Use vendered subscription SDK to decouple from `resource` command module
# pylint: disable=no-name-in-module, import-error
from azure.cli.core.vendored_sdks.subscriptions import SubscriptionClient
client_type = SubscriptionClient
else:
Expand Down
7 changes: 0 additions & 7 deletions src/azure-cli-core/azure/cli/core/vendored_sdks/__init__.py

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading