Commit Graph

75 Commits

Author SHA1 Message Date
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
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
Wayne Witzel III
4b5b56c284 Fixing test fallout from InventorySource model change 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
AlanCoding
d687ff1be0 delete disable_signals fixture that is not being used 2017-02-15 15:34:14 -05:00
AlanCoding
14746eebe3 fix system auditor getter logic 2016-12-05 11:22:11 -05:00
Chris Church
4d372b1f90 Mock Project.playbooks for functional tests. 2016-12-01 03:18:23 -05:00
Chris Church
9c2ae43ac6 Clear cache between tests to prevent cached settings sticking around. 2016-11-29 11:50:24 -05:00
Chris Meyers
ddd41e77be fixes fact jsonbfield for unit tests 2016-11-21 17:25:18 -05:00
Aaron Tan
2d1a5425d1 Fix flake8 E302 errors second round. 2016-11-16 09:56:07 -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
Matthew Jones
78b8876ed9 Support expiring of capacity if a node is down
For a certain amount of time
2016-11-10 09:52:04 -05:00
AlanCoding
3b4b1412fc fix tests for project playbook mocking 2016-10-24 21:04:01 -04:00
Chris Church
b7a6aa01a3 Fixes to get flake8 and unit/functional tests passing. 2016-09-18 19:11:29 -04:00
Akita Noek
9c5c09169e Made it so the credential organization field can't be changed
This makes it so the credential organizaiton field can't be changed
through the API (unless the user is a super user). This brings us into
alignment with the original intent.
2016-08-16 15:32:29 -04:00
AlanCoding
6559118f40 tests for saving survey passwords to job 2016-08-08 13:06:07 -04:00
AlanCoding
36286bcda2 notifier rbac test made consistent with others 2016-07-12 11:16:55 -04:00
AlanCoding
0fcc9abd69 allow org auditors to see notifications 2016-07-12 10:30:44 -04:00
Akita Noek
33547259e2 Merge pull request #2840 from anoek/test-porting
Ported several old tests to our new test system
2016-07-08 09:25:35 -04:00
AlanCoding
5df846eb0a remove unnecessary fixture from org_credential 2016-07-06 15:21:57 -04:00
AlanCoding
c21d560cfd Credential can_change updates for organization related field 2016-07-05 14:04:52 -04:00
Akita Noek
e2c9d26e0d Ported old/views.py 2016-06-30 12:16:57 -04:00
Akita Noek
9742d02ee8 Eliminated redundant http request code in test suite 2016-06-30 12:16:57 -04:00
Wayne Witzel III
87ffded774 renaming Credential.owner_role -> Credential.admin_role 2016-06-24 16:55:07 -04:00
AlanCoding
36513e96a2 add can_delete to inventory update access 2016-06-22 16:11:10 -04:00
AlanCoding
04b8eb4eaf add mk_job to factories, use with survey passwords 2016-06-08 13:43:19 -04:00
AlanCoding
39b410ae3e hide passwords in job_args and activity stream 2016-06-08 10:28:53 -04:00
chris meyers
f9ffe6d52e move factory fixture
* Move factory fixture back one directory so unit tests can now take
advantage of them; while still allowing functional tests to use them
2016-06-08 09:24:49 -04:00
Wayne Witzel III
8f3c0ff884 refactoring survey spec tests and fixtures 2016-06-06 13:39:25 -04:00
AlanCoding
3208030202 job read access for org auditors 2016-05-26 16:42:33 -04:00
Akita Noek
fed8d49d86 Added optional "expect" arg for REST fixtures" 2016-05-26 13:58:26 -04:00
Wayne Witzel III
c514cd44c3 restructure factories/fixtures and fix tests 2016-05-26 11:01:58 -04:00
Wayne Witzel III
bcef4a698c updating some tests to use new factories 2016-05-26 11:01:41 -04:00
AlanCoding
9cc8ae9329 ActivityStream access checking test for most resources 2016-05-17 10:39:38 -04:00
Matthew Jones
0a89581868 Fix up flake8 errors 2016-05-05 14:23:41 -04:00
Matthew Jones
5895b3a343 Refactor Notification's naming
Notifier -> NotificationTemplate
notifier -> notification_template
2016-05-05 13:53:46 -04:00
Akita Noek
280993a15d Dropped stored role name/description and other superflous fields
For name and description, we'll derive these from the role_field and
content type, which is much better for lots of reasons (eg changing text
the future). Also ditched the rest of the fields comming from the
standard common base model, we didn't use them and they cost several
indexes on the table.
2016-04-22 10:16:04 -04:00
Akita Noek
2a0b445488 Remove git project configuration from project test fixtures
Having this in here causes us to go out and pull down the repo whenever
we run a test, adds around 9 seconds per test on a good connection.. if
we need real data in here, we should figure out how to get it locally
2016-04-19 22:14:38 -04:00
Matthew Jones
d87213705b Adjust job launch blocking logic
Previously a job template would always block another job template launch
regardless of the details of the job template.   We now restrict that
blocking logic to only block in the case that the job template was
launched with the same inventory.   We keep the exclusion where if the
launch type is 'callback' and the limits differ then they won't be blocked
2016-04-18 15:57:31 -04:00
AlanCoding
cc84ed51d6 Add ability to prompt for several variable types on launch 2016-04-12 17:09:24 -04:00
Matthew Jones
28ffa57258 Implement rbac and related unit tests for notifications 2016-04-12 17:00:38 -04:00
Chris Meyers
d69b9fad8f fix rbac label assignment across orgs
* Org admins should not be able to attach labels to orgs for which they
are not also org admins for.
2016-04-05 16:03:46 -04:00
Chris Meyers
2f4e8cd163 Merge pull request #1396 from chrismeyersfsu/labels-rbac
Labels rbac
2016-04-05 08:53:49 -04:00
Chris Meyers
fa6f5329cf labels + rbac + tests 2016-04-04 17:20:58 -04:00
Akita Noek
23aca083eb Added and updated several credential creation and listing API endpoints
Should addres #1379
2016-04-01 16:57:08 -04:00
Chris Meyers
ff5935ccfd Merge branch 'test-labels' into devel 2016-04-01 13:36:41 -04:00
Chris Meyers
a01b2913bb mockity mock mock 2016-04-01 13:34:06 -04:00
Akita Noek
3b233f828e Merge branch 'devel' of github.com:ansible/ansible-tower into rbac 2016-03-28 09:23:53 -04:00
Chris Meyers
d2de21ee50 job template labels init implementation 2016-03-24 15:26:14 -04:00