Skip to content

Commit

Permalink
Fix merge
Browse files Browse the repository at this point in the history
Signed-off-by: nshankar13 <nshankar@microsoft.com>
  • Loading branch information
nshankar13 committed Nov 3, 2021
2 parents 87beb0f + d545111 commit 21da790
Show file tree
Hide file tree
Showing 1,772 changed files with 536,846 additions and 191,697 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/vmware/azext_vmware/tests/latest/recordings/*.yaml linguist-generated=true
12 changes: 11 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@

/src/netappfiles-preview/ @b-lefr

/src/network-manager/ @kairu-ms @jsntcy

/src/healthcareapis/ @fengzhou-msft @iviark

/src/healthbot/ @guy-microsoft
Expand Down Expand Up @@ -194,8 +196,16 @@

/src/webpubsub/ @zackliu

/src/connectedvmware/ @sanmishra18
/src/connectedvmware/ @93mishra

/src/diskpool/ @Juliehzl

/src/serial-console/ @adrianabedon

/src/dataprotection/ @sambitratha

/src/authV2/ @mkarmark

/src/purview/ @kairu-ms @jsntcy

/src/elastic/ @kairu-ms @jsntcy
12 changes: 6 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- job: CheckLicenseHeader
displayName: "Check License"
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-20.04'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.6'
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- job: StaticAnalysis
displayName: "Static Analysis"
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-20.04'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.6'
Expand All @@ -81,7 +81,7 @@ jobs:
- job: IndexVerify
displayName: "Verify Extensions Index"
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-20.04'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
Expand All @@ -98,7 +98,7 @@ jobs:
- job: SourceTests
displayName: "Integration Tests, Build Tests"
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-20.04'
strategy:
matrix:
Python36:
Expand All @@ -122,7 +122,7 @@ jobs:
displayName: "CLI Linter on Modified Extensions"
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-20.04'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.6'
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
- job: IndexRefDocVerify
displayName: "Verify Ref Docs"
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-20.04'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
Expand Down
2 changes: 1 addition & 1 deletion k8s-custom-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ stages:
echo "Installing helm3"
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
./get_helm.sh --version v3.6.3
echo "Installing kubectl"
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
Expand Down
47 changes: 47 additions & 0 deletions linter_exclusions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ aks create:
load_balancer_outbound_ports:
rule_exclusions:
- option_length_too_long
nat_gateway_idle_timeout:
rule_exclusions:
- option_length_too_long
nat_gateway_managed_outbound_ip_count:
rule_exclusions:
- option_length_too_long
node_osdisk_diskencryptionset_id:
rule_exclusions:
- option_length_too_long
Expand Down Expand Up @@ -88,6 +94,28 @@ aks create:
assign_kubelet_identity:
rule_exclusions:
- option_length_too_long
aks addon enable:
parameters:
appgw_watch_namespace:
rule_exclusions:
- option_length_too_long
workspace_resource_id:
rule_exclusions:
- option_length_too_long
enable_msi_auth_for_monitoring:
rule_exclusions:
- option_length_too_long
aks addon update:
parameters:
appgw_watch_namespace:
rule_exclusions:
- option_length_too_long
workspace_resource_id:
rule_exclusions:
- option_length_too_long
enable_msi_auth_for_monitoring:
rule_exclusions:
- option_length_too_long
aks enable-addons:
parameters:
appgw_watch_namespace:
Expand Down Expand Up @@ -142,6 +170,12 @@ aks update:
load_balancer_outbound_ports:
rule_exclusions:
- option_length_too_long
nat_gateway_idle_timeout:
rule_exclusions:
- option_length_too_long
nat_gateway_managed_outbound_ip_count:
rule_exclusions:
- option_length_too_long
enable_managed_identity:
rule_exclusions:
- option_length_too_long
Expand Down Expand Up @@ -1217,6 +1251,14 @@ maintenance assignment create:
maintenance_configuration_id:
rule_exclusions:
- option_length_too_long
maintenance assignment create-or-update-parent:
parameters:
configuration_assignment_name:
rule_exclusions:
- option_length_too_long
maintenance_configuration_id:
rule_exclusions:
- option_length_too_long
maintenance assignment delete:
parameters:
configuration_assignment_name:
Expand Down Expand Up @@ -2073,6 +2115,11 @@ spring-cloud update:
disable_distributed_tracing:
rule_exclusions:
- option_length_too_long
ssh vm:
parameters:
ssh_args:
rule_exclusions:
- no_positional_parameters
storage account create:
parameters:
hierarchical_namespace:
Expand Down
13 changes: 7 additions & 6 deletions scripts/ci/avail-ext-doc/list-template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Available extensions for the Azure CLI
description: A complete list of the officially supported extensions for the Azure CLI.
title: List of available Azure CLI extensions | Microsoft Docs
description: A complete list of officially supported Azure Command-Line Interface (CLI) extensions that are provided and maintained by Microsoft.
author: haroldrandom
ms.author: jianzen
manager: yonzhan,yungezz
Expand All @@ -10,18 +10,19 @@ ms.prod: azure
ms.technology: azure-cli
ms.devlang: azure-cli
ms.custom: devx-track-azurecli
keywords: az extension, azure cli extensions, azure extensions
---

# Available extensions for the Azure CLI
# Available Azure CLI extensions

This article is a complete list of the available extensions for the Azure CLI which are supported by Microsoft.

The list of extensions is also available from the CLI. To get it, run [az extension list-available](/cli/azure/extension#az_extension_list_available):
This article is a complete list of the available extensions for the Azure CLI which are supported by Microsoft. The list of extensions is also available from the CLI. To get it, run [az extension list-available](/cli/azure/extension#az_extension_list_available):

```azurecli-interactive
az extension list-available --output table
```

You will be prompted to install an extension on first use.

| Extension | Required Minimum CLI Version | Description | Status | Release Notes |
|----|-----------------|-------------|---------|---------------|{% for extension in extensions %}
|[{{ extension.name }}]({{ extension.project_url }}) | {{ extension.min_cli_core_version }} | {{ extension.desc }} | {{ extension.status }} | [{{extension.version}}]({{extension.history}}) |{% endfor %}
3 changes: 2 additions & 1 deletion scripts/ci/build_ext_cmd_tree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export AZURE_EXTENSION_INDEX_URL=https://raw.githubusercontent.com/Azure/azure-c

output=$(az extension list-available --query [].name -otsv)
# azure-cli-ml is replaced by ml
blocklist=("azure-cli-ml")
# TODO: azure-batch-cli-extensions is not compatible with latest batch SDK.
blocklist=("azure-cli-ml" "azure-batch-cli-extensions")

rm -f ~/.azure/extCmdTreeToUpload.json

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import shlex
from subprocess import check_output, check_call, CalledProcessError

import mock
from unittest import mock
from wheel.install import WHEEL_INFO_RE
from six import with_metaclass

Expand Down
4 changes: 4 additions & 0 deletions src/aem/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

0.3.0
+++++
* Add support for setting proxy and debug configuration of the VM Extension for SAP

0.2.2
+++++
* Fix for https://github.com/Azure/azure-cli-extensions/issues/3019
Expand Down
7 changes: 7 additions & 0 deletions src/aem/azext_aem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@ def load_arguments(self, _):
help="The name of the Virtual Machine. You can configure the default using `az configure --defaults vm=<name>`",
completer=get_resource_name_completion_list('Microsoft.Compute/virtualMachines'), id_part='name')

proxy_arg_type = CLIArgumentType(options_list=['--proxy-uri', '-p'])
proxy_uri = CLIArgumentType(overrides=proxy_arg_type,
help="Set the proxy URI that should be used to access external resources e.g. the Azure API. Example: http://proxyhost:8080")

with self.argument_context('vm aem') as c:
c.argument('vm_name', existing_vm_name)
c.argument('proxy_uri', proxy_uri)
c.argument('skip_storage_check', action='store_true',
help='Disables the test for table content')
c.argument('skip_storage_analytics', action='store_true',
Expand All @@ -50,6 +55,8 @@ def load_arguments(self, _):
help='Set the access of the VM identity to the individual resources, e.g. data disks instead of the complete resource group.')
c.argument('wait_time_in_minutes', type=int,
help='Maximum minutes to wait for the storage metrics to be available')
c.argument('debug_extension', action='store_true',
help='Enable debug mode on the VM Extension for SAP.')


COMMAND_LOADER_CLS = AEMCommandsLoader
27 changes: 23 additions & 4 deletions src/aem/azext_aem/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,17 @@


def set_aem(cmd, resource_group_name, vm_name, skip_storage_analytics=False,
install_new_extension=False, set_access_to_individual_resources=False):
install_new_extension=False, set_access_to_individual_resources=False,
proxy_uri=None, debug_extension=False):
aem = EnhancedMonitoring(cmd, resource_group_name, vm_name,
vm_client=get_mgmt_service_client(cmd.cli_ctx, ResourceType.MGMT_COMPUTE),
storage_client=get_mgmt_service_client(cmd.cli_ctx, ResourceType.MGMT_STORAGE),
roles_client=get_mgmt_service_client(cmd.cli_ctx, ResourceType.MGMT_AUTHORIZATION),
skip_storage_analytics=skip_storage_analytics,
install_new_extension=install_new_extension,
set_access_to_individual_resources=set_access_to_individual_resources)
set_access_to_individual_resources=set_access_to_individual_resources,
proxy_uri=proxy_uri,
debug_extension=debug_extension)
return aem.enable()


Expand All @@ -84,7 +87,9 @@ def __init__(self, cmd, resource_group, vm_name, vm_client,
storage_client, roles_client=None, skip_storage_analytics=None,
install_new_extension=None,
set_access_to_individual_resources=None,
no_wait=False):
no_wait=False,
proxy_uri=None,
debug_extension=False):
self._vm_client = vm_client
self._storage_client = storage_client
self._roles_client = roles_client
Expand All @@ -106,6 +111,8 @@ def __init__(self, cmd, resource_group, vm_name, vm_client,
self._install_new_extension = install_new_extension
self._set_access_to_individual_resources = set_access_to_individual_resources
self._no_wait = no_wait
self._proxy_uri = proxy_uri
self._debug_extension = debug_extension

def enable(self):
# * no extension + new extension switch => install new extension
Expand Down Expand Up @@ -173,6 +180,17 @@ def _enable_new(self):

self._create_role_assignments_for_scopes(scopes)

pub_cfg = {}
if self._proxy_uri is not None:
pub_cfg.update({
'proxy': self._proxy_uri
})

if self._debug_extension is True:
pub_cfg.update({
'debug': '1'
})

VirtualMachineExtension = self._cmd.get_models('VirtualMachineExtension',
resource_type=ResourceType.MGMT_COMPUTE,
operation_group='virtual_machine_extensions')
Expand All @@ -183,7 +201,8 @@ def _enable_new(self):
type_properties_type=self._extension['name'],
type_handler_version=self._extension['version'],
settings={
'system': 'SAP'
'system': 'SAP',
'cfg': [{'key': k, 'value': pub_cfg[k]} for k in pub_cfg]
},
auto_upgrade_minor_version=True)

Expand Down
Loading

0 comments on commit 21da790

Please sign in to comment.