Commit Graph

90 Commits

Author SHA1 Message Date
Chris Church
6ebe45b1bd Configure Tower in Tower:
* Add separate Django app for configuration: awx.conf.
* Migrate from existing main.TowerSettings model to conf.Setting.
* Add settings wrapper to allow get/set/del via django.conf.settings.
* Update existing references to tower_settings to use django.conf.settings.
* Add a settings registry to allow for each Django app to register configurable settings.
* Support setting validation and conversion using Django REST Framework fields.
* Add /api/v1/settings/ to display a list of setting categories.
* Add /api/v1/settings/<slug>/ to display all settings in a category as a single object.
* Allow PUT/PATCH to update setting singleton, DELETE to reset to defaults.
* Add "all" category to display all settings across categories.
* Add "changed" category to display only settings configured in the database.
* Support per-user settings via "user" category (/api/v1/settings/user/).
* Support defaults for user settings via "user-defaults" category (/api/v1/settings/user-defaults/).
* Update serializer metadata to support category, category_slug and placeholder on OPTIONS responses.
* Update serializer metadata to handle child fields of a list/dict.
* Hide raw data form in browsable API for OPTIONS and DELETE.
* Combine existing licensing code into single "TaskEnhancer" class.
* Move license helper functions from awx.api.license into awx.conf.license.
* Update /api/v1/config/ to read/verify/update license using TaskEnhancer and settings wrapper.
* Add support for caching settings accessed via settings wrapper.
* Invalidate cached settings when Setting model changes or is deleted.
* Preload all database settings into cache on first access via settings wrapper.
* Add support for read-only settings than can update their value depending on other settings.
* Use setting_changed signal whenever a setting changes.
* Register configurable authentication, jobs, system and ui settings.
* Register configurable LDAP, RADIUS and social auth settings.
* Add custom fields and validators for URL, LDAP, RADIUS and social auth settings.
* Rewrite existing validator for Credential ssh_private_key to support validating private keys, certs or combinations of both.
* Get all unit/functional tests working with above changes.
* Add "migrate_to_database_settings" command to determine settings to be migrated into the database and comment them out when set in Python settings files.
* Add support for migrating license key from file to database.
* Remove database-configuable settings from local_settings.py example files.
* Update setup role to no longer install files for database-configurable settings.

f 94ff6ee More settings work.
f af4c4e0 Even more db settings stuff.
f 96ea9c0 More settings, attempt at singleton serializer for settings.
f 937c760 More work on singleton/category views in API, add code to comment out settings in Python files, work on command to migrate settings to database.
f 425b0d3 Minor fixes for sprint demo.
f ea402a4 Add support for read-only settings, cleanup license engine, get license support working with DB settings.
f ec289e4 Rename migration, minor fixmes, update setup role.
f 603640b Rewrite key/cert validator, finish adding social auth fields, hook up signals for setting_changed, use None to imply a setting is not set.
f 67d1b5a Get functional/unit tests passing.
f 2919b62 Flake8 fixes.
f e62f421 Add redbaron to requirements, get file to database migration working (except for license).
f c564508 Add support for migrating license file.
f 982f767 Add support for regex in social map fields.
2016-09-26 22:14:47 -04:00
AlanCoding
7ff5c40564 Merge branch 'devel' of https://github.com/ansible/ansible-tower into can_CRUD 2016-09-15 17:19:38 -04:00
AlanCoding
d77dc271d8 copy/edit display test refactor, copy prefetch added 2016-09-09 15:13:48 -04:00
AlanCoding
507ba6a778 add new case in prefetch method for foreign-key roles 2016-09-08 15:03:55 -04:00
Matthew Jones
0c1e1fa2fb Refactor Tower HA Instance logic and models
* Gut the HA middleware
* Purge concept of primary and secondary.
* UUID is not the primary host identifier, now it's based mostly on the
  username.  Some work probably still left to do to make sure this is
  legit.  Also removed unique constraint from the uuid field.  This
  might become the cluster ident now... or it may just deprecate
* No more secondary -> primary redirection
* Initial revision of /api/v1/ping
* Revise and gut tower-manage register_instance
* Rename awx/main/socket.py to awx/main/socket_queue.py to prevent
  conflict with the "socket" module from python base
* Revist/gut the Instance manager... not sure if this manager is really
  needed anymore
2016-09-08 13:37:53 -04:00
AlanCoding
9da00c2d38 RBAC copy/edit displays test refactor 2016-09-07 17:08:07 -04:00
AlanCoding
1ca7ce1bd4 JT OPTIONS based on RBAC, refactoring toward combinational prefetching 2016-09-02 17:07:42 -04:00
AlanCoding
0406431337 refactor step 2, move cacher to utils, generics ListView 2016-09-01 17:20:58 -04:00
Chris Church
891e06d6ef Add config for using Redis as cache, add memoize function to store results in cache. 2016-08-08 11:58:54 -04:00
Akita Noek
b57739a800 Converted except T,e expressions to except T as e 2016-06-27 15:12:37 -04:00
Matthew Jones
6f79ec8830 Revert "Merge pull request #1534 from chrismeyersfsu/fix-config_performance"
This reverts commit 7cc144fa59f157a5e1789a913e0d9a31720141ec, reversing
changes made to 86af9950e754b06f40cb293a36ab365f589273db.
2016-04-14 11:40:07 -04:00
Chris Meyers
043f97fe35 fixes config endpoint performance issue 2016-04-13 17:28:38 -04:00
Akita Noek
7d2e660749 Make use of 'current' apps so RBAC ImplicitRoleField can work during migrations
While a migration is taking place, we can't juse use normal model
references like Role and RolePermission, nor can we use generic foreign
keys without manually referring to the content type and object id
fields.
2016-04-12 11:40:17 -04:00
Akita Noek
6182dad0d4 Added activity stream events for User
Completes development for #1087
2016-04-11 17:03:04 -04:00
Graham Mainwaring
a6acb5181a Merge pull request #1417 from ansible/python27_el6
EL6 Python 2.7 and Tower virtualenvs
2016-04-06 10:57:18 -04:00
Matthew Jones
46bbc83d0d Changes for Tower virtualenv support
* Break requirements down into ansible and tower reqs
* Generate separate Ansible and Tower virtual environments
* Install appropriate requirements files into each one
* Modify development tools to use these venvs instead of our old
  site-packages
* Modify settings to indicate venv enablement and location of venvs
* Modify tasks to use the proper virtual environment for its purpose
2016-03-21 12:11:19 -04:00
Akita Noek
ea2cabe4d4 Merge branch 'devel' of github.com:ansible/ansible-tower into merge-devel 2016-03-01 15:09:58 -05:00
Akita Noek
0ff94e424d SubList views can now resolve deep relationships using dot notation for relationship specification
Made it so you can specify a relationship like 'parent.somelist'
2016-02-22 11:07:32 -05:00
Matthew Jones
eb3d663d18 Support notification password field encryption
Modify encrypt_field and decrypt_field to support sub-fields under a
dictionary object.  It still uses the parent key when encrypting.
2016-02-21 23:11:17 -05:00
Chris Church
60224cdbe4 Update Django to 1.8 and DRF to 3.3, add new Django migrations, update serializers/pagination/metadata, update browsable API styling. 2016-02-02 17:48:04 -05:00
Wayne Witzel III
71a1547c3a fixing ad_hoc imports
flake8 fixes

Fix and add awx/api/tests

added fact tests

added proper xml reports for jenkins

added jenkins requirements and adjusted Makefile target
2016-02-01 18:37:56 -05:00
Wayne Witzel III
3d4580611e added pytest to requirements_dev
reworking test strucutre

reworked pytest.ini, removed functional imports, updated req_dev

remove unneeded __init__ files

add testing checker to local_settings examples

adding testing packages to system Python for docker
2016-02-01 18:37:56 -05:00
Wayne Witzel III
5d6ea242c0 reorganzing tests folder
make tests a module

refacotring to local imports for tests

fixing test import of tasks

fixing test import of tasks

more testing fixups
2016-02-01 18:37:56 -05:00
Matthew Jones
b59e4d8111 Fix up some flake8 import issues 2015-12-17 11:34:01 -05:00
Matthew Jones
0e98491dac Remove PROJECTS_ROOT and JOBOUTPUT_ROOT from stngs 2015-12-17 11:22:45 -05:00
Matthew Jones
910f9bd4a3 Fixing up some flake8 issues 2015-12-17 10:48:15 -05:00
Matthew Jones
e97e60bd30 Update settings location for certain values
* PROJECTS_ROOT
* JOBOUTPUT_ROOT
* SCHEDULE_MAX_JOBS
* STDOUT_MAX_BYTES_DISPLAY
2015-12-15 15:14:16 -05:00
Chris Meyers
b350eef3f0 session limit invalidation events via socket.io 2015-09-29 14:10:26 -04:00
Matthew Jones
5727d722b6 Merge remote-tracking branch 'upstream/release_2.3' into devel
* upstream/release_2.3: (91 commits)
  Include python-{paramiko,ecdsa} dependencies
  Remove extra epel testing stanzas
  Unit test for ec2 credentialless inventory
  Fix issue with ec2 iam sync with no credential.
  Use the htpasswd command instead the ansible module
  Pip is no longer needed
  check local user root or not in ./configure
  Remove unneeded when check for super user addition
  Improve distro detection in setup.sh
  Fix superuser check on upgrade
  Minor improvements to setup.sh
  Remove ansible prerequisite check from configure
  Attempt to install ansible within setup.sh
  Allow munin processes to access postgres
  Move up base package dependency install
  fixes jenkins failures
  Proper flake8 fix
  fixes executing processes with correct PYTHONPATH will pickup .pth files
  Show the repo for bundled package file dump
  Proper flake8 fix
  ...
2015-09-03 15:46:10 -04:00
Matthew Jones
1471a3bb3e Allow proot's base tmp path to be configurable 2015-08-21 15:28:39 -04:00
Matthew Jones
ee8a76f32b Use smart_str instead of .encode on passwords
We originally tried to prune these .encode() calls out of the tree in
favor of smart_str but we must have missed this one.   This allows
migration 0066 to work if utf-8 characters are used in the password
2015-08-13 17:00:46 -04:00
Matthew Jones
e221097a37 Use smart_str instead of .encode on passwords
We originally tried to prune these .encode() calls out of the tree in
favor of smart_str but we must have missed this one.   This allows
migration 0066 to work if utf-8 characters are used in the password
2015-08-13 16:55:39 -04:00
Chris Meyers
f64a48a98f python 2.6 safe total_seconds 2015-07-30 13:40:31 -04:00
Matthew Jones
10f5308bd8 Fix version parsing of ansible to exclude newlines 2015-07-06 12:16:17 -04:00
John Mitchell
32d1c0e4db fixed copyright date 2015-06-11 16:10:23 -04:00
Matthew Jones
bcc18aa689 Make using named pipe for adding passwords conditional on the version
of ssh used.
2015-06-11 14:48:10 -04:00
Matthew Jones
b3da3b34a3 Changing some legal headers for python source files 2015-05-29 12:10:39 -04:00
Chris Meyers
0dc7072e68 flake8 2015-05-11 09:08:46 -04:00
Chris Meyers
5ff696f708 added fact view tests
* Add related link from host to fact_versions
* Add related link from fact_versions to fact_view
2015-05-08 21:34:24 -04:00
Matthew Jones
36512d74c2 Unused variable to make pyflakes happy 2015-04-21 16:13:37 -04:00
Matthew Jones
0fc753046d This fixes an issue where various parts of the system could get stuck
waiting to emit a socketio event if there was a problem with the
websocket service.  Instead of crashing and hanging the system it will
now emit an error and continue.
2015-04-21 15:29:37 -04:00
Chris Church
88e7f6624c Update relaunch endpoints to use custom serializer, check passwords needed before creating/copying job or ad hoc command. 2015-03-31 17:40:00 -04:00
Chris Church
c1d90e1897 Keep git URLs in SCP format for project updates. Fixes https://trello.com/c/xUL2FZyu 2015-02-26 15:46:55 -05:00
Matthew Jones
bb3732b2c1 Cleaning up some flake8 errors, pyflakes in this case 2015-02-10 17:00:23 -05:00
Matthew Jones
ffec2a19ae Some slight improvements in ansible version detection in tower where
that's used
2015-02-04 10:55:45 -05:00
Matthew Jones
6e6a709165 Fixing up some pep8 issues 2015-02-03 13:46:58 -05:00
Matthew Jones
ffe0d4a5d0 Handle some more boolean types in our custom boolean converter 2015-01-28 10:21:14 -05:00
Matthew Jones
19c6e474cd Missing boolen utility function export 2015-01-26 14:33:20 -05:00
Matthew Jones
b5db74a7d9 Generalize the python boolean converter so we can use it in RBAC methods 2015-01-26 11:57:21 -05:00
Chris Church
d826cf0a0a Add support for changing proot verbosity via settings. 2015-01-07 13:11:24 -05:00