Update management commands

This commit is contained in:
Wayne Witzel III
2017-11-09 17:18:18 -05:00
parent 8faf588775
commit de376292ba
15 changed files with 155 additions and 185 deletions

View File

@@ -5,7 +5,6 @@ from awx.main.models import Instance
from awx.main.utils.pglock import advisory_lock
from django.conf import settings
from optparse import make_option
from django.db import transaction
from django.core.management.base import BaseCommand, CommandError
@@ -21,10 +20,9 @@ class Command(BaseCommand):
'Specify `--hostname` to use this command.'
)
option_list = BaseCommand.option_list + (
make_option('--hostname', dest='hostname', type='string',
help='Hostname used during provisioning'),
)
def add_arguments(self, parser):
parser.add_argument('--hostname', dest='hostname', type=str,
help='Hostname used during provisioning')
def _register_hostname(self, hostname):
if not hostname: