Commit Graph

44 Commits

Author SHA1 Message Date
Chris Meyers
54bcdccdab give a default other than None
1. If the setting isn't in the database, then the specified default is
returned.
2. If the setting IS in the database, then the 'value' field, from the
database, is returned; Unless, the value is null in the database, then
the defined default is returned.
* Take case 1. If the default=None then an AttributeError is raised
* Thus, by setting default='', in case 1. We don't get an AttributeError
because '' will be returned.
* Also note that we don't allow_null=True because then the database
entry could be None. Accessing the setting would raise an AttributeError
in this case. Further, since we set default='' it doesn't matter if null
is in the database.

TL;DR set default=<something_other_than_None>
2017-03-02 13:36:48 -05:00
Chris Meyers
fe3d79b5ec Revert "Merge pull request #5527 from chrismeyersfsu/fix-log_settings"
This reverts commit 3db0242ef9a8b1ce67e159b8a19e0c1e70330b7c, reversing
changes made to e6893bb7f3cf696c202c39103b432c20afa6ec08.
2017-02-24 09:59:34 -05:00
Chris Meyers
50a8083984 flake8 2017-02-23 15:41:41 -05:00
Chris Meyers
2953479dc8 correct behavior of tower_uuid logging setting
* Register a default=function() with LOG_AGGREGATOR_TOWER_UUID. We know
this function will ONLY be called when there is no database backed
settings. Therefore, we set a one-time uuid at this time.
* The user is free to change LOG_AGGREGATOR_TOWER_UUID.
* The user may not set this field to null
* The user may not set this field to ''
2017-02-23 14:31:47 -05:00
Ryan Petrello
fc583ead21 allow AD_HOC_COMMANDS to be set to [] in the settings ui
see: #4975
2017-02-23 10:51:54 -05:00
Chris Meyers
60aa22b01b flake8 2017-02-21 11:05:30 -05:00
Chris Meyers
98c8ff3475 rename uuid field to trigger restart on update
* Since we trigger a restart on update, we can also cache the tower uuid
value in the formatter init. So do that.
2017-02-21 10:15:02 -05:00
Chris Meyers
af9975c6af add a new logger, awx.analytics.performance.api
* Used to log API timing information
2017-02-17 15:35:03 -05:00
Ryan Petrello
5a8a647cf0 default log aggregator username and password to an empty string
other configuration options seem to follow this pattern; the UI code
seems to expect that it can send across an empty string

see: #5276
2017-02-13 16:09:31 -05:00
Chris Meyers
a2903199ae logger username/pass not required 2017-02-03 10:19:54 -05:00
Chris Church
41553c879c Make AWX_PROOT_HIDE_PATHS, AWX_PROOT_SHOW_PATHS and AWX_ANSIBLE_CALLBACK_PLUGINS not required. 2017-01-20 16:02:33 -05:00
Bill Nottingham
9f4327a7ba Update logging help/strings. 2017-01-04 13:25:19 -05:00
AlanCoding
249469c576 encrypt log token or password 2016-12-12 12:02:56 -05:00
Matthew Jones
408c79a845 Merge pull request #4219 from sundeep-co-in/STAGE
add django.pot
2016-12-04 21:04:41 -05:00
AlanCoding
064a40ba92 Manage null default state for logging integration and DB definition 2016-12-02 16:45:27 -05:00
sundeep-co-in
cd5301bf49 add django.pot 2016-12-02 14:02:13 +05:30
AlanCoding
7344a998b2 move formatter to logger file, settings reload on startup 2016-12-01 19:09:55 -05:00
AlanCoding
3643d9c06b allow for reloading of logging settings via CTiT 2016-11-30 16:52:47 -05:00
AlanCoding
37ef4e8bc8 HTTP logger overrides kwargs with settings 2016-11-29 16:26:28 -05:00
AlanCoding
f3427d1359 Logging Integration, ELK docker-compose as update file 2016-11-29 13:09:47 -05:00
Chris Church
eabc497f46 Merge pull request #4084 from cchurch/hide-settings-based-on-licensed-features
Hide settings based on whether features are enabled in the license
2016-11-22 14:50:47 -05:00
Chris Church
5b1df83fcc Add support for hiding settings based on whether features are enabled in the license. 2016-11-21 14:15:41 -05:00
Chris Church
b9eb619697 Add configurable limit to size of stdout shown for a single job event in list view. 2016-11-21 11:30:11 -05:00
Aaron Tan
9e4655419e Fix flake8 E302 errors. 2016-11-15 20:59:39 -05:00
Aaron Tan
473ed016de Fix flake8 E305 errors. 2016-11-15 16:32:27 -05:00
Chris Church
fa29ce6382 Update AWX_ANSIBLE_CALLBACK_PLUGINS help text. 2016-11-15 12:36:29 -05:00
Chris Church
443f100b5f Add default values for job timeouts. 2016-11-15 01:12:06 -05:00
AlanCoding
aaf3a89a64 fixed typo in project timeout setting 2016-11-02 14:59:51 -04:00
AlanCoding
83e31b8618 remove timeout settings example, attach minimum timeout values 2016-11-02 14:59:51 -04:00
AlanCoding
de66318381 move timeout settings into 3 different settings vars 2016-11-02 14:59:51 -04:00
Bill Nottingham
83cd055f10 Merge pull request #3569 from wenottingham/forever_blowing_bubbles
Use bubblewrap (https://github.com/projectatomic/bubblewrap) instead of proot.
2016-10-28 11:55:14 -04:00
AlanCoding
3ae5a4b9a8 add job timeouts to CTiT 2016-10-27 13:22:01 -04:00
Bill Nottingham
f3d4fb7d5b Use implementation-neutral label/descriptions for proot/bubblewrap configuration items. 2016-09-29 16:24:38 -04:00
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
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
Matthew Jones
dd95b9ed3d Fix up an issue update/assigning config keys
If they already existed or in the case of posting a license it would
fail before.  This fixes that up
2016-01-21 14:44:05 -05:00
Matthew Jones
d2f99ad549 Handle operationalerror for unit tests 2015-12-17 14:00:17 -05:00
Matthew Jones
74c06cfc92 Fix up migration path
These settings aren't available during the initial database migration so
we'll use the defaults when bootstrapping the database
2015-12-17 13:13:12 -05:00
Matthew Jones
910f9bd4a3 Fixing up some flake8 issues 2015-12-17 10:48:15 -05:00
Matthew Jones
9db80bd9fc Support tower license within the database
With backwards support for the file-based license
2015-12-16 11:21:52 -05:00
Matthew Jones
0404f6ebc3 Add a note about caching 2015-12-15 16:42:32 -05:00
Matthew Jones
16aa34522c Fix up an export issue for tower_settings 2015-12-15 15:13:58 -05:00
Matthew Jones
273181e894 Expand dbconfig support
* Support updating settings values
* Support activity stream endpoint
* Support clearing value
* Improve type conversion system for displaying values
2015-12-14 15:09:10 -05:00
Matthew Jones
fdcda43de6 Initial Database Configuration bootstrap
* Settings manifest, mapping internal settings to what can be used in
  the database along with type information etc.
* Initial Database model
* Helper object that overlays database settings on django settings
2015-12-07 09:49:13 -05:00