Commit Graph
100 Commits
Author SHA1 Message Date
Alan Rominger f7f27e94d1 Merge pull request #6249 from AlanCoding/job_action_serializer
Avoid re-building fields for cancel and relaunch endpoints
2017-05-12 09:37:25 -04:00
AlanCoding 244ebecd16 avoid re-building fields for cancel and relaunch endpoints 2017-05-11 17:11:57 -04:00
Alan Rominger 7a1c6c6794 Merge pull request #6241 from AlanCoding/scm_inv_feedback
SCM inventory acceptance and bug updates
2017-05-11 16:30:26 -04:00
Alan Rominger bdde87f7f5 Merge pull request #6245 from AlanCoding/alan_rockin_ramparts
Introduce view to allow associations but no creations
2017-05-11 14:10:21 -04:00
AlanCoding 14b5ab984b new view to allow associations but no creations 2017-05-11 13:11:11 -04:00
AlanCoding 97ca6bc897 SCM inventory acceptance and bug updates
* fixed a problem where the SCM last revision was not getting reset
* change the 400 editing error to just reset the last revision
* handle `source_vars` in the same way as custom scripts
* block unallowed `source_vars` in the validator
* hide POST in OPTIONS for inventory source sublist if not allowed
2017-05-11 12:04:48 -04:00
Alan Rominger 2b15d04096 Merge pull request #6218 from AlanCoding/scm_inv_cancel
SCM inventory cancel propagation
2017-05-10 15:52:31 -04:00
AlanCoding fc590535be update inventory file list on every project update 2017-05-10 15:34:31 -04:00
AlanCoding 04d6fb1f95 SCM inventory cancel propagation
For manually initiated inventory updates, also cancel the source
project of "sync" type, like jobs do

For automatic inventory updates spawned from source project update,
of launch type "scm", handle contigency cases
2017-05-10 10:28:49 -04:00
Alan Rominger f954507a8c Merge pull request #6186 from AlanCoding/scm_inv_stability
SCM Inventory task system and variables stability edits
2017-05-08 14:31:58 -04:00
AlanCoding 890b5bba58 SCM Inventory task system and variables stability edits
* Ensure "fresh bits" in dependent jobs
  - run IUs in same context and dependent PU
  - review docs for update-on-launch expectations
* Avoid customer variable precedence upgrade issues
  - only allow SCM types to have overwrite_vars=true
  - do not run other cloud sources through the backported script
* Make extra sure to echo stdout and stderr in event of error
2017-05-08 09:43:11 -04:00
Alan Rominger 257dc459cf Merge pull request #6179 from AlanCoding/name_changes
SCM Inventory field name changes
2017-05-04 11:17:21 -04:00
AlanCoding 35ae13f498 fully link up source_project_update to inventory update 2017-05-04 11:08:05 -04:00
AlanCoding d826c45ac6 SCM Inventory field name changes
on InventorySource model
* scm_project -> source_project
on InventorySourceSerializer
* scm_inventories -> scm_inventory_sources

on InventoryUpdate model
* scm_project_update -> source_project_update
2017-05-04 09:15:29 -04:00
Alan Rominger a9c7822a4d Merge pull request #6176 from AlanCoding/inv_src_as
link inventory source activity stream to right place
2017-05-03 17:00:26 -04:00
AlanCoding 4735358857 link inventory source activity stream to right place 2017-05-03 16:31:21 -04:00
Alan Rominger 24a04d56f1 Merge pull request #6135 from AlanCoding/scm_bifurcation
Allow management of 2 types of SCM inventory sources
2017-05-03 16:03:11 -04:00
AlanCoding 3243110496 connect CredentialType to activity stream 2017-05-03 13:53:11 -04:00
AlanCoding 12ab3a0ae9 managed_by_tower restriction now in validation, not access 2017-05-03 13:53:06 -04:00
AlanCoding 8d2598beee allow management of 2 types of SCM inventory sources 2017-05-03 12:18:08 -04:00
Alan Rominger 84b8dcece0 Merge pull request #6120 from AlanCoding/ansible-inventory
Inventory updates through `ansible-inventory`
2017-05-02 16:19:58 -04:00
AlanCoding 2f62182940 refactor inventory Loaders for ansible-inventory
* remove support for loading from executable and static files
* instead use ansible-inventory with fallback to backport
* provide private file dir in task manager for cred injection
* durable management of tmp dirs for user scripts

* new 'scm' source choice for scm-type
* update SCM inventory docs to new reality
2017-05-01 14:37:43 -04:00
AlanCoding a92c7cec7d remove code to parse inventory files 2017-05-01 14:37:42 -04:00
AlanCoding 8e6020436c modularization of inventory_import command
This separates file parsing logic that was mixed
in with other important code inside of the
inventory import command.

The logic around MemObject data structures was
moved to utils, and the file parsing was moved
to a legacy module. As of this commit, that
module can operate within the Tower environment
but it will be removed.

Also refactor the loggers to fix old bug and
work inside of the different contexts - the
Loader classes, mem objects, and hopefully
the inventory modules eventually.
2017-05-01 14:37:42 -04:00
AlanCoding ef01fea89c purge of inventory file syntax testing
* remove use of temporary files in inventory import
* remove old inventory import tests
* remove supporting example inventory files

This type of testing has been migrated to the backport
repository because it will be handled by the inventory module.
From here on out, no inventory syntax testing will be
maintained inside of the Ansible Tower repo.
2017-05-01 14:37:42 -04:00
AlanCoding 2488dabca6 add ansible-inventory backport from upstream
This is a separately maintained repo
https://github.com/ansible/ansible-inventory-backport
tests and compatibility is managed in that location
2017-05-01 14:37:42 -04:00
Alan Rominger dd8f8c169c Merge pull request #6139 from AlanCoding/mock_message_313
mock message obect in callback receiver test
2017-05-01 10:38:28 -04:00
AlanCoding 481df1fcf8 mock message obect in callback receiver test 2017-05-01 10:17:49 -04:00
AlanCoding 0246b6bdcd bump migration versions after 313 merge 2017-04-28 14:40:08 -04:00
Alan Rominger 0e2bf3486a Merge pull request #6123 from AlanCoding/allow_templated_ct
Make Credential Type validator aware of `tower` var
2017-04-28 09:23:51 -04:00
AlanCoding 1169d19f8c Make Credential Type validator aware of "tower" var 2017-04-28 07:56:49 -04:00
Alan Rominger e1a96092fc Merge pull request #6094 from ansible/AlanCoding-patch-2-1
Fix 500 error in ProjectScmInventorySources
2017-04-25 10:10:48 -04:00
Alan Rominger 34b697ce17 Fix 500 error in ProjectScmInventorySources 2017-04-24 16:54:17 -04:00
Alan Rominger 4931bec1be Merge pull request #6056 from AlanCoding/another_v1
Add back group summary_field for v1 InvSrc
2017-04-20 15:49:52 -04:00
AlanCoding d1698ece34 Add back group summary_field for v1 InvSrc 2017-04-20 08:43:56 -04:00
Alan Rominger 498abd6764 Merge pull request #6061 from AlanCoding/new_inv_src_fix
Fix bug that is blocking creating new custom (script-based) inventory sources
2017-04-19 14:20:58 -04:00
AlanCoding a066905997 fix InvSrc validation Organization requirement for new sources 2017-04-19 14:00:19 -04:00
Alan Rominger 31c18f2e16 Merge pull request #6039 from AlanCoding/log_certs
Setting for external logging cert verification
2017-04-17 16:59:33 -04:00
Alan Rominger 1011e54689 Merge pull request #5985 from AlanCoding/scm_inv5
SCM file-based inventory sources
2017-04-17 16:22:24 -04:00
Alan Rominger 6ff6948688 Merge pull request #6043 from AlanCoding/v1_group_fixes
Group V1 serializer fixes from QE feedback
2017-04-17 15:44:35 -04:00
AlanCoding 6d92c56da5 SCM Inventory model, view, and task system changes
Inventory source file-type combined with a linked project
will allow the inventory source to be updated when the
project is updated. The inventory update runs in the
post-run hook of the project update.
2017-04-17 15:01:19 -04:00
AlanCoding 3af0f505d8 Setting for external log emissions cert verification
Stopgap solution for issue for 3.1.3 where Splunk servers with a
self-signed certificate could not receive logs from Tower.
Users should set `LOG_AGGREGATOR_VERIFY_CERT = False` in settings
to use this.
2017-04-17 14:50:01 -04:00
AlanCoding 29de1056e7 Group V1 serializer fixes from QE feedback
Straightforward bug fixes and edits to be more consistent with
the 3.1 v1 API structure
 - remove `inventory_source` as a field from group
 - add inventory source as a group summary field
 - fix user_capabilities bug for group start permission
 - fix 500 error on /inventory_sources/N/update/
2017-04-17 14:43:17 -04:00
Alan Rominger 14a03d2cb5 Merge pull request #6029 from AlanCoding/group_v1
Group serializer special v1 functionality
2017-04-17 11:37:26 -04:00
Alan Rominger 6d17158b34 Merge pull request #5973 from AlanCoding/survey_choices_string
When survey choices are strings, don't just check "X in choices"
2017-04-17 11:05:50 -04:00
AlanCoding 7223177684 Group serializer special v1 functionality
Returns a related `inventory_source` and related link for groups
if accessed from /api/v1/, but not for API v2.
Also inserts corresponding fields to inventory source serializer.
Keep migrated manual sources and auto-create in API v1.
2017-04-17 10:30:07 -04:00
Alan Rominger 7dd69a36d8 Merge pull request #6017 from AlanCoding/supervisor_verbosity
Add supervisorctl logs
2017-04-13 11:07:41 -04:00
Alan Rominger 4c5222b16b Merge pull request #6007 from AlanCoding/inv_src_changelog
Add removal of inventory_source link to CHANGELOG
2017-04-13 10:58:11 -04:00
AlanCoding 6f0a8949a6 Add supervisorctl logs
In some systems, the tower service process may not have sufficient
permissions to communicate with the supervisorctl socket, in which
case an automated restart will not be possible.
2017-04-12 16:46:58 -04:00
Alan Rominger 047672a5b7 Merge pull request #5914 from AlanCoding/ii_tests
Port inventory_import tests to new system
2017-04-12 15:07:56 -04:00
AlanCoding d77c8ec88e add removal of inventory_source link to CHANGELOG 2017-04-12 11:43:50 -04:00
AlanCoding 0aab8b6713 Port basic inventory_import command tests over to new system 2017-04-12 11:16:35 -04:00
Alan Rominger 3c79e5cfe2 Merge pull request #6003 from AlanCoding/inventory_update_update
Update inventory_update to group-less inventory sources
2017-04-12 10:22:40 -04:00
AlanCoding a2ffbafea8 Update inventory_update to group-less inventory sources 2017-04-12 10:10:16 -04:00
Alan Rominger b6eac59aa5 Merge pull request #6004 from ansible/AlanCoding-patch-1
Remove async from logging test kwargs
2017-04-12 09:31:37 -04:00
Alan Rominger f3dd7f7987 Remove async from logging test kwargs 2017-04-12 09:22:50 -04:00
AlanCoding 933bc81dc2 Add bzip2 to Dockerfile yum install line 2017-04-10 08:11:06 -04:00
Alan Rominger e0d6298460 Merge pull request #5977 from AlanCoding/bzip2
Install bzip2 so makefile targets to build frontend work
2017-04-07 15:36:23 -04:00
Alan Rominger f0102ef0ff Merge pull request #5978 from AlanCoding/hide_ev_notification
Hide extra_vars in job notifications
2017-04-07 15:33:34 -04:00
AlanCoding 3e9bc3b3d4 Hide extra_vars in job notifications 2017-04-07 11:49:03 -04:00
AlanCoding 5078ed077a install bzip2 so makefile targets to build frontend work 2017-04-07 11:24:17 -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
Alan Rominger cc476541a1 Merge pull request #5946 from AlanCoding/work_success_except
Handle error of missing jobs in success callback
2017-04-04 13:54:09 -04:00
AlanCoding 33c1de26b5 handle error of missing jobs in success callback 2017-04-03 21:11:54 -04:00
Alan Rominger f3a3a4c1d5 Merge pull request #5941 from AlanCoding/port_not_req
update test to fact that logger port is not required
2017-04-03 12:24:40 -04:00
AlanCoding ec21505fea update test to fact that logger port is not required 2017-04-03 11:56:41 -04:00
Alan Rominger d2795c4784 Merge pull request #5434 from AlanCoding/activity_hygiene
avoid multi-field implicit role activity stream entries
2017-03-24 12:26:32 -04:00
AlanCoding 49faf212ef consolidate RBAC is_implicit_parent code 2017-03-24 09:25:24 -04:00
AlanCoding 169384ddbe Start RBAC unit testing system to test is_implicit_parent 2017-03-23 15:57:50 -04:00
Alan Rominger a5d23e7c80 Merge pull request #5851 from AlanCoding/vars_and_words
Always word the variables parsing error the same way
2017-03-22 18:45:29 -04:00
AlanCoding 99fc0e8264 Use consistent error message when vars are not parsed correctly 2017-03-22 16:37:20 -04:00
AlanCoding bb292f817b move check for implicit parent role into fields.py 2017-03-22 16:30:15 -04:00
AlanCoding b01b12ab2a avoid multi-field implicit role activity stream entries 2017-03-22 15:22:48 -04:00
Alan Rominger 83bc654b15 Merge pull request #5812 from AlanCoding/no_loops_for_hackers
Block loops in querystring filters
2017-03-21 10:50:35 -04:00
AlanCoding 925712e3ec block users from making looping filters which can DoS Tower 2017-03-21 10:16:49 -04:00
AlanCoding 0046421f05 set log formatter message type 2017-03-07 16:48:48 -05:00
Alan Rominger 9e109019fe Merge pull request #5574 from AlanCoding/req_test_dev
In requirements test, skip -e entries from pip freeze
2017-03-01 09:21:43 -05:00
AlanCoding f90ba8e6a6 small refactor of python requirement test to work in dev env 2017-03-01 09:04:31 -05:00
Alan Rominger 8b383e788b Merge pull request #5560 from AlanCoding/dup_related
Avoid duplicated related search fields
2017-02-24 16:55:25 -05:00
AlanCoding 84e2f4d626 avoid duplicated related search fields 2017-02-24 16:49:54 -05:00
Alan Rominger 0bdcfbb33e Merge pull request #5512 from AlanCoding/inv_src_qs
Add InventorySource back into schedule queryset
2017-02-22 17:01:11 -05:00
Alan Rominger 1f0b3876cc Merge pull request #5506 from AlanCoding/no_bad_names
More gutting of related_search_fields in 3.1 scope
2017-02-22 16:52:56 -05:00
AlanCoding d85eda99c6 add back in Inv Src into schedule queryset computation 2017-02-22 15:34:18 -05:00
AlanCoding a69a4de51e prohibit additional items from related_search_fields 2017-02-22 13:32:05 -05:00
Alan Rominger 6039ad15af Merge pull request #5498 from AlanCoding/expire_tasks
Expire certain beat tasks if not ran on schedule
2017-02-21 17:10:26 -05:00
AlanCoding 7c5856cee6 set expiration time for the disposable system tasks 2017-02-21 15:54:18 -05:00
Alan Rominger 711bee9633 Merge pull request #5414 from AlanCoding/manage_context
Disable activity stream in cleanup_jobs, test things
2017-02-21 12:20:34 -05:00
AlanCoding 0bd606e26f remove unnecessary imports after context manager change 2017-02-21 12:08:03 -05:00
Alan Rominger c9e3fc3601 Merge pull request #5445 from AlanCoding/sub_ct_from_cache
Allow UJT content type list to come from manager cache
2017-02-21 10:33:21 -05:00
Alan Rominger 95e1caed56 Merge pull request #5443 from AlanCoding/vars_disp
Prevent server error in /variables/ endpoint
2017-02-20 22:29:08 -05:00
Alan Rominger 7d49d048e7 Merge pull request #5429 from AlanCoding/m2m_types
Integer (or generic ForeignKey) coercion for m2m filters
2017-02-20 22:25:57 -05:00
Alan Rominger 2b0f327523 Merge pull request #5458 from AlanCoding/migration_version
add method to obtain the migration state of Tower
2017-02-20 17:14:08 -05:00
AlanCoding a57d8fe9fd treat GFJ and FJ and M2M all the same for type in querystring 2017-02-20 17:11:08 -05:00
AlanCoding 87af8f7a38 add method to obtain the migration state of Tower 2017-02-20 13:17:21 -05:00
Alan Rominger 928d160f3d Merge pull request #5439 from AlanCoding/sys_aud_NT
block system auditors from attaching notification templates
2017-02-20 11:32:50 -05:00
AlanCoding 757982088c allow UJT content type list to come from cache 2017-02-17 22:08:18 -05:00
AlanCoding 1386fdeb1a prevent server error in /variables/ endpoint 2017-02-17 16:57:13 -05:00
AlanCoding 6d961d92c9 block system auditors from attaching notification templates 2017-02-17 16:17:07 -05:00
AlanCoding d8d874d964 treat m2m fields as FK in filter python coercion 2017-02-17 11:06:29 -05:00
Alan Rominger 68fc75070d Merge pull request #5348 from AlanCoding/dual_jt_count
Update organization counts to correspond with UI lists
2017-02-17 10:13:10 -05:00