Commit Graph

52 Commits

Author SHA1 Message Date
beeankha
7764f1c1a5 Fix inv source org lookup, adjust unit tests (since org is now required for inv source module), update README, edit typos in test-related README 2020-09-04 10:19:56 -04:00
beeankha
479ab8550d Fix misc. linter errors 2020-05-14 15:43:50 -04:00
Christian Adams
a899a147e1 Fix new flake8 from pyflakes 2.2.0 release 2020-04-20 09:50:50 -04:00
Jeff Bradberry
82a0dc0024 Cycle or unset the webhook key if the webhook service changes
Also, tests.
2019-09-30 13:26:03 -04:00
beeankha
6e9f74eb17 Updating tests, changing 'method' to 'http_method' 2019-07-23 11:47:19 -04:00
Ryan Petrello
6da445f7c0 remove /api/v1 and deprecated credential fields 2019-06-06 12:23:00 -04:00
Ryan Petrello
daeeaf413a clean up unnecessary usage of the six library (awx only supports py3) 2019-01-25 00:19:48 -05:00
Ryan Petrello
f223df303f convert py2 -> py3 2019-01-15 14:09:01 -05:00
cclauss
c371b869dc basestring to six.string_types for Python 3 2018-02-09 16:28:36 +01:00
Matthew Jones
d9e774c4b6 Updates for automatic triggering of policies
* Switch policy router queue to not be "tower" so that we don't
  fall into a chicken/egg scenario
* Show fixed policy list in serializer so a user can determine if
  an instance is manually managed
* Change IG membership mixin to not directly handle applying topology
  changes. Instead it just makes sure the policy instance list is
  accurate
* Add create/delete hooks for instances and groups to trigger policy
  re-evaluation
* Update policy algorithm for fairer distribution
* Fix an issue where CELERY_ROUTES wasn't renamed after celery/django
  upgrade
* Update unit tests to be more explicit
* Update count calculations used by algorithm to only consider
  non-manual instances
* Adding unit tests and fixture
* Don't propagate logging messages from awx.main.tasks and
  awx.main.scheduler
* Use advisory lock to prevent policy eval conflicts
* Allow updating instance groups from view
2018-02-01 16:56:16 -05:00
Ryan Petrello
28ce9b700e replace all Job/JT relations with a single M2M credentials relation
Includes backwards compatibility for now-deprecated .credential,
.vault_credential, and .extra_credentials

This is a building block for multi-vault implementation and Alan's saved
launch configurations (both coming soon)

see: https://github.com/ansible/awx/issues/352
see: https://github.com/ansible/awx/issues/169
2017-11-14 12:49:12 -05:00
Chris Meyers
1d0e125aad make password survey field behave like text field
related to https://github.com/ansible/ansible-tower/issues/6083
2017-07-27 12:57:31 -04:00
Matthew Jones
1a4a6273a4 Merge branch 'rampart_groups_setup_playbook' into devel
* rampart_groups_setup_playbook:
  Updating changelog for Instance Groups
  Fix an incorrect reference on instance group jobs list
  Purge remaining references to rampart groups
  Simplify can_access for instance groups on job templates
  Adding Instance Group permissions and tests
  Increase test coverage for task scheduler inventory updates
  Exit logic fixes for instance group tools
  View Fixes for instance groups
  new view to allow associations but no creations
  Updating acceptance documentation and system docs
  Updating unit tests for task manager refactoring
  Update views and serializers to support instance group (ramparts)
  Implementing models for instance groups, updating task manager
  Updating the setup playbook to support instance group installation
  Add nginx to server start and switch back to first tmux win
  Fix an issue where the local queue wouldn't use the rabbitmq name
2017-05-12 13:40:30 -04:00
Matthew Jones
5508bad97c Updating unit tests for task manager refactoring
* Purging old task manager unit tests
* Migrating those tests to functional tests
* Updating fixtures and factories to support a change in the way the
  task manager is tested
* Fix an issue with the mk_credential fixture when used in functional
  tests. Previously it had trouble with multiplel invocations when
  persistence was used
2017-05-10 12:45:37 -04:00
Ryan Petrello
d0a848d49a Add a new extra_credentials endpoint for Jobs and JobTemplates
additionally, add backwards compatible support for `cloud_credential`
and `network_credential` in /api/v1/job_templates/ and /api/v1/jobs/.

see: #5807
2017-05-03 13:38:10 -04:00
Matthew Jones
e1e83598e9 Merge branch 'release_3.1.3' into devel
* release_3.1.3: (52 commits)
  ack fact scan messages
  making ldap user/group search fields into codemirror instances
  removing UI parsing for LDAP User and Group Search fields
  Allow exception view to accept all valid HTTP methods.
  Restore ability of parsing extra_vars string for provisioning callback.
  Fix up backup/restore role broken in f7a8e45809758322d9ee41c5305850dd70ed5faf
  Stop / start ansible-tower-service during restores
  value_to_python should encode lookup fields as ascii
  fix brace interpolation on standard out pane
  Adjust some hardcoded usages of 'awx' to use 'aw_user' and 'aw_group'.
  Pull Spanish updates from Zanata
  Temporarily grant awx user createdb role
  Stop giving ownership of backups to postgres
  don't display chunked lines'
  Add dropdown li truncation with ellipsis
  CTiT -> adhoc modules should allow the user to add new modules
  Remove task that was replacing the supervisor systemd tmp file
  Fix failing supervisorctl commands on RH-based distros
  Give ownership of the supervisor socket to awx
  Setting for external log emissions cert verification
  ...
2017-04-28 13:57:04 -04:00
Ryan Petrello
ba259e0ad4 Introduce a new CredentialTemplate model
Credentials now have a required CredentialType, which defines inputs
(i.e., username, password) and injectors (i.e., assign the username to
SOME_ENV_VARIABLE at job runtime)

This commit only implements the model changes necessary to support the
new inputs model, and includes code for the credential serializer that
allows backwards-compatible support for /api/v1/credentials/; tasks.py
still needs to be updated to actually respect CredentialType injectors.

This change *will* break the UI for credentials (because it needs to be
updated to use the new v2 endpoint).

see: #5877
see: #5876
see: #5805
2017-04-21 15:42:26 -04:00
AlanCoding
b9c45ed54a Fix bug where API assumed survey choices were list
Applies to both single-select and multi-select type questions.
UI sends choices in the form of text with line breaks
separating the options.
Customer complained about empty string erronously sent by
the UI being passed to playbook, which is a component of this.
2017-04-07 09:03:45 -04:00
AlanCoding
8cd4ba0175 refactor of create_unified_job in connection with new copy endpoint development 2016-11-22 11:35:41 -05:00
AlanCoding
14ce50c845 implement copying of WFJT objects 2016-11-22 11:35:01 -05:00
Matthew Jones
cb82809f10 Merge pull request #3935 from jladdjr/at-3532-typo
Minor typo fix (pointing workflow node template at unsupported unified job template)
2016-11-18 15:45:34 -05:00
Aaron Tan
9e4655419e Fix flake8 E302 errors. 2016-11-15 20:59:39 -05:00
Jim Ladd
20840b9867 Fix all instances of can not 2016-11-09 17:03:25 -05:00
AlanCoding
3b4b1412fc fix tests for project playbook mocking 2016-10-24 21:04:01 -04:00
AlanCoding
9acd50b8f3 inject WF node prompts into new jobs, new workflow RBAC tests 2016-09-21 16:04:43 -04:00
Chris Church
b7a6aa01a3 Fixes to get flake8 and unit/functional tests passing. 2016-09-18 19:11:29 -04:00
Chris Meyers
32461574ae add unit tests 2016-09-13 15:24:20 -04:00
Chris Meyers
4dc5c33442 refactor to be more testable 2016-09-12 12:19:36 -04:00
Chris Meyers
e4025a7eff flake8 fixes 2016-09-08 14:26:30 -04:00
Chris Meyers
39ac2c047b launch workflows 2016-09-01 14:11:20 -04:00
Chris Meyers
4c876b40e4 initial models and endpoints added for workflows 2016-08-30 15:05:28 -04:00
AlanCoding
ffc0b05a80 fix non-sensitive change becoming sensitive, add network cred in JT can_change 2016-06-14 12:20:02 -04:00
AlanCoding
a431f16953 job template creation to require use_role, include network creds 2016-06-10 10:58:27 -04:00
AlanCoding
04b8eb4eaf add mk_job to factories, use with survey passwords 2016-06-08 13:43:19 -04:00
Wayne Witzel III
8f3c0ff884 refactoring survey spec tests and fixtures 2016-06-06 13:39:25 -04:00
AlanCoding
53327dea2b Bug fixes related to survey corner cases and survey test refactor 2016-06-02 08:58:59 -04:00
Wayne Witzel III
7395e07221 Merge pull request #2068 from wwitzel3/issue_3.0_1990
Fix ActivityStream when object2 is a role.
2016-05-27 15:45:53 -04:00
Wayne Witzel III
e6c76d0941 fixup objects creation helpers 2016-05-26 15:45:14 -04:00
Wayne Witzel III
2e0686a173 tests for object2 type when it is a role 2016-05-26 15:45:12 -04:00
Akita Noek
e531bc67e4 Better control what JT admins are allowed to do
This addresses #1981 which says that JT admins can make modifications to
a job template freely if they're just changing non functional things
like name, description, forks, verbosity, etc, while requiring them to
have access to all functional components if they're going to make any
changes to the functionality - in specific, any changes to the
inventory, project, playbook, or credentials requires that the user have
the appropriate use access on all of those things in order to make the
change.
2016-05-26 14:39:16 -04:00
Wayne Witzel III
b8865c3749 make arguments to mk_ methods explicit 2016-05-26 11:02:09 -04:00
Wayne Witzel III
ec505f3f60 adjusting test and renaming helper 2016-05-26 11:02:07 -04:00
Wayne Witzel III
a6e97626ba README updates 2016-05-26 11:02:05 -04:00
Wayne Witzel III
2052f93792 fixing function calls and None handling 2016-05-26 11:02:02 -04:00
Wayne Witzel III
c514cd44c3 restructure factories/fixtures and fix tests 2016-05-26 11:01:58 -04:00
Wayne Witzel III
fa010c2228 fix mk_label method 2016-05-26 11:01:57 -04:00
Wayne Witzel III
aaabc2582d refactored roles handling and added some more tests 2016-05-26 11:01:55 -04:00
Wayne Witzel III
4453e48729 updated factories docs 2016-05-26 11:01:53 -04:00
Wayne Witzel III
73e41ef6cc flake8 fixes 2016-05-26 11:01:52 -04:00
Wayne Witzel III
7ab385524d added roles support for organization_factory 2016-05-26 11:01:46 -04:00