Skip to content

Commit

Permalink
Merge branch 'Azure:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ganga1980 authored Jul 30, 2024
2 parents 957b9ef + d0eff77 commit 56ba2ce
Show file tree
Hide file tree
Showing 70 changed files with 17,621 additions and 15,830 deletions.
8 changes: 7 additions & 1 deletion src/amg/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,10 @@ Release History

1.3.5
++++++
* `az grafana dashboard sync`: fix version mismatch issue for library panel sync
* `az grafana dashboard sync`: fix version mismatch issue for library panel sync

1.3.6
++++++
* `az grafana folder show`: remove folder lookup by id due to deprecated API
* `az grafana folder delete`: remove folder lookup by id due to deprecated API
* `az grafana dashboard import`: update call from deprecated dashboard import API to dashboard create/update API
2 changes: 1 addition & 1 deletion src/amg/azext_amg/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def load_arguments(self, _):
c.argument("grafana_name", grafana_name_type, options_list=["--name", "-n"], id_part=None, validator=process_missing_resource_group_parameter)
c.argument("id", help=("The identifier (id) of a dashboard/data source is an auto-incrementing "
"numeric value and is only unique per Grafana install."))
c.argument("folder", help="id, uid, title which can identify a folder. CLI will search in the order of id, uid, and title, till finds a match")
c.argument("folder", help="uid or title which can identify a folder. CLI will search with uid first, then title, till it finds a match")
c.argument("api_key_or_token", options_list=["--api-key", "--token", '-t'],
help="api key or service account token, a randomly generated string used to interact with Grafana endpoint; if missing, CLI will use current logged-in user's credentials")
c.argument("components", get_enum_type(["dashboards", "datasources", "folders", "snapshots", "annotations"]), nargs='+', options_list=["-c", "--components"], help="grafana artifact types to backup")
Expand Down
31 changes: 14 additions & 17 deletions src/amg/azext_amg/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def import_dashboard(cmd, grafana_name, definition, folder=None, resource_group_
else:
logger.warning("No data source was found matching the required parameter of %s", parameter['pluginId'])

response = _send_request(cmd, resource_group_name, grafana_name, "post", "/api/dashboards/import",
response = _send_request(cmd, resource_group_name, grafana_name, "post", "/api/dashboards/db",
payload, api_key_or_token=api_key_or_token)
return json.loads(response.content)

Expand Down Expand Up @@ -569,24 +569,21 @@ def delete_folder(cmd, grafana_name, folder, resource_group_name=None, api_key_o


def _find_folder(cmd, resource_group_name, grafana_name, folder, api_key_or_token=None):
response = _send_request(cmd, resource_group_name, grafana_name, "get", "/api/folders/id/" + folder,
response = _send_request(cmd, resource_group_name, grafana_name, "get", "/api/folders/" + folder,
raise_for_error_status=False, api_key_or_token=api_key_or_token)
if response.status_code >= 400 or not json.loads(response.content)['uid']:
response = _send_request(cmd, resource_group_name, grafana_name, "get", "/api/folders/" + folder,
raise_for_error_status=False, api_key_or_token=api_key_or_token)
if response.status_code >= 400:
response = _send_request(cmd, resource_group_name, grafana_name, "get", "/api/folders",
api_key_or_token=api_key_or_token)
if response.status_code >= 400:
response = _send_request(cmd, resource_group_name, grafana_name, "get", "/api/folders",
api_key_or_token=api_key_or_token)
if response.status_code >= 400:
raise ArgumentUsageError(f"Couldn't find the folder '{folder}'. Ex: {response.status_code}")
result = json.loads(response.content)
result = [f for f in result if f["title"] == folder]
if len(result) == 0:
raise ArgumentUsageError(f"Couldn't find the folder '{folder}'. Ex: {response.status_code}")
if len(result) > 1:
raise ArgumentUsageError((f"More than one folder has the same title of '{folder}'. Please use other "
f"unique identifiers"))
return result[0]
raise ArgumentUsageError(f"Couldn't find the folder '{folder}'. Ex: {response.status_code}")
result = json.loads(response.content)
result = [f for f in result if f["title"] == folder]
if len(result) == 0:
raise ArgumentUsageError(f"Couldn't find the folder '{folder}'. Ex: {response.status_code}")
if len(result) > 1:
raise ArgumentUsageError((f"More than one folder has the same title of '{folder}'. Please use other "
f"unique identifiers"))
return result[0]
return json.loads(response.content)


Expand Down
3,452 changes: 1,599 additions & 1,853 deletions src/amg/azext_amg/tests/latest/recordings/test_amg_backup_restore.yaml

Large diffs are not rendered by default.

3,887 changes: 1,746 additions & 2,141 deletions src/amg/azext_amg/tests/latest/recordings/test_amg_crud.yaml

Large diffs are not rendered by default.

7,950 changes: 3,919 additions & 4,031 deletions src/amg/azext_amg/tests/latest/recordings/test_amg_e2e.yaml

Large diffs are not rendered by default.

2,579 changes: 1,269 additions & 1,310 deletions src/amg/azext_amg/tests/latest/recordings/test_api_key_e2e.yaml

Large diffs are not rendered by default.

5,331 changes: 2,001 additions & 3,330 deletions src/amg/azext_amg/tests/latest/recordings/test_service_account_e2e.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/amg/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 = '1.3.5'
VERSION = '1.3.6'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down
21 changes: 14 additions & 7 deletions src/hdinsightonaks/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,24 @@
Release History
===============
1.0.0b3
++++++
* `az hdinsight-on-aks clusterpool upgrade history`: Support list a list of upgrade history.
* `az hdinsight-on-aks cluster upgrade history`: Support list a list of upgrade history.
* `az hdinsight-on-aks cluster upgrade rollback`: Support manual rollback upgrade for a cluster.
* `az hdinsight-on-aks cluster library manage`: Support manage libraries on HDInsight on AKS cluster.
* `az hdinsight-on-aks cluster create`: Support for cluster creation using multiple identity above version 1.2.0 use --identity-list.

1.0.0b2
++++++
* [Breaking Change] 'az hdinsight-on-aks cluster show-instance-view': Modified to 'az hdinsight-on-aks cluster instance-view show'
* 'az hdinsight-on-aks clusterpool create': Support create cluster pool with user network profile with --subnet-id, --api-server-ip-ranges, --private-server-enabled, --outbound-type
* 'az hdinsight-on-aks clusterpool upgrade list': Support get cluster pool available upgrade versions
* 'az hdinsight-on-aks clusterpool upgrade run': Support upgrade cluster pool
* 'az hdinsight-on-aks cluster create': Support create cluster with internal ingress use --internal-ingress-enabled
* [Breaking Change] 'az hdinsight-on-aks cluster show-instance-view': Modified to 'az hdinsight-on-aks cluster instance-view show'.
* 'az hdinsight-on-aks clusterpool create': Support create cluster pool with user network profile with --subnet-id, --api-server-ip-ranges, --private-server-enabled, --outbound-type.
* 'az hdinsight-on-aks clusterpool upgrade list': Support get cluster pool available upgrade versions.
* 'az hdinsight-on-aks clusterpool upgrade run': Support upgrade cluster pool.
* 'az hdinsight-on-aks cluster create': Support create cluster with internal ingress use --internal-ingress-enabled.
* 'az hdinsight-on-aks cluster upgrade list': Support get cluster available upgrade versions.
* 'az hdinsight-on-aks cluster instance-view list': Support list a cluster instances
* 'az hdinsight-on-aks clusterpool update': Updated property options from ['--cluster-pool-version'] to ['--cluster-pool-version', '--version']
* 'az hdinsight-on-aks cluster instance-view list': Support list a cluster instances.
* 'az hdinsight-on-aks clusterpool update': Updated property options from ['--cluster-pool-version'] to ['--cluster-pool-version', '--version'].

1.0.0b1
++++++
Expand Down
20 changes: 0 additions & 20 deletions src/hdinsightonaks/azext_hdinsightonaks/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,3 @@
type: command
short-summary: Create a node profile with SKU and worker count.
"""

helps['hdinsight-on-aks cluster trino-hive-catalog'] = """
type: group
short-summary: Manage hive catalog config.
"""

helps['hdinsight-on-aks cluster trino-hive-catalog create'] = """
type: command
short-summary: Create a hive catalog configured as a Trino cluster.
"""

helps['hdinsight-on-aks cluster secret'] = """
type: group
short-summary: Manage secret reference.
"""

helps['hdinsight-on-aks cluster secret create'] = """
type: command
short-summary: Create a reference to provide a secret to store the password for accessing the database.
"""
21 changes: 0 additions & 21 deletions src/hdinsightonaks/azext_hdinsightonaks/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,10 @@


def load_arguments(self, _): # pylint: disable=unused-argument
with self.argument_context('hdinsight-on-aks cluster trino-hive-catalog create') as c:
c.argument('catalog_name',
help='Name of trino catalog which should use specified hive metastore.')
c.argument('metastore_db_connection_url', options_list=['--metastore-db-connection-url', '--url'],
help='Connection string for hive metastore database.', required=True)
c.argument('metastore_db_connection_user_name', options_list=['--metastore-db-connection-user-name', '--user'],
help='User name for hive metastore database.', required=True)
c.argument('metastore_db_connection_password_secret',
options_list=['--metastore-db-connection-password-secret', '--secret'],
help='Password secret for hive metastore database.', required=True)
c.argument('metastore_warehouse_dir', options_list=['--metastore-warehouse-dir', '--warehouse-dir'],
help='Warehouse directory for hive metastore database.')

with self.argument_context('hdinsight-on-aks cluster node-profile create') as c:
c.argument('count',
help='The number of virtual machines.', required=True)
c.argument('node_type',
help='The node type.', required=True)
c.argument('vm_size',
help='The virtual machine SKU.', required=True)

with self.argument_context('hdinsight-on-aks cluster secret create') as c:
c.argument('secret_name',
help='The secret name in the key vault.', required=True)
c.argument('reference_name',
help='The reference name of the secret to be used in service configs.', required=True)
c.argument('version',
help='The version of the secret in key vault.')
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class CheckNameAvailability(AAZCommand):
"""

_aaz_info = {
"version": "2023-11-01-preview",
"version": "2024-05-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.hdinsight/locations/{}/checknameavailability", "2023-11-01-preview"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.hdinsight/locations/{}/checknameavailability", "2024-05-01-preview"],
]
}

Expand Down Expand Up @@ -126,7 +126,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-01-preview",
"api-version", "2024-05-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class ListAvailableClusterPoolVersion(AAZCommand):
"""

_aaz_info = {
"version": "2023-11-01-preview",
"version": "2024-05-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.hdinsight/locations/{}/availableclusterpoolversions", "2023-11-01-preview"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.hdinsight/locations/{}/availableclusterpoolversions", "2024-05-01-preview"],
]
}

Expand Down Expand Up @@ -113,7 +113,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-01-preview",
"api-version", "2024-05-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class ListAvailableClusterVersion(AAZCommand):
"""

_aaz_info = {
"version": "2023-11-01-preview",
"version": "2024-05-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.hdinsight/locations/{}/availableclusterversions", "2023-11-01-preview"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.hdinsight/locations/{}/availableclusterversions", "2024-05-01-preview"],
]
}

Expand Down Expand Up @@ -113,7 +113,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-01-preview",
"api-version", "2024-05-01-preview",
required=True,
),
}
Expand Down
Loading

0 comments on commit 56ba2ce

Please sign in to comment.