Commit Graph

252 Commits

Author SHA1 Message Date
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
Aaron Tan
c2d26c918a Allow DRF parser to accept trailing commas. 2017-04-27 16:16:05 -04:00
Aaron Tan
dd3e373c34 Merge pull request #6095 from jangsutsr/6066_allow_exception_view_to_accept_all_valid_http_methods
Allow exception view to accept all valid HTTP methods.
2017-04-25 15:11:14 -04:00
Aaron Tan
381b47201b Allow exception view to accept all valid HTTP methods. 2017-04-25 13:35:21 -04:00
Aaron Tan
8d2ee8c30f Refactor log handler and support TCP/UDP communications 2017-04-25 11:07:57 -04:00
Chris Meyers
1f99a0df85 Merge pull request #6098 from chrismeyersfsu/fix-facts_query_performance
coarse json queries to use gin index
2017-04-25 10:58:09 -04:00
Chris Meyers
d69ae2cc92 coarse json queries to use gin index 2017-04-25 10:21:22 -04:00
Aaron Tan
3a81ca0dce Restore ability of parsing extra_vars string for provisioning callback. 2017-04-24 17:43:20 -04:00
Ryan Petrello
aff25c914e blacklist special env vars from being used in CredentialType injectors
see: #5877
2017-04-24 15:03:50 -04:00
Ryan Petrello
a36a53fe40 implement CredentialType env, file, and extra_vars injectors
see: #5877
2017-04-24 15:03:33 -04:00
Ryan Petrello
3067435799 add additional test coverage for tasks.py credential usage 2017-04-21 15:42:27 -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
Wayne Witzel III
c058f76960 value_to_python should encode lookup fields as ascii 2017-04-20 13:22:54 -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
Chris Meyers
5ff4966526 add json a=null support and still support a="null"
related to #6016
2017-04-13 16:26:35 -04:00
Chris Meyers
040f9dd545 support > 2 sequential and, also or
* Fixed a bug in the fact search language parser where it would not loop
over all the <and, or> operations. The result, we can support (a=b or
a=c or a=d) also support (a=b and b=b and c=b)
2017-04-13 13:36:38 -04:00
Chris Meyers
23ce5ab9de fix up test 2017-04-13 10:44:28 -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
Chris Meyers
1a2cbaf5e1 flake8 fix 2017-04-12 15:35:42 -04:00
Chris Meyers
a2b37aa7e6 add not logic to json search
* Also fix up single contains [] logic. Values with a single contains
should be wrapped in [] and not, like I thought before, \"\"
2017-04-12 15:11:36 -04:00
Chris Meyers
817ca503e8 Merge pull request #6002 from chrismeyersfsu/fix-5984
lock projects on project sync
2017-04-12 13:25:51 -04:00
Chris Meyers
d1eba4b607 log lock errors and test it 2017-04-12 11:41:11 -04:00
AlanCoding
0aab8b6713 Port basic inventory_import command tests over to new system 2017-04-12 11:16:35 -04:00
Matthew Jones
b1c839ea62 Refactor service reloading unit tests
Make sure these are consistent with the more flexible utility commands
2017-04-10 15:37:45 -04:00
Chris Meyers
a4fe04cbfa handle unicode and types 2017-04-10 14:57:37 -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
Chris Meyers
02795e526c inherit from jsonbfield package not jsonfield
* jsonbfield supports json querying. jsonfield package is still a jsonb
postgres data type, but doesn't support jsonb style querying.
* add undo migration support to GIN index
2017-04-05 13:49:51 -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
Chris Meyers
6cbdb8d0e6 faster first time parse generator
* Generating the set of valid unicode characters is expensive in terms
of memory storage. Instead, we define the grammer by the negation of
allowed unicode characters. Much faster.
2017-04-03 15:32:21 -04:00
Chris Meyers
a8213661fd basic fact search grammar
* Establish a base grammar for handling json path specification and
value matching. With boolean logic support and parenthesis grouping
i.e. (a.b.c="value") and ((a.b="foo") or (a="bar"))
* generate Q() results for passing to Host.objects.filter()
* Hooked up via /api/v1/hosts?host_filter=...
* DynamicFilterField added to store host filter as string with grammar
parser attached as static methods for later use by DynamicInventory &
continued use by host_filter=...
2017-04-03 15:32:21 -04:00
Ryan Petrello
3d378fb0b2 Merge pull request #5929 from ryanpetrello/api_v2
add API versioning for /api/v2/
2017-03-31 13:38:00 -04:00
Matthew Jones
1c8bc62e38 Merge branch 'release_3.1.2' into devel
* release_3.1.2: (33 commits)
  updating changelog for 3.1.2
  Add back SRC_ONLY_PKGS
  Fix ubuntu 14 restart service list pt 2
  Make sure the insight playbook fetch doesn't quote user and pass
  Add requirements/vendor to gitignore
  Conditionally install from local python dependencies in spec file
  Remove requirements/vendor on make clean.
  Update brew-srpm target to generate local requirements files
  Get offline pip installs working
  Add clean-dist target
  Navigate back to the jobDetails state when the user clicks outside the host event modal.
  Don't use jinja quote filter on insights username or password
  fix legacy standard out
  Fixed permissions typo
  add test, restore old behavior in api test
  create _survey_element_validation and use it for updating extra_vars
  Do not set the default if the field was not passed in to kwargs_extra_vars
  Remove log aggregator port required mark.
  Modify according to review feedback.
  Host Event json should be read-only
  ...
2017-03-31 10:36:02 -04:00
Ryan Petrello
95ea370e5e add API versioning for /api/v2/ 2017-03-30 15:11:12 -04:00
Wayne Witzel III
e750f1a01c Merge pull request #5892 from wwitzel3/release_3.1.2
Do not set the default if field was not passed in to kwargs_extra_vars.
2017-03-27 09:50:35 -04:00
Wayne Witzel III
45c3a389d4 add test, restore old behavior in api test 2017-03-27 09:39:21 -04:00
Aaron Tan
07e7e4cfd0 Modify according to review feedback. 2017-03-24 11:35:45 -04:00
AlanCoding
169384ddbe Start RBAC unit testing system to test is_implicit_parent 2017-03-23 15:57:50 -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
Ryan Petrello
a69dfced74 Merge remote-tracking branch 'origin/release_3.1.2' into devel 2017-03-21 10:39:16 -04:00
AlanCoding
925712e3ec block users from making looping filters which can DoS Tower 2017-03-21 10:16:49 -04:00
Aaron Tan
fe78d86c4a Merge pull request #5747 from jangsutsr/5728_handle_can_start_without_user_input_cornercase
Handle can_start_without_user_input cornercase
2017-03-20 13:03:22 -04:00
Aaron Tan
90bcc3d6ab Unit test added. 2017-03-16 11:08:19 -04:00
Ryan Petrello
98ad2684d3 when async log shipping fails, log an explanation 2017-03-15 17:23:44 -04:00
Ryan Petrello
b3733d233e always use async http logging - even in celery workers
additionally, add a timeout to requests to avoid thread starvation

see: #5718
see: #5729
2017-03-15 13:17:01 -04:00
Chris Meyers
33dca18119 more tests 2017-03-13 15:05:33 -04:00
Chris Meyers
a051b41773 add test 2017-03-13 14:45:20 -04:00
Ryan Petrello
bad9670a0b Merge remote-tracking branch 'origin/release_3.1.2' into devel 2017-03-10 10:57:03 -05:00
Ryan Petrello
8c1de7f109 add an API endpoint for testing external log aggregrator connectivity
see: #5164
2017-03-09 13:19:56 -05:00
Wayne Witzel III
27fc64eb56 value_to_python should encode lookup fields as ascii 2017-03-08 12:30:30 -05:00