Commit Graph

407 Commits

Author SHA1 Message Date
Chris Church
a2595dcf12 API fixes for 500 errors. 2016-02-24 18:38:04 -05:00
Akita Noek
e18592fa87 Merge branch 'devel' into rbac 2016-02-24 16:14:32 -05:00
Chris Meyers
7ffe46fc74 add postgres Fact model, update views, tests
* awx.main.models Fact added
* view host fact and timeline updated to use new Postgres Fact model instead of Mongo
* Removed license set start Mongo logic
* added View tests
* added Model tests
* Removed mongo fact unit tests
* point at modified jsonbfield that supports sqlite storage driver
* postgresify fact cache receiver
* test OPTIONS endpoint
* Note: single fact view not implemented yet.
2016-02-24 14:38:54 -05:00
Matthew Jones
75ef0dd395 Implement tower ui view url on models 2016-02-23 14:19:42 -05:00
Chris Church
90d1a3d020 Remove write-only fields from GET response for job template launch, update raw data form to show any fields/passwords needed to launch the job. 2016-02-23 14:04:30 -05:00
Chris Church
6f988452c3 Merge pull request #977 from cchurch/api-raw-data-form-fixes
API Raw Data Form & Validation Fixes
2016-02-23 12:23:14 -05:00
Akita Noek
606501749c Added several related fields to the RBAC API 2016-02-23 11:49:53 -05:00
Matthew Jones
ab3669efa9 Refactor message generator
* Job object can now control the output and generate K:V output for
  notification types that can support it
* Notifications store the body as json/dict now to encode more
  information
* Notification Type can further compose the message based on what is
  sensible for the notification type
* This will also allow customizing the message template in the future
* All notification types use sane defaults for the level of detail now
2016-02-22 17:09:36 -05:00
Akita Noek
b08809f7cc Initial RBAC API implementation 2016-02-22 16:21:56 -05:00
Matthew Jones
dde70dafec Refactor NotificationTemplate to Notifier 2016-02-17 15:18:18 +00:00
Chris Church
d8ae1115f0 Fix extra_vars/survey handling since request.data is now an OrderedDict. 2016-02-17 00:04:28 -05:00
Chris Church
99150b5a05 Flake8 fixes. 2016-02-16 20:02:52 -05:00
Chris Church
4873e2413f * Populate browsable API raw data form with submitted request data in response to an update.
* Remove fields from browsable API raw data that are set implicitly based on URL / parent object.
* Fix issue where a group/host could be assigned to a different inventory.
* Update validation to load values from existing instance if not present in new data; allows PATCH requests to succeed.
* Remove job_args, job_cwd, job_env, result_stdout and result_traceback fields from job listings.
2016-02-16 17:49:34 -05:00
AlanCoding
33e84d03ef add job_template related list to inventory endpoint 2016-02-16 10:12:35 -05:00
Matthew Jones
8db2f60405 Notification serializers, views, and tasks
* Implement concrete Notification model for notification runs
* Implement NotificationTemplate and Notification serializers and views
* Implement ancillary views
* Implement NotificationTemplate trigger m2m fields on all job templates
  via a fields mixin
* Link NotificationTemplates with an org
* Link notifications with the activity stream
* Implement Notification celery tasks
* Extend Backend field parameters to identify sender and receiver as
  parameters needed by the message and not the backend itself
* Updates to backends to better fit the django email backend model as it
  relates to Messages
* Implement success job chain task + notifications
* Implement notifications in error job chain task
2016-02-09 23:12:55 -05:00
Matthew Jones
172207cd4b Notification endpoints and url expositions
Also some changes to the footprint of the notification handler classes
2016-02-04 15:52:23 -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
Matthew Jones
56d0cbfeff Cover DELETEing the license from database config
Fix the standard license delete behavior on the /config endpoint.  It
was covered elsewhere but this is the common path for license posting/removing
2016-01-26 16:31:38 -05:00
Matthew Jones
de55a9e0ed Remove dict comprehension for settings list
Not supported in python 2.6
2016-01-18 16:08:21 -05:00
Matthew Jones
7b12954127 Replace namedtuple with an intermediate class
Named Tuples aren't supported on python 2.5
2016-01-14 15:38:00 -05:00
Matthew Jones
f366b34847 Adding database config unit tests 2016-01-11 16:01:16 -05:00
Matthew Jones
0e98491dac Remove PROJECTS_ROOT and JOBOUTPUT_ROOT from stngs 2015-12-17 11:22:45 -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
35b19bf220 Update settings references
* PROOT
* Pendo tracking state
* ad hoc commands
* activity stream
* org admin visibility
2015-12-15 16:44:08 -05:00
Matthew Jones
dfd1ca4ae9 Relocate AUTH_TOKEN_* settings reference 2015-12-15 15:37:26 -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
Matthew Jones
7867a58c00 RBAC and settings reset
* Initial super-user only rbac with notes for future user-settings
  support
* Clearing individual and all settings back to defaults
2015-12-15 12:12:54 -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
f53f3d805d View and some validation logic for database config
* Fixing some bugs in the manifest definition
* Database model and schema migration for tower settings
* Initial View and Serializer implementation using a strategy of merging
  model instances and named tuples
2015-12-11 16:57:11 -05:00
Chris Church
cd447bed96 Social auth and SSO updates:
* Move auth backends into sso app.
* Add support for mapping social auth users into organizations and teams.
* Return social auth backends in a consistent order in the API.
* Remove custom SAML attribute mapping and use options provided by PSA.
* Add pipeline function to raise an exception if no user has been found or created; added comments on how to disable new user creation.
* Add comments for defining a custom social auth pipeline function.
2015-11-13 11:30:55 -05:00
Chris Meyers
0889f1ebe1 add content encoding for json to stdout
* content_format=ansi&content_encoding=base64 support added to
?format=json on stdout endpoint.

Currently the json `content` value is made into html.
This change will allow support for consuming STDOUT for display on the
terminal.
2015-11-03 09:38:49 -05:00
Chris Meyers
ad383ebccc license enforcement
* add rebrand and auth_enterprise feature to license
* enforce auth_enterprise by not surfacing auth callback info at /auth
endpoint
2015-10-08 18:00:29 -04:00
Chris Church
2ba5e06e2c Add support for single-sign on using python-social-auth (with Google/Github OAuth2 and SAML support). Add support for RADIUS as another authentication backend. 2015-10-02 14:57:27 -04:00
Chris Meyers
22f0a4b79a allow token in get params at stdout endpoint 2015-10-01 17:25:21 -04:00
Chris Meyers
052929d209 Merge pull request #446 from chrismeyersfsu/feature-session_limit2
Feature session limit2
2015-09-30 11:11:36 -04:00
Chris Meyers
4163492e81 add auth timeout header to login response 2015-09-29 15:49:42 -04:00
Chris Meyers
b350eef3f0 session limit invalidation events via socket.io 2015-09-29 14:10:26 -04:00
Matthew Jones
53a96fd9eb Merge pull request #440 from matburt/pendo_apiside
API Side Pendo Tracking Work
2015-09-29 01:04:21 -04:00
Chris Meyers
000d26d7e3 session limit enforcement
* upon creating a new session, invalidate oldest sessions
2015-09-28 14:17:28 -04:00
Matthew Jones
a3410920a9 Remove management job schedule count restriction 2015-09-25 16:00:19 -04:00
Matthew Jones
3d7f25218a Add api side support for pendo
Also adds setup playbook support for pendo.  This change anticipates
that the default for new installations will be 'detailed'
2015-09-25 15:52:42 -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
c5ce9cdc12 Fix stdout plaintext render
* Was rendering as json (though text/plain)
* Switched to rendering it as normal text with stripped ansi
* Fixes: https://trello.com/c/TMyOak0H/142-api-v1-jobs-n-stdout-format-txt-emits-json-output
2015-08-21 10:20:57 -04:00
Chris Meyers
dfff6b218a correctly inherit extra_vars
* inherit extra_vars from job_template
* overwrite with extra vars survey default vars
* overwrite with job extra_vars
* bypass extra_vars inherit logic for job relaunch
* with tests
2015-08-10 11:24:26 -04:00
Matthew Jones
dc0d732ad4 Fix merge issues on stdout branch
The act of committing a PR that including part of these changes and then
reverting it meant that some of the changes from the original branch
didn't land in this new PR.   This commit adds the missing bits.

Lesson learned:  Create a new branch when submitting a PR on a
previously reverted PR
2015-08-05 21:53:46 -04:00
Matthew Jones
c0ea174e93 Rework stdout display for file storage only
* Cleanup old code related to stdout download using temporary files
* Remove copy-into-database code
* Modify stdout download code to reference stdout file
2015-08-05 21:52:47 -04:00
Matthew Jones
c231601b76 Fix merge issues on stdout branch
The act of committing a PR that including part of these changes and then
reverting it meant that some of the changes from the original branch
didn't land in this new PR.   This commit adds the missing bits.

Lesson learned:  Create a new branch when submitting a PR on a
previously reverted PR
2015-08-04 09:57:39 -04:00
Matthew Jones
bddcb06fab Merge branch 'stdout_file_download' into upstream_master
* stdout_file_download:
  Rework stdout display for file storage only
2015-08-03 15:30:17 -04:00
Matthew Jones
1c777c5441 Rework stdout display for file storage only
* Cleanup old code related to stdout download using temporary files
* Remove copy-into-database code
* Modify stdout download code to reference stdout file
2015-08-03 15:14:51 -04:00
Matthew Jones
5df23b95f6 Revert "Improve stdout behavior by implementing a downloadable stdout." 2015-07-24 14:54:13 -04:00