mirror of
https://github.com/ansible/awx.git
synced 2026-03-17 08:57:33 -02:30
remove char_prompts and survey password from bulk job
fix the api-lint fix the api-lint add the descrition to the bulk job launch module params add the description for the description field add the description for the description field add docs for the bulk api fix the models on the bulk api serializers fix some of the issues highlighted in the code review better use of role model remove comments better error message revert the PrimaryKeyRelatedField for unified_job_template and inventory
This commit is contained in:
@@ -31,8 +31,9 @@ options:
|
||||
type: str
|
||||
require: True
|
||||
description:
|
||||
- The description to use for the host.
|
||||
type: str
|
||||
description:
|
||||
- The description to use for the host.
|
||||
type: str
|
||||
enabled:
|
||||
description:
|
||||
- If the host should be enabled.
|
||||
|
||||
@@ -200,7 +200,6 @@ EXAMPLES = '''
|
||||
'''
|
||||
|
||||
from ..module_utils.controller_api import ControllerAPIModule
|
||||
import json
|
||||
|
||||
|
||||
def main():
|
||||
@@ -208,6 +207,7 @@ def main():
|
||||
argument_spec = dict(
|
||||
jobs=dict(required=True, type='list'),
|
||||
name=dict(),
|
||||
description=dict(),
|
||||
organization=dict(type='int'),
|
||||
inventory=dict(type='int'),
|
||||
limit=dict(),
|
||||
@@ -226,6 +226,7 @@ def main():
|
||||
post_data_names = (
|
||||
'jobs',
|
||||
'name',
|
||||
'description',
|
||||
'organization',
|
||||
'inventory',
|
||||
'limit',
|
||||
|
||||
@@ -9,7 +9,7 @@ from awx.main.models import WorkflowJob
|
||||
@pytest.mark.django_db
|
||||
def test_bulk_job_launch(run_module, admin_user, job_template):
|
||||
jobs = [dict(unified_job_template=job_template.id)]
|
||||
result = run_module(
|
||||
run_module(
|
||||
'bulk_job_launch',
|
||||
{
|
||||
'name': "foo-bulk-job",
|
||||
@@ -29,7 +29,7 @@ def test_bulk_job_launch(run_module, admin_user, job_template):
|
||||
@pytest.mark.django_db
|
||||
def test_bulk_host_create(run_module, admin_user, inventory):
|
||||
hosts = [dict(name="127.0.0.1"), dict(name="foo.dns.org")]
|
||||
result = run_module(
|
||||
run_module(
|
||||
'bulk_host_create',
|
||||
{
|
||||
'inventory': inventory.id,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- name: Generate a unique name
|
||||
set_fact:
|
||||
bulk_host_name: "AWX-Collection-tests-bulk_host_create-{{ test_id }}"
|
||||
|
||||
|
||||
- name: Get our collection package
|
||||
controller_meta:
|
||||
register: controller_meta
|
||||
@@ -23,7 +23,7 @@
|
||||
organization: Default
|
||||
state: present
|
||||
register: inventory_result
|
||||
|
||||
|
||||
|
||||
- name: Bulk Host Create
|
||||
bulk_host_create:
|
||||
@@ -48,4 +48,4 @@
|
||||
inventory:
|
||||
name: "{{ bulk_host_name }}"
|
||||
organization: Default
|
||||
state: absent
|
||||
state: absent
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- name: Generate a unique name
|
||||
set_fact:
|
||||
bulk_job_name: "AWX-Collection-tests-bulk_job_launch-{{ test_id }}"
|
||||
|
||||
|
||||
- name: Get our collection package
|
||||
controller_meta:
|
||||
register: controller_meta
|
||||
@@ -66,4 +66,4 @@
|
||||
- name: Delete Job Template
|
||||
job_template:
|
||||
name: "{{ bulk_job_name }}"
|
||||
state: absent
|
||||
state: absent
|
||||
|
||||
Reference in New Issue
Block a user