mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Merge pull request #621 from wwitzel3/devel
Fix mgmt cmds, use real types not strings
This commit is contained in:
commit
2fb74f5b02
@ -21,7 +21,7 @@ class Command(BaseCommand):
|
||||
help = 'Remove old activity stream events from the database'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('--days', dest='days', type='int', default=90, metavar='N',
|
||||
parser.add_argument('--days', dest='days', type=int, default=90, metavar='N',
|
||||
help='Remove activity stream events more than N days old')
|
||||
parser.add_argument('--dry-run', dest='dry_run', action='store_true',
|
||||
default=False, help='Dry run mode (show items that would '
|
||||
|
@ -32,7 +32,7 @@ class Command(BaseCommand):
|
||||
help = 'Remove old jobs, project and inventory updates from the database.'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('--days', dest='days', type='int', default=90, metavar='N',
|
||||
parser.add_argument('--days', dest='days', type=int, default=90, metavar='N',
|
||||
help='Remove jobs/updates executed more than N days ago. Defaults to 90.')
|
||||
parser.add_argument('--dry-run', dest='dry_run', action='store_true',
|
||||
default=False, help='Dry run mode (show items that would '
|
||||
|
@ -260,9 +260,9 @@ class Command(BaseCommand):
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('--inventory-name', dest='inventory_name',
|
||||
type='str', default=None, metavar='n',
|
||||
type=str, default=None, metavar='n',
|
||||
help='name of inventory to sync')
|
||||
parser.add_argument('--inventory-id', dest='inventory_id', type='int',
|
||||
parser.add_argument('--inventory-id', dest='inventory_id', type=int,
|
||||
default=None, metavar='i',
|
||||
help='id of inventory to sync')
|
||||
parser.add_argument('--overwrite', dest='overwrite', action='store_true',
|
||||
@ -277,27 +277,27 @@ class Command(BaseCommand):
|
||||
parser.add_argument('--custom', dest='custom', action='store_true',
|
||||
metavar="c", default=False,
|
||||
help='this is a custom inventory script')
|
||||
parser.add_argument('--source', dest='source', type='str', default=None,
|
||||
parser.add_argument('--source', dest='source', type=str, default=None,
|
||||
metavar='s', help='inventory directory, file, or script to load')
|
||||
parser.add_argument('--enabled-var', dest='enabled_var', type='str',
|
||||
parser.add_argument('--enabled-var', dest='enabled_var', type=str,
|
||||
default=None, metavar='v', help='host variable used to '
|
||||
'set/clear enabled flag when host is online/offline, may '
|
||||
'be specified as "foo.bar" to traverse nested dicts.')
|
||||
parser.add_argument('--enabled-value', dest='enabled_value', type='str',
|
||||
parser.add_argument('--enabled-value', dest='enabled_value', type=str,
|
||||
default=None, metavar='v', help='value of host variable '
|
||||
'specified by --enabled-var that indicates host is '
|
||||
'enabled/online.')
|
||||
parser.add_argument('--group-filter', dest='group_filter', type='str',
|
||||
parser.add_argument('--group-filter', dest='group_filter', type=str,
|
||||
default=None, metavar='regex', help='regular expression '
|
||||
'to filter group name(s); only matches are imported.')
|
||||
parser.add_argument('--host-filter', dest='host_filter', type='str',
|
||||
parser.add_argument('--host-filter', dest='host_filter', type=str,
|
||||
default=None, metavar='regex', help='regular expression '
|
||||
'to filter host name(s); only matches are imported.')
|
||||
parser.add_argument('--exclude-empty-groups', dest='exclude_empty_groups',
|
||||
action='store_true', default=False, help='when set, '
|
||||
'exclude all groups that have no child groups, hosts, or '
|
||||
'variables.')
|
||||
parser.add_argument('--instance-id-var', dest='instance_id_var', type='str',
|
||||
parser.add_argument('--instance-id-var', dest='instance_id_var', type=str,
|
||||
default=None, metavar='v', help='host variable that '
|
||||
'specifies the unique, immutable instance ID, may be '
|
||||
'specified as "foo.bar" to traverse nested dicts.')
|
||||
|
@ -166,9 +166,9 @@ class Command(BaseCommand):
|
||||
help = 'Replay job events over websockets ordered by created on date.'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('--job_id', dest='job_id', type='int', metavar='j',
|
||||
parser.add_argument('--job_id', dest='job_id', type=int, metavar='j',
|
||||
help='Id of the job to replay (job or adhoc)')
|
||||
parser.add_argument('--speed', dest='speed', type='int', metavar='s',
|
||||
parser.add_argument('--speed', dest='speed', type=int, metavar='s',
|
||||
help='Speedup factor.')
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
@ -19,7 +19,7 @@ class Command(BaseCommand):
|
||||
parser.add_argument('--stat',
|
||||
action='store',
|
||||
dest='stat',
|
||||
type="string",
|
||||
type=str,
|
||||
default="jobs_running",
|
||||
help='Select which stat to get information for')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user