From bdda1ef101ca488d62d619bbe2419ee4dbe9051c Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Tue, 20 Nov 2018 15:55:22 -0800 Subject: [PATCH 1/3] Minor updates to core/keys/generate_ssh_keys and batchai/custom/_generate_ssh_keys --- src/azure-cli-core/azure/cli/core/keys.py | 2 +- .../azure/cli/command_modules/batchai/custom.py | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/azure-cli-core/azure/cli/core/keys.py b/src/azure-cli-core/azure/cli/core/keys.py index d462e2d80d0..7641cc958de 100644 --- a/src/azure-cli-core/azure/cli/core/keys.py +++ b/src/azure-cli-core/azure/cli/core/keys.py @@ -60,7 +60,7 @@ def generate_ssh_keys(private_key_filepath, public_key_filepath): try: key = paramiko.RSAKey(filename=private_key_filepath) logger.warning("Private SSH key file '%s' was found in the directory: '%s'. " - "We will generate a paired public key file '%s'", + "A paired public key file '%s' will be generated.", private_key_filepath, ssh_dir, public_key_filepath) except (PasswordRequiredException, SSHException, IOError) as e: raise CLIError(e) diff --git a/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/custom.py b/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/custom.py index c70ded100da..15410b1290e 100644 --- a/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/custom.py +++ b/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/custom.py @@ -605,15 +605,9 @@ def _generate_ssh_keys(): """Generates ssh keys pair""" private_key_path = os.path.join(os.path.expanduser('~'), '.ssh', 'id_rsa') public_key_path = os.path.join(os.path.expanduser('~'), '.ssh', 'id_rsa.pub') - if os.path.exists(private_key_path) and os.path.exists(public_key_path): - logger.warning('Reusing existing ssh public key from ~/.ssh') - return - if os.path.exists(private_key_path): - logger.warning('SSH private key id_rsa exists but public key is missing. Please export the public key.') - return keys.generate_ssh_keys(private_key_path, public_key_path) - logger.warning('SSH key files id_rsa and id_rsa.pub have been generated under ~/.ssh to allow SSH access to the ' - 'nodes. If using machines without permanent storage, back up your keys to a safe location.') + logger.warning('Attempted to find or generate SSH key files id_rsa and id_rsa.pub under ~/.ssh to allow SSH access ' + 'to the nodes. If using machines without permanent storage, back up your keys to a safe location.') def list_workspaces(client, resource_group=None): From 46a594fc0afaf90b0a70f29b825df27150b699aa Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Wed, 21 Nov 2018 14:58:15 -0800 Subject: [PATCH 2/3] Version bumps. --- src/azure-cli-core/HISTORY.rst | 5 +++++ src/azure-cli-core/azure/cli/core/__init__.py | 2 +- src/azure-cli-core/setup.py | 2 +- src/azure-cli/HISTORY.rst | 4 ++++ src/azure-cli/setup.py | 2 +- src/command_modules/azure-cli-batchai/HISTORY.rst | 4 ++++ src/command_modules/azure-cli-batchai/setup.py | 2 +- 7 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/azure-cli-core/HISTORY.rst b/src/azure-cli-core/HISTORY.rst index a9e6585f61e..a87480c665c 100644 --- a/src/azure-cli-core/HISTORY.rst +++ b/src/azure-cli-core/HISTORY.rst @@ -2,6 +2,11 @@ Release History =============== + +2.0.52 +++++++ +* Minor fixes + 2.0.51 ++++++ * msi login: do not reuse subscription name for identity info diff --git a/src/azure-cli-core/azure/cli/core/__init__.py b/src/azure-cli-core/azure/cli/core/__init__.py index a1909677eb0..198ec737ac1 100644 --- a/src/azure-cli-core/azure/cli/core/__init__.py +++ b/src/azure-cli-core/azure/cli/core/__init__.py @@ -4,7 +4,7 @@ # -------------------------------------------------------------------------------------------- from __future__ import print_function -__version__ = "2.0.51" +__version__ = "2.0.52" import os import sys diff --git a/src/azure-cli-core/setup.py b/src/azure-cli-core/setup.py index e9212393a16..35d75427716 100644 --- a/src/azure-cli-core/setup.py +++ b/src/azure-cli-core/setup.py @@ -17,7 +17,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -VERSION = "2.0.51" +VERSION = "2.0.52" # If we have source, validate that our version numbers match # This should prevent uploading releases with mismatched versions. try: diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index 5bdb2ed97b3..50756134c71 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +2.0.52 +++++++ +* Minor fixes + 2.0.51 ++++++ * Minor fixes diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py index f08bafad4a9..2c20fda5ba5 100644 --- a/src/azure-cli/setup.py +++ b/src/azure-cli/setup.py @@ -15,7 +15,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -VERSION = "2.0.51" +VERSION = "2.0.52" # If we have source, validate that our version numbers match # This should prevent uploading releases with mismatched versions. try: diff --git a/src/command_modules/azure-cli-batchai/HISTORY.rst b/src/command_modules/azure-cli-batchai/HISTORY.rst index 41f467b3c06..c1a2f089a48 100644 --- a/src/command_modules/azure-cli-batchai/HISTORY.rst +++ b/src/command_modules/azure-cli-batchai/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.4.5 ++++++ +* Minor fixes + 0.4.4 +++++ * Upgrade pinned dependency azure-storage-blob from 1.1.0 to 1.3.1 diff --git a/src/command_modules/azure-cli-batchai/setup.py b/src/command_modules/azure-cli-batchai/setup.py index 370f997d055..46a7e4bbf1b 100644 --- a/src/command_modules/azure-cli-batchai/setup.py +++ b/src/command_modules/azure-cli-batchai/setup.py @@ -13,7 +13,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -VERSION = "0.4.4" +VERSION = "0.4.5" # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers CLASSIFIERS = [ From a1e17b7461e0f15c586410d8affb29d83ff03d55 Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Wed, 21 Nov 2018 17:34:53 -0800 Subject: [PATCH 3/3] Removed duplicate history entries --- src/azure-cli/HISTORY.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index 8414189c7f5..4050bb4f846 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -6,10 +6,6 @@ Release History ++++++ * Minor fixes -2.0.52 -++++++ -* Minor fixes - 2.0.51 ++++++ * Minor fixes