1241 Commits

Author SHA1 Message Date
Ryan Petrello
c2ef0a6500 move code linting to a stricter pep8-esque auto-formatting tool, black 2021-03-23 09:39:58 -04:00
Shane McDonald
19d0524461 Dont require is_container_group in payload when creating InstanceGroups 2021-03-16 16:46:24 -04:00
Shane McDonald
1c4a376758 Explicit db field for is_container_group
We now have Container Groups that dont require a credential.
2021-03-15 13:28:39 -04:00
Ryan Petrello
4c60999161 remove custom_virtualenv support from the AWX collection and docs 2021-03-05 15:38:46 -05:00
Shane McDonald
adf708366a Add "copy" to EE related links 2021-03-03 18:52:55 -05:00
Rebeccah
4d2fcfd8c1 add a functional test for creating an EE, remove bum copy function because it's not needed, copy works from the base class
moved AWXKit pull additions to separate PR and made some changes that were causing linting errors in tests and add copy to show_capabilities for the ee serializer
2021-03-03 18:52:55 -05:00
Jeff Bradberry
5b2adc89cf Make the managed_by_tower field read-only for EEs (similar to how we deal with it not being settable for Credentials) and add permissions checking for Org EE Admins.
can_add: gets an explicit role to check against, `'execution_environment_admin_role'`
can_change: leverages `self.check_related()` for the case where the Org is not changing, but also adds an explicit check for the EE Admin Role when the Org is changing to an explicit different Org.
2021-03-03 18:52:55 -05:00
Rebeccah
4b40cb3abb changed the field name from 'container_options' to simply 'pull' 2021-03-03 18:52:55 -05:00
Jake McDermott
4ca33579a5 Add an interface for new ee options 2021-03-03 18:52:55 -05:00
Alan Rominger
c7e0e30f93 Make sure project updates run in default EE (#9172)
* Make sure project updates run in default EE

* Remove project execution_environment field from collection
2021-03-03 18:52:55 -05:00
Shane McDonald
286b1d4e25 InstanceGroup#is_containerized -> InstanceGroup#is_container_group 2021-03-03 18:52:55 -05:00
Jeff Bradberry
c1133b3f6d Add in more model changes around execution environments
- a new unique name field to EE
- a new configure-Tower-in-Tower setting DEFAULT_EXECUTION_ENVIRONMENT
- an Org-level execution_environment_admin_role
- a default_environment field on Project
- a new Container Registry credential type
- order EEs by reverse of the created timestamp
- a method to resolve which EE to use on jobs
2021-03-03 18:52:54 -05:00
Shane McDonald
1f4a45a698 Remove "pull" field from EE mixin
I think this should go on the EE definition itself
2021-03-03 18:52:54 -05:00
Jeff Bradberry
3d233faed8 Expose the user capabilities dict for EEs (#8208) 2021-03-03 18:52:54 -05:00
Jeff Bradberry
45a0084f78 Add a sublist api view for the UJTs that use a given execution environment 2021-03-03 18:52:54 -05:00
Jeff Bradberry
f9741b619c Make changes to support capture by the activity stream
Including exposing a new API view for a particular EE's activity
stream objects.
2021-03-03 18:52:54 -05:00
Jeff Bradberry
cc429f9741 Expose an API view for all of the execution environments under an org 2021-03-03 18:52:54 -05:00
Jeff Bradberry
cb766c6a95 Add execution_environment and pull to the fields for UJs and UJTs 2021-03-03 18:52:54 -05:00
Jeff Bradberry
3c637cd54c Change OrganizationSerializer to show and set default_environment 2021-03-03 18:52:53 -05:00
Jeff Bradberry
61cbd34586 Add in the basic list and detail api views 2021-03-03 18:52:53 -05:00
Hideki Saito
82a226d1fe Add links to inventory source and project to inventory update details view of Jobs list
* Addresses #8839

Signed-off-by: Hideki Saito <saito@fgrep.org>
2021-02-13 22:08:35 +09:00
Alan Rominger
44e6e9344b
Remove mercurial support 2020-12-01 14:06:34 -05:00
Ryan Petrello
ac4b38bc30
Merge remote-tracking branch 'downstream/release_3.8.0' into devel 2020-11-03 15:11:50 -05:00
Chris Meyers
d8ca3ba894 fix flake8 2020-11-02 15:45:16 -05:00
Ryan Petrello
e0af178968
fix a minor bug introduced in Project save validation 2020-10-27 15:42:36 -04:00
Jake Jackson
abd0eb53bf fix tests 2020-10-27 00:39:51 -04:00
Jake Jackson
dbc4b677f6 related #7665 added 400 if user attempts an edit to local_path in a SCM project and test case 2020-10-26 22:47:37 -04:00
Rebeccah
a929e82060 replacing capabilities prefetch definition with empty braces and removing the dunder. Explanation: Originally _capabilities_prefetch was populated with: ['admin', 'execute', {'copy': ['jobtemplate.project.use', 'jobtemplate.inventory.use', 'organization.workflow_admin']}]
This was problematic because it was overwriting the original values that had been defined in the other serializers. Additionally, there are no other dunders for other capabilities prefetch
this was likely added because UnifiedJobTemplateSerializer does not have it's own capabilities, but rather derives them from JTSerializer and WFJTSeralizer, but it worked better without the dunder once I removed the data that was overwriting the data from the WFJT and JT serializers.
2020-10-20 11:58:53 -04:00
Jeff Bradberry
a07dabae9e Attempt to infer related pages on export when the link is missing 2020-10-09 14:06:28 -04:00
Rigel Di Scala
32c08a09c3 Serialize Workflow Job Template inventories by natural key - related #7798
This changeset introduces two changes:

 1. Update the API representation of Workflow Job Templates to use the
 natural key of the Inventory type instead of its id;
 2. Override the related property of the CLI's WorkflowJobTemplate page
 type to patch the related references during the export process,
 allowing the resource to be serialised using the natural key of the
 Inventory type instead of the id.

Change n.2 is a workaround that is used when exporting resources from
AWX/Tower instances that don't have change n.1. It can be removed in the
future.
2020-10-08 10:21:00 -04:00
Ryan Petrello
c52054951d
fix a bug that can break password prompting in certain scenarios
see: https://github.com/ansible/awx/issues/8202
2020-09-29 09:34:38 -04:00
Ryan Petrello
af238be377
address a few follow-up issues for Org -> Galaxy Credentials support
- add support for managing galaxy creds in the tower organization module
- fix a minor serializer bug
2020-09-10 11:00:21 -04:00
Ryan Petrello
011822b1f0
make a global "managed by AWX/Tower" Credential to represent Galaxy 2020-09-01 13:45:03 -04:00
Ryan Petrello
1b4dd7c783
enforce Organization ownership of Galaxy credentials 2020-09-01 13:45:02 -04:00
Ryan Petrello
b8e0d087e5
add model support, an API, and a migration for Org -> Galaxy credentials
see: https://github.com/ansible/awx/issues/7813
2020-09-01 13:44:59 -04:00
Chris Meyers
a9cdf07690
push global invsource fields onto invsource obj 2020-09-01 12:50:58 -04:00
Chris Meyers
a8a47f314e
remove source_regions 2020-09-01 12:50:56 -04:00
Chris Meyers
f32716a0f1
remove instance_filter 2020-09-01 12:50:56 -04:00
Chris Meyers
7278e7c025
remove group_by from inventory source
* Does not remove group_by testing
2020-09-01 12:50:56 -04:00
Ryan Petrello
73baf3fcf9
defer loading Job.artifacts on host views to improve performance
see: https://github.com/ansible/awx/issues/8006

this data can be *really* large, and we don't actually need it for the summary fields on this API endpoint
2020-08-26 13:34:15 -04:00
Philip Douglass
30ae0f53ec Reject setting scm_branch for Remote Archive projects 2020-08-21 13:09:09 -04:00
Ryan Petrello
0b221a42c0
Add the ability to specify K8S/OCP credentials on a Job Template
see: https://github.com/ansible/awx/issues/5735
2020-07-15 17:44:07 -04:00
Ryan Petrello
ab11d3188d
refactor the job type name into a single property 2020-07-13 09:43:43 -04:00
Ryan Petrello
f51774c06e
add job type to Host summary_fields.recent_jobs
see: https://github.com/ansible/awx/issues/5236
2020-07-13 09:02:04 -04:00
Ryan Petrello
319308193c
show user capabilities for instance groups 2020-07-08 09:17:55 -04:00
softwarefactory-project-zuul[bot]
d8f6ea3fe8
Merge pull request #7485 from ryanpetrello/words-matter
replace certain terms with more inclusive language

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-06-30 17:00:58 +00:00
Ryan Petrello
78229f5871
replace certain terms with more inclusive language
see: https://www.redhat.com/en/blog/making-open-source-more-inclusive-eradicating-problematic-language
2020-06-30 10:49:19 -04:00
Jake Jackson
30757f8289 moved logic to the validate function and fixed tests accordingly 2020-06-26 15:04:48 -04:00
Jake Jackson
606d4e0ea2 added change so that groups and host names cannot share the same name in the same inventory. added tests to validate 2020-06-25 11:25:21 -04:00
Elyézer Rezende
37218e1695 Enforce single owner field when serializing creds
The CredentialSerializerCreate expect a single owner field according to
its help text but was not validating that. This makes it validate for a
single owner field when creating a Credential.
2020-06-21 11:31:35 -04:00