1505 Commits

Author SHA1 Message Date
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
Wayne Witzel III
0134b7e0bd Add organization to the InventorySource fields 2017-05-03 15:29:21 -04:00
AlanCoding
8d2598beee allow management of 2 types of SCM inventory sources 2017-05-03 12:18:08 -04:00
Aaron Tan
057b24ccd0 Allow concurrent workflow job runs. 2017-05-02 16:28:24 -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
Aaron Tan
59376feb70 Merge pull request #6133 from jangsutsr/6118_rework
Trailing comma rework
2017-05-02 15:41:23 -04:00
Wayne Witzel III
65b7e7e839 Merge pull request #6144 from wwitzel3/issue-5745
Support dynamic Inventory
2017-05-02 13:28:48 -04:00
Wayne Witzel III
af35838aff Make kind read-only for PUT/PATCH, use isinstance in Host Manager, update field fasly check 2017-05-02 13:00:17 -04:00
Ryan Petrello
61b3f7afb7 disallow ask_at_runtime fields for custom credential types 2017-05-02 10:45:43 -04:00
Ryan Petrello
a1fa9243bc split machine CredentialType into two distinct (ssh and vault) kinds 2017-05-02 10:26:37 -04:00
Aaron Tan
df49a70fd7 Trailing comma rework. 2017-05-01 16:42:32 -04:00
Chris Meyers
0be384af18 rename field to store_facts and fix up tests 2017-05-01 16:39:48 -04:00
Chris Meyers
6dec9d1014 per-jt most recent fact scan gathering
* Remove system tracking piggybacked most-recent-fact-gathering
* Add explicit per-jobtemplate configurable fact gathering
* Continue to support system tracking
* Fixed a bug where we weren't ack()ing system tracking rabbit msgs
2017-05-01 16:03:16 -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
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
Wayne Witzel III
1750e5bd2a Refactor Host manager and dynamic Inventory tests and update
validation/serialization
2017-05-01 13:06:49 -04:00
Wayne Witzel III
17e9b3057e Clean-up intiail commit for Host filter / DynamicInventory 2017-05-01 12:55:42 -04:00
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
77915423c2 Merge pull request #6122 from jangsutsr/6012_prevent_workflow_resources_from_returning_402_with_basic_license
Prevent workflow resources from returning 402 with basic license
2017-04-28 09:38:34 -04:00
Aaron Tan
0dc6bbe5a0 Prevent workflow resources from returning 402 with basic license. 2017-04-27 16:50:16 -04:00
Aaron Tan
c2d26c918a Allow DRF parser to accept trailing commas. 2017-04-27 16:16:05 -04:00
Matthew Jones
52fa9410f2 Merge pull request #6084 from cchurch/paginate_this
Add custom paginator to avoid separate COUNT(*) query
2017-04-25 16:05:48 -04:00
Ryan Petrello
7037daa799 Merge pull request #6096 from ryanpetrello/api_new_in_v2
refactor API v2 version detection
2017-04-25 10:48:00 -04:00
Ryan Petrello
f0f859f553 Merge pull request #6088 from ryanpetrello/v1_custom_credentials
for /api/v1/ requests, filter out v2 (custom) credentials
2017-04-25 10:30:02 -04:00
Ryan Petrello
80df1523b0 refactor API v2 version detection and feature inclusion 2017-04-25 09:35:03 -04:00
Alan Rominger
34b697ce17 Fix 500 error in ProjectScmInventorySources 2017-04-24 16:54:17 -04:00
Ryan Petrello
83dc4f6757 for /api/v1/ requests, filter out v2 (custom) credentials
see: #5877
2017-04-24 15:21:30 -04:00
Ryan Petrello
7e64a6fd60 add "added_in_api_version" metadata to OPTIONS requests 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
Chris Church
9f1f770ebe Add custom paginator to use PostgreSQL window function instead of needing a separate COUNT(*) query. 2017-04-20 16:45:14 -04:00
Wayne Witzel III
c058f76960 value_to_python should encode lookup fields as ascii 2017-04-20 13:22:54 -04:00
AlanCoding
d1698ece34 Add back group summary_field for v1 InvSrc 2017-04-20 08:43:56 -04:00
AlanCoding
a066905997 fix InvSrc validation Organization requirement for new sources 2017-04-19 14:00:19 -04:00
Chris Meyers
a64f8a7660 Merge pull request #6045 from chrismeyersfsu/fix-hosts_list
return count, results, next, prev
2017-04-18 09:08:05 -04:00
Chris Meyers
70a8ccef0f return count, results, next, prev
* This returns /api/vx/hosts/ to having all the nice response items like
count, results, next, prev. I had "chopped" that off by explicitly only
returning result.
2017-04-17 16:43:29 -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
Chris Meyers
2c34aef661 Merge pull request #6041 from chrismeyersfsu/feature-jsonsearch
remove facts_latest in favor of ansible_facts
2017-04-17 14:52:02 -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
Chris Meyers
55268a8ff0 remove facts_latest in favor of ansible_facts
* Closer align our facts data structure with ansible facts data
structure for purposes of ... wait for it ... 2-way fact caching
2017-04-17 14:27:33 -04:00
Chris Meyers
880f4a77a4 Merge pull request #6036 from chrismeyersfsu/fix-hosts_v2
run host listing through v1 vs. v2 logic
2017-04-17 12:12:24 -04:00
Chris Meyers
775093294e run host listing through v1 vs. v2 logic
* api/v1/hosts related fields were getting v2 in the related urls. The
context is now included in the serializer instantiation.
2017-04-17 11:43:44 -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
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
Chris Meyers
bd1f8b088f 400 on invalid host filter query instead of 500 2017-04-13 09:40:11 -04:00
Wayne Witzel III
91f3e665cb group -> deprecated_group, added migrations, added/removed tests 2017-04-11 14:09:04 -04:00
Wayne Witzel III
7458788562 More updates for InventorySource changes 2017-04-11 14:04:25 -04:00
Wayne Witzel III
c784c96449 Initial removal of InventorySource.group 2017-04-11 14:04:25 -04:00