From fcb6ce29072caafb7f4f2f5f82af1c14f8e3069f Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Wed, 28 Nov 2018 22:32:34 -0500 Subject: [PATCH] remove a few deprecated `awx-manage` commands --- .../management/commands/deprovision_instance.py | 8 -------- .../management/commands/deprovision_node.py | 17 ----------------- .../management/commands/register_instance.py | 17 ----------------- 3 files changed, 42 deletions(-) delete mode 100644 awx/main/management/commands/deprovision_node.py delete mode 100644 awx/main/management/commands/register_instance.py diff --git a/awx/main/management/commands/deprovision_instance.py b/awx/main/management/commands/deprovision_instance.py index e501f5e2ce..ed9ceefa1e 100644 --- a/awx/main/management/commands/deprovision_instance.py +++ b/awx/main/management/commands/deprovision_instance.py @@ -2,7 +2,6 @@ # All Rights Reserved import subprocess -import warnings from django.db import transaction from django.core.management.base import BaseCommand, CommandError @@ -24,17 +23,10 @@ class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('--hostname', dest='hostname', type=str, help='Hostname used during provisioning') - parser.add_argument('--name', dest='name', type=str, - help='(PENDING DEPRECIATION) Hostname used during provisioning') @transaction.atomic def handle(self, *args, **options): # TODO: remove in 3.3 - if options.get('name'): - warnings.warn("`--name` is depreciated in favor of `--hostname`, and will be removed in release 3.3.") - if options.get('hostname'): - raise CommandError("Cannot accept both --name and --hostname.") - options['hostname'] = options['name'] hostname = options.get('hostname') if not hostname: raise CommandError("--hostname is a required argument") diff --git a/awx/main/management/commands/deprovision_node.py b/awx/main/management/commands/deprovision_node.py deleted file mode 100644 index e5d89d2a5e..0000000000 --- a/awx/main/management/commands/deprovision_node.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2017 Ansible by Red Hat -# All Rights Reserved - -# Borrow from another AWX command -from awx.main.management.commands.deprovision_instance import Command as OtherCommand - -# Python -import warnings - - -class Command(OtherCommand): - - def handle(self, *args, **options): - # TODO: delete this entire file in 3.3 - warnings.warn('This command is replaced with `deprovision_instance` and will ' - 'be removed in release 3.3.') - return super(Command, self).handle(*args, **options) diff --git a/awx/main/management/commands/register_instance.py b/awx/main/management/commands/register_instance.py deleted file mode 100644 index 66aa2344f4..0000000000 --- a/awx/main/management/commands/register_instance.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2017 Ansible by Red Hat -# All Rights Reserved - -# Borrow from another AWX command -from awx.main.management.commands.provision_instance import Command as OtherCommand - -# Python -import warnings - - -class Command(OtherCommand): - - def handle(self, *args, **options): - # TODO: delete this entire file in 3.3 - warnings.warn('This command is replaced with `provision_instance` and will ' - 'be removed in release 3.3.') - return super(Command, self).handle(*args, **options)