Skip to content

Commit

Permalink
Merge pull request Azure#5 from Azure/master
Browse files Browse the repository at this point in the history
Sync with the official repo
  • Loading branch information
ShichaoQiu authored Jan 19, 2020
2 parents 0b3436d + 9e761e4 commit 2868847
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 30 deletions.
5 changes: 5 additions & 0 deletions src/application-insights/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.1.2
++++++++++++++++++

* Support the usage in Azure China Cloud.

0.1.0
++++++++++++++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def applicationinsights_data_plane_client(cli_ctx, _, subscription=None):
from azure.cli.core._profile import Profile
profile = Profile(cli_ctx=cli_ctx)
cred, _, _ = profile.get_login_credentials(
resource="https://api.applicationinsights.io",
resource=cli_ctx.cloud.endpoints.app_insights_resource_id,
subscription_id=subscription
)
return ApplicationInsightsDataClient(cred)
Expand All @@ -19,20 +19,8 @@ def applicationinsights_data_plane_client(cli_ctx, _, subscription=None):
def applicationinsights_mgmt_plane_client(cli_ctx, _, subscription=None):
"""Initialize Log Analytics mgmt client for use with CLI."""
from .vendored_sdks.mgmt_applicationinsights import ApplicationInsightsManagementClient
from azure.cli.core._profile import Profile
profile = Profile(cli_ctx=cli_ctx)
# Use subscription from resource_id where possible, otherwise use login.
if subscription:
cred, _, _ = profile.get_login_credentials(subscription_id=subscription)
return ApplicationInsightsManagementClient(
cred,
subscription
)
cred, sub_id, _ = profile.get_login_credentials()
return ApplicationInsightsManagementClient(
cred,
sub_id
)
from azure.cli.core.commands.client_factory import get_mgmt_service_client
return get_mgmt_service_client(cli_ctx, ApplicationInsightsManagementClient, subscription_id=subscription)


def cf_query(cli_ctx, _, subscription=None):
Expand Down
2 changes: 1 addition & 1 deletion src/application-insights/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from codecs import open
from setuptools import setup, find_packages

VERSION = "0.1.1"
VERSION = "0.1.2"

CLASSIFIERS = [
'Development Status :: 4 - Beta',
Expand Down
4 changes: 4 additions & 0 deletions src/hack/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ Release History
0.4.0
++++++
* Added support for app level git credentials

0.4.1
++++++
* Fixed small bugs
6 changes: 3 additions & 3 deletions src/hack/azext_hack/_database_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ def port(self) -> str:
return _DATABASES[self.database_type]['port']

def __get_cosmosdb_steps(self, cmd, name, location):
from azure.mgmt.cosmosdb import CosmosDB
from azure.mgmt.cosmosdb import CosmosDBManagementClient
from azure.cli.core.commands.client_factory import get_mgmt_service_client

steps = []

cosmosdb_client = get_mgmt_service_client(cmd.cli_ctx, CosmosDB)
cosmosdb_client = get_mgmt_service_client(cmd.cli_ctx, CosmosDBManagementClient)

from azure.mgmt.cosmosdb.models import (
DatabaseAccountCreateUpdateParameters,
Expand Down Expand Up @@ -149,7 +149,7 @@ def __get_cosmosdb_steps(self, cmd, name, location):
'options': {}
}
steps.append(DatabaseCreationStep(
'database', cosmosdb_client.database_accounts.create_update_mongo_db_database, database_params))
'database', cosmosdb_client.mongo_db_resources.create_update_mongo_db_database, database_params))

def retrieve_password():
result = cosmosdb_client.database_accounts.list_keys(
Expand Down
2 changes: 1 addition & 1 deletion src/hack/azext_hack/_website_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def deployment_info(self):
if not self.__deployment_info:
publishing_info = list_publishing_credentials(self.__cmd, resource_group_name=self.name, name=self.name)
self.__deployment_info = type('DeploymentInfo', (object, ), {
'name': publishing_info.name,
'name': publishing_info.publishing_user_name,
'password': publishing_info.publishing_password,
'git_url': 'https://{}.scm.azurewebsites.net/{}.git'.format(self.name, self.name)
})()
Expand Down
2 changes: 1 addition & 1 deletion src/hack/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.
VERSION = '0.4.0'
VERSION = '0.4.1'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down
83 changes: 74 additions & 9 deletions src/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,38 @@
"version": "0.1.1"
},
"sha256Digest": "6a03b2b1a78f44e096650870d02fc2d86ee30fb07a42656716f1ced9d8651831"
},
{
"downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/application_insights-0.1.2-py2.py3-none-any.whl",
"filename": "application_insights-0.1.2-py2.py3-none-any.whl",
"metadata": {
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.0.56",
"extensions": {
"python.details": {
"contacts": [
{
"email": "aleldeib@microsoft.com",
"name": "Ace Eldeib",
"role": "author"
}
],
"document_names": {
"description": "DESCRIPTION.rst"
},
"project_urls": {
"Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/application-insights"
}
}
},
"generator": "bdist_wheel (0.30.0)",
"license": "MIT",
"metadata_version": "2.0",
"name": "application-insights",
"summary": "Support for managing Application Insights components and querying metrics, events, and logs from such components.",
"version": "0.1.2"
},
"sha256Digest": "100db3b80b4fbb66495984557291ea71f875158e92d7bc711cc84a96c92a11c5"
}
],
"azure-batch-cli-extensions": [
Expand Down Expand Up @@ -699,8 +731,8 @@
"sha256Digest": "2abdfd1b760e1968176cd4043e2db7edf951978c6a2182eb5e79bb0c8070af4c"
},
{
"downloadUrl": "https://github.com/Azure/azure-devops-cli-extension/releases/download/20191129.1/azure_devops-0.16.0-py2.py3-none-any.whl",
"filename": "azure_devops-0.16.0-py2.py3-none-any.whl",
"downloadUrl": "https://github.com/Azure/azure-devops-cli-extension/releases/download/20200113.1/azure_devops-0.17.0-py2.py3-none-any.whl",
"filename": "azure_devops-0.17.0-py2.py3-none-any.whl",
"metadata": {
"azext.minCliCoreVersion": "2.0.69",
"classifiers": [
Expand Down Expand Up @@ -748,9 +780,9 @@
}
],
"summary": "Tools for managing Azure DevOps.",
"version": "0.16.0"
"version": "0.17.0"
},
"sha256Digest": "af00a49ff86f67dc7193285e129f385131cd24770a89a67637e23fa8608f5f34"
"sha256Digest": "1e891afc8b6ee52c62c4f99802d77728ff60e89e4c08972325178cc4fdac6be9"
}
],
"azure-firewall": [
Expand Down Expand Up @@ -1333,8 +1365,8 @@
],
"hack": [
{
"downloadUrl": "https://azhackcli.blob.core.windows.net/whl/hack-0.4.0-py2.py3-none-any.whl",
"filename": "hack-0.4.0-py2.py3-none-any.whl",
"downloadUrl": "https://azhackcli.blob.core.windows.net/whl/hack-0.4.1-py2.py3-none-any.whl",
"filename": "hack-0.4.1-py2.py3-none-any.whl",
"metadata": {
"azext.isPreview": true,
"azext.maxCliCoreVersion": "2.1.0",
Expand Down Expand Up @@ -1374,9 +1406,9 @@
"metadata_version": "2.0",
"name": "hack",
"summary": "Microsoft Azure Command-Line Tools Hack Extension",
"version": "0.4.0"
"version": "0.4.1"
},
"sha256Digest": "7d5d9d4474429c1bed613d9c3183a25b029c8b9b75b9b0ee4a61e49493f1fec2"
"sha256Digest": "8f710659a00c46dfedfa91b497b4d4bae10b9fe0d2bd293d5532409e6a65377c"
}
],
"healthcareapis": [
Expand Down Expand Up @@ -2252,6 +2284,39 @@
"version": "0.1.1"
},
"sha256Digest": "f42d8c99ace9b4df29eea79ac7a588b1fcaecd381b1a80c7dbdd920756f8d209"
},
{
"downloadUrl": "https://azurecliprod.blob.core.windows.net/cli-extensions/spring_cloud-0.2.0-py2.py3-none-any.whl",
"filename": "spring_cloud-0.2.0-py2.py3-none-any.whl",
"metadata": {
"azext.isPreview": true,
"azext.maxCliCoreVersion": "2.1.0",
"azext.minCliCoreVersion": "2.0.67",
"extensions": {
"python.details": {
"contacts": [
{
"email": "azpycli@microsoft.com",
"name": "Microsoft Corporation",
"role": "author"
}
],
"document_names": {
"description": "DESCRIPTION.rst"
},
"project_urls": {
"Home": "https://github.com/Azure/azure-cli-extensions"
}
}
},
"generator": "bdist_wheel (0.30.0)",
"license": "MIT",
"metadata_version": "2.0",
"name": "spring-cloud",
"summary": "Microsoft Azure Command-Line Tools spring-cloud Extension",
"version": "0.2.0"
},
"sha256Digest": "b39aa8c49b316b1870e79db0526be2db772b179f9f517f72af898d9c3cc3310d"
}
],
"storage-preview": [
Expand Down Expand Up @@ -2659,4 +2724,4 @@
]
},
"formatVersion": "1"
}
}

0 comments on commit 2868847

Please sign in to comment.