Skip to content

Commit 16f1c04

Browse files
author
KARTIK KHULLAR
committed
Merge branch 'main' of https://github.com/Azure/azure-cli-extensions into azure-sm/blob-to-blob-endpoint-identity-patch
2 parents c88f132 + 76c9a43 commit 16f1c04

7 files changed

Lines changed: 109 additions & 6 deletions

File tree

src/image-copy/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
1.0.4
7+
++++++
8+
* Mask the value of the `--sas-token` parameter when displaying it in the terminal
9+
610
1.0.3
711
++++++
812
* Fix the issue for sasTokenParsing, removing python related warnings from the sasToken(cmd_output was unfiltered)

src/image-copy/azext_imagecopy/cli_utils.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
def run_cli_command(cmd, return_as_json=False):
2020
try:
2121
cmd_output = check_output(cmd, stderr=STDOUT, universal_newlines=True)
22-
logger.debug('command: %s ended with output: %s', cmd, cmd_output)
22+
logger.debug('command: %s ended with output: %s', _mask_output_token(cmd), cmd_output)
2323

2424
if return_as_json:
2525
if cmd_output:
@@ -40,15 +40,25 @@ def run_cli_command(cmd, return_as_json=False):
4040
raise CLIError("Command returned an unexpected empty string.")
4141
return cmd_output
4242
except CalledProcessError as ex:
43-
logger.error('command failed: %s', cmd)
43+
logger.error('command failed: %s', _mask_output_token(cmd))
4444
logger.error('output: %s', ex.output)
4545
raise ex
4646
except Exception as ex:
47-
logger.error('command ended with an error: %s', cmd)
47+
logger.error('command ended with an error: %s', _mask_output_token(cmd))
4848
logger.error('args: %s', ex.args)
4949
raise ex
5050

5151

52+
def _mask_output_token(cmd):
53+
output = cmd[:]
54+
token_param_name = "--sas-token"
55+
if token_param_name in output:
56+
idx = output.index(token_param_name)
57+
output[idx + 1] = "******"
58+
59+
return output
60+
61+
5262
def prepare_cli_command(cmd, output_as_json=True, tags=None, subscription=None, only_show_errors=None):
5363
full_cmd = [sys.executable, '-m', 'azure.cli'] + cmd
5464

src/image-copy/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from codecs import open
99
from setuptools import find_packages, setup
1010

11-
VERSION = "1.0.3"
11+
VERSION = "1.0.4"
1212

1313
CLASSIFIERS = [
1414
'Development Status :: 4 - Beta',

src/index.json

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67516,6 +67516,48 @@
6751667516
"version": "1.0.3"
6751767517
},
6751867518
"sha256Digest": "613405b116229e1e01936a7be3ba32300b02ddaf6b2a2478e38c2851e1932868"
67519+
},
67520+
{
67521+
"downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/image_copy_extension-1.0.4-py2.py3-none-any.whl",
67522+
"filename": "image_copy_extension-1.0.4-py2.py3-none-any.whl",
67523+
"metadata": {
67524+
"azext.minCliCoreVersion": "2.68.0",
67525+
"classifiers": [
67526+
"Development Status :: 4 - Beta",
67527+
"Intended Audience :: Developers",
67528+
"Intended Audience :: System Administrators",
67529+
"Programming Language :: Python",
67530+
"Programming Language :: Python :: 3",
67531+
"Programming Language :: Python :: 3.6",
67532+
"Programming Language :: Python :: 3.7",
67533+
"Programming Language :: Python :: 3.8",
67534+
"License :: OSI Approved :: MIT License"
67535+
],
67536+
"extensions": {
67537+
"python.details": {
67538+
"contacts": [
67539+
{
67540+
"email": "tamir.kamara@microsoft.com",
67541+
"name": "Tamir Kamara",
67542+
"role": "author"
67543+
}
67544+
],
67545+
"document_names": {
67546+
"description": "DESCRIPTION.rst"
67547+
},
67548+
"project_urls": {
67549+
"Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/image-copy"
67550+
}
67551+
}
67552+
},
67553+
"generator": "bdist_wheel (0.30.0)",
67554+
"license": "MIT",
67555+
"metadata_version": "2.0",
67556+
"name": "image-copy-extension",
67557+
"summary": "Support for copying managed vm images between regions",
67558+
"version": "1.0.4"
67559+
},
67560+
"sha256Digest": "a9e2749684213866864601a48642595ef9fd9ca6fd7ce23d104aca251d285eda"
6751967561
}
6752067562
],
6752167563
"image-gallery": [
@@ -89400,6 +89442,49 @@
8940089442
"version": "1.0.0"
8940189443
},
8940289444
"sha256Digest": "a31751371c3b643cec53d0b83e195f51924b4c1a6302b84750c945543002163f"
89445+
},
89446+
{
89447+
"downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/pscloud-1.0.1-py3-none-any.whl",
89448+
"filename": "pscloud-1.0.1-py3-none-any.whl",
89449+
"metadata": {
89450+
"azext.isPreview": false,
89451+
"azext.minCliCoreVersion": "2.75.0",
89452+
"classifiers": [
89453+
"Development Status :: 4 - Beta",
89454+
"Intended Audience :: Developers",
89455+
"Intended Audience :: System Administrators",
89456+
"Programming Language :: Python",
89457+
"Programming Language :: Python :: 3",
89458+
"Programming Language :: Python :: 3.7",
89459+
"Programming Language :: Python :: 3.8",
89460+
"Programming Language :: Python :: 3.9",
89461+
"License :: OSI Approved :: MIT License"
89462+
],
89463+
"extensions": {
89464+
"python.details": {
89465+
"contacts": [
89466+
{
89467+
"email": "azpycli@microsoft.com",
89468+
"name": "Microsoft Corporation",
89469+
"role": "author"
89470+
}
89471+
],
89472+
"document_names": {
89473+
"description": "DESCRIPTION.rst"
89474+
},
89475+
"project_urls": {
89476+
"Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/pscloud"
89477+
}
89478+
}
89479+
},
89480+
"generator": "bdist_wheel (0.30.0)",
89481+
"license": "MIT",
89482+
"metadata_version": "2.0",
89483+
"name": "pscloud",
89484+
"summary": "Microsoft Azure Command-Line Tools Pscloud Extension.",
89485+
"version": "1.0.1"
89486+
},
89487+
"sha256Digest": "af6ba4e20ad16c1eade4f899155502b71fab6c971bbf1bf47f4d8ae0c010e3c9"
8940389488
}
8940489489
],
8940589490
"purview": [

src/pscloud/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
1.0.1
7+
+++++
8+
* Version bump for new release.
9+
610
1.0.0
711
+++++
812
* Stable release.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"azext.isPreview": true,
2+
"azext.isPreview": false,
33
"azext.minCliCoreVersion": "2.75.0"
44
}

src/pscloud/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
# HISTORY.rst entry.
13-
STABLE_VERSION = '1.0.0'
13+
STABLE_VERSION = '1.0.1'
1414
PREVIEW_VERSION = '1.0.0b1'
1515

1616
# Currently using stable version

0 commit comments

Comments
 (0)