From ab233e232f94a9388c495c5b1cf9afd5e45f8b83 Mon Sep 17 00:00:00 2001 From: Delora Bradish Date: Wed, 20 Jan 2021 15:23:34 -0500 Subject: [PATCH 1/2] update of az openshift warning --- .../azure/cli/command_modules/acs/_help.py | 16 ++++++++-------- .../azure/cli/command_modules/acs/custom.py | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/acs/_help.py b/src/azure-cli/azure/cli/command_modules/acs/_help.py index 3991257c063..6979e16dfb0 100644 --- a/src/azure-cli/azure/cli/command_modules/acs/_help.py +++ b/src/azure-cli/azure/cli/command_modules/acs/_help.py @@ -964,7 +964,7 @@ helps['openshift'] = """ type: group short-summary: Manage Azure Red Hat OpenShift 3.11 clusters. -long-summary: Support for existing ARO 3.11 clusters ends June 2022. Please see aka.ms/aro/4 for information on switching to ARO 4. +long-summary: The az openshift command is deprecated and has been replaced by az aro for ARO 4 clusters. See http://aka.ms/aro/4 for information on switching to ARO 4. """ helps['openshift create'] = """ @@ -1020,7 +1020,7 @@ helps['openshift delete'] = """ type: command short-summary: Delete an Azure Red Hat OpenShift 3.11 cluster. -long-summary: Support for existing ARO 3.11 clusters ends June 2022. Please see aka.ms/aro/4 for information on switching to ARO 4. +long-summary: The az openshift command is deprecated and has been replaced by az aro for ARO 4 clusters. See http://aka.ms/aro/4 for information on switching to ARO 4. examples: - name: Delete an Azure Red Hat OpenShift 3.11 cluster. text: az openshift delete --name MyManagedOpenShiftCluster --resource-group MyResourceGroup @@ -1030,13 +1030,13 @@ helps['openshift list'] = """ type: command short-summary: List Azure Red Hat OpenShift 3.11 clusters. -long-summary: Support for existing ARO 3.11 clusters ends June 2022. Please see aka.ms/aro/4 for information on switching to ARO 4. +long-summary: The az openshift command is deprecated and has been replaced by az aro for ARO 4 clusters. See http://aka.ms/aro/4 for information on switching to ARO 4. """ helps['openshift scale'] = """ type: command short-summary: Scale the compute pool in an Azure Red Hat OpenShift 3.11 cluster. -long-summary: Support for existing ARO 3.11 clusters ends June 2022. Please see aka.ms/aro/4 for information on switching to ARO 4. +long-summary: The az openshift command is deprecated and has been replaced by az aro for ARO 4 clusters. See http://aka.ms/aro/4 for information on switching to ARO 4. parameters: - name: --compute-count -c type: int @@ -1060,7 +1060,7 @@ helps['openshift wait'] = """ type: command short-summary: Wait for an Azure Red Hat OpenShift 3.11 cluster to reach a desired state. -long-summary: If an operation on a cluster was interrupted or was started with `--no-wait`, use this command to wait for it to complete. Support for existing ARO 3.11 clusters ends June 2022. Please see aka.ms/aro/4 for information on switching to ARO 4. +long-summary: The az openshift command is deprecated and has been replaced by az aro for ARO 4 clusters. See http://aka.ms/aro/4 for information on switching to ARO 4. examples: - name: Wait for a cluster to be upgraded, polling every minute for up to thirty minutes. text: |- @@ -1070,13 +1070,13 @@ helps['openshift monitor'] = """ type: group short-summary: Commands to manage Log Analytics monitoring in an ARO 3.11 cluster. -long-summary: Support for existing ARO 3.11 clusters ends June 2022. Please see aka.ms/aro/4 for information on switching to ARO 4. +long-summary: The az openshift command is deprecated and has been replaced by az aro for ARO 4 clusters. See http://aka.ms/aro/4 for information on switching to ARO 4. """ helps['openshift monitor enable'] = """ type: command short-summary: Enable Log Analytics monitoring in an ARO 3.11 cluster. -long-summary: Support for existing ARO 3.11 clusters ends June 2022. Please see aka.ms/aro/4 for information on switching to ARO 4. +long-summary: The az openshift command is deprecated and has been replaced by az aro for ARO 4 clusters. See http://aka.ms/aro/4 for information on switching to ARO 4. examples: - name: Enable Log Analytics monitoring. text: |- @@ -1086,7 +1086,7 @@ helps['openshift monitor disable'] = """ type: command short-summary: Disable Log Analytics monitoring in an ARO 3.11 cluster. -long-summary: Support for existing ARO 3.11 clusters ends June 2022. Please see aka.ms/aro/4 for information on switching to ARO 4. +long-summary: The az openshift command is deprecated and has been replaced by az aro for ARO 4 clusters. See http://aka.ms/aro/4 for information on switching to ARO 4. examples: - name: Disable Log Analytics monitoring. text: |- diff --git a/src/azure-cli/azure/cli/command_modules/acs/custom.py b/src/azure-cli/azure/cli/command_modules/acs/custom.py index 9629a08d978..8cfce5bcf37 100644 --- a/src/azure-cli/azure/cli/command_modules/acs/custom.py +++ b/src/azure-cli/azure/cli/command_modules/acs/custom.py @@ -3963,14 +3963,14 @@ def openshift_create(cmd, client, resource_group_name, name, # pylint: disable= def openshift_show(cmd, client, resource_group_name, name): - logger.warning('Support for existing ARO 3.11 clusters ends June 2022. Please see aka.ms/aro/4 for information on switching to ARO 4.') # pylint: disable=line-too-long + logger.warning('The az openshift command is deprecated and has been replaced by az aro for ARO 4 clusters. See http://aka.ms/aro/4 for information on switching to ARO 4.') # pylint: disable=line-too-long mc = client.get(resource_group_name, name) return _remove_osa_nulls([mc])[0] def openshift_scale(cmd, client, resource_group_name, name, compute_count, no_wait=False): - logger.warning('Support for existing ARO 3.11 clusters ends June 2022. Please see aka.ms/aro/4 for information on switching to ARO 4.') # pylint: disable=line-too-long + logger.warning('The az openshift command is deprecated and has been replaced by az aro for ARO 4 clusters. See http://aka.ms/aro/4 for information on switching to ARO 4.') # pylint: disable=line-too-long instance = client.get(resource_group_name, name) # TODO: change this approach when we support multiple agent pools. @@ -3990,7 +3990,7 @@ def openshift_scale(cmd, client, resource_group_name, name, compute_count, no_wa def openshift_monitor_enable(cmd, client, resource_group_name, name, workspace_id, no_wait=False): - logger.warning('Support for existing ARO 3.11 clusters ends June 2022. Please see aka.ms/aro/4 for information on switching to ARO 4.') # pylint: disable=line-too-long + logger.warning('The az openshift command is deprecated and has been replaced by az aro for ARO 4 clusters. See http://aka.ms/aro/4 for information on switching to ARO 4.') # pylint: disable=line-too-long instance = client.get(resource_group_name, name) workspace_id = _format_workspace_id(workspace_id) @@ -4001,7 +4001,7 @@ def openshift_monitor_enable(cmd, client, resource_group_name, name, workspace_i def openshift_monitor_disable(cmd, client, resource_group_name, name, no_wait=False): - logger.warning('Support for existing ARO 3.11 clusters ends June 2022. Please see aka.ms/aro/4 for information on switching to ARO 4.') # pylint: disable=line-too-long + logger.warning('The az openshift command is deprecated and has been replaced by az aro for ARO 4 clusters. See http://aka.ms/aro/4 for information on switching to ARO 4.') # pylint: disable=line-too-long instance = client.get(resource_group_name, name) monitor_profile = OpenShiftManagedClusterMonitorProfile(enabled=False, workspace_resource_id=None) # pylint: disable=line-too-long From 047203574049aa07aad782d9df066aaae125fab6 Mon Sep 17 00:00:00 2001 From: Feng Zhou <55177366+fengzhou-msft@users.noreply.github.com> Date: Wed, 3 Feb 2021 22:18:00 +0800 Subject: [PATCH 2/2] add deprecate_info --- src/azure-cli/azure/cli/command_modules/acs/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/acs/commands.py b/src/azure-cli/azure/cli/command_modules/acs/commands.py index 16b37e20508..00acc59284a 100644 --- a/src/azure-cli/azure/cli/command_modules/acs/commands.py +++ b/src/azure-cli/azure/cli/command_modules/acs/commands.py @@ -114,7 +114,8 @@ def load_command_table(self, _): # OSA commands with self.command_group('openshift', openshift_managed_clusters_sdk, - client_factory=cf_openshift_managed_clusters) as g: + client_factory=cf_openshift_managed_clusters, + deprecate_info=self.deprecate(redirect='aro', hide=True)) as g: g.custom_command('create', 'openshift_create', supports_no_wait=True) g.command('delete', 'delete', supports_no_wait=True, confirmation=True) g.custom_command('scale', 'openshift_scale', supports_no_wait=True)