180 Commits

Author SHA1 Message Date
Pablo H.
3ba6e2e394 feat: remove collection support for oauth (#15623)
Co-authored-by: Alan Rominger <arominge@redhat.com>
2024-11-20 11:18:52 -05:00
Alan Rominger
6599f3f827 Removal of OAuth2 stuff from CLI
also from awxkit generally

Remove login command
2024-11-20 11:18:52 -05:00
Djebran Lezzoum
579c2b7229
Update AWX collection to use basic authentication (#15554)
Update AWX collection to use basic authentication when oauth token not provided,
and when username and password provided.
2024-10-08 10:42:22 -04:00
Harshith u
776b661fb3
use optional api prefix in collection if set as environ vairable (#15205)
* use optional api prefix if set as environ variable

* Different default depending on collection type
2024-05-29 11:54:05 -04:00
Seth Foster
0d4f653794
Fix up ansible-test sanity checks due to ansible 2.17 release (#15208)
* Fix up ansible sanity checks

* Fix awx-collection test failure

* Add ignore for ansible-test 2.17 

---------

Signed-off-by: Seth Foster <fosterbseth@gmail.com>
Co-authored-by: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com>
2024-05-21 15:05:59 -04:00
Seth Foster
4754819a09
awx modules wait on event processing finished (#15152)
This change makes "wait: true" for jobs and syncs
look at the event_processing_finished instead of
finished field.

Right now there is a race condition where
a module might try to delete an inventory, but the events
for an inventory sync have not yet finished. We have a
RelatedJobsPreventDeleteMixin that checks for this condition.

bulk jobs don't have event_processing_finished so we just
use finished field in that case.
2024-04-26 17:33:34 -04:00
Seth Foster
3bb559dd09 AWX Collections for DAB RBAC
Adds new modules for CRUD operations on the
following endpoints:

- api/v2/role_definitions
- api/v2/role_user_assignments
- api/v2/role_team_assignments

Note: assignment is Create or Delete only

Additional changes:
- Currently DAB endpoints do not have "type"
field on the resource list items. So this modifies
the create_or_update_if_needed to allow manually
specifying item type.

Signed-off-by: Seth Foster <fosterbseth@gmail.com>
2024-04-11 14:59:09 -04:00
Alan Rominger
1f7be9258c
Remove tower_legacy module_utils that appears unused (#14421)
* Remove tower_legacy module that appears unused

* Update license details
2024-02-16 16:02:09 -05:00
Seth Foster
69102cf265 Remove receptor_address module from collection
After removing CRUD from receptor addresses, we need
to remove the module.

- remove receptor_address module
- Add listener_port to instance module
- Add peers_from_control_nodes to instance module

Signed-off-by: Seth Foster <fosterbseth@gmail.com>
2024-02-02 10:37:41 -05:00
Seth Foster
04cbbbccfa Update awx_collection to support ReceptorAddress
- Add receptor_address module which allows
users to create addresses for instances

- Update awx_collection functional and integration
tests to support new peering design

Signed-off-by: Seth Foster <fosterbseth@gmail.com>
2024-02-02 10:37:41 -05:00
Alan Rominger
b6b167627c
Fix Boolean values defaulting to False in collection (#14493)
* Fix Boolean values defaulting to False in collection

* Remove null values in other cases, fix null handling for WFJT nodes

* Only remove null values if it is a boolean field

* Reset changes to WFJT node field processing

* Use test content from sean-m-sullivan to fix lookups in assert
2023-10-24 14:29:16 -04:00
Sean Sullivan
abc56305cc
Add Request time out option for collection (#14157)
Co-authored-by: Jessica Steurer <70719005+jay-steurer@users.noreply.github.com>
2023-08-03 15:06:04 -03:00
John Westcott IV
5a63533967
Added support to collection for named urls (#14205) 2023-07-27 10:22:41 -03:00
Christian Adams
b549ae1efa
Only show the product version header when the requester is authenticated (#14135) 2023-07-26 18:38:05 -04:00
John Westcott IV
8ddc19a927
Changing how associations work in awx collection (#13626)
Co-authored-by: Alan Rominger <arominge@redhat.com>
Co-authored-by: Jessica Steurer <70719005+jay-steurer@users.noreply.github.com>
2023-07-17 14:16:55 -03:00
Baptiste Agasse
8957a84738
Related #13336 - DNS resolution is preventing awx_collection to work with http[s]_proxy (#13524)
Co-authored-by: Seth Foster <fosterseth@users.noreply.github.com>
2023-05-24 20:00:07 +00:00
John Westcott IV
7f020052db
Make state exists universal in collection (#13890)
Make state: exists available for all API modules

Make state:exists return the ID just like it would if it created the resource
2023-05-10 09:05:29 -03:00
sean-m-sullivan
0fb334e372 collection, allow roles to be added to multiple teams and users 2023-05-02 07:34:38 -04:00
Alan Rominger
ac8cff75ce
Run collection sanity tests in CI (#13356)
* Run collection sanity tests in CI

This requires adding a Makefile install of ansible-core

Fake the version to make semver check happy

* Fixes from ansible-test sanity failures

* Exclude the export module due to awxkit requirement

* Fix broken ansible-test rule exceptions

remove Ansible 2.14 exclusions that make ansible-test ERROR, saying they are not needed
2022-12-20 16:06:25 -05:00
Rick Elrod
7d645c8ff6 [collection] Add 'instance' module
Signed-off-by: Rick Elrod <rick@elrod.me>
2022-09-23 09:46:16 -04:00
Yuki Yamashita
dba33f9ef5
Replace gethostbyname to getaddrinfo for plugins ipv6 support related #11450 (#12561)
Co-authored-by: yukiy <yyamashi@redhat.com>
2022-08-22 11:07:10 -03:00
sean-m-sullivan
df649e2c56 update awx collection wait interval to 2 2022-05-18 09:57:40 -04:00
Shane McDonald
bd5c304a50 Make our collection work with prefixed API endpoints
I caught this when trying to add test coverage for https://github.com/ansible/awx/pull/11342
2022-03-08 12:05:50 -05:00
Nico Ohnezat
815ef4c9c9 related #11229 consider previous set json_output changed in
controller_api

job_template module sets self.json_output['changed'] to true before calling create_or_update_if_needed.

Signed-off-by: Nico Ohnezat <nico@no-12.net>
2021-10-08 23:59:12 +02:00
sean-m-ssullivan
5b28e7b397 simplify module utils files 2021-09-28 11:43:28 -04:00
sean-m-ssullivan
dd4943310d simplify module utils files 2021-09-27 19:35:22 -04:00
beeankha
9b66bda8b9 Fix pep8 error 2021-09-10 09:20:44 -04:00
John Westcott IV
515c3450c2 Fixing linting issue 2021-09-10 08:46:41 -04:00
John Westcott IV
5607c350cd Removing parens 2021-09-10 08:46:41 -04:00
John Westcott IV
aad432aaa3 Changing to Version instead of Type 2021-09-10 08:46:41 -04:00
John Westcott IV
d4971eb7b7 Preventing error if we were unable to get an API version 2021-09-10 08:46:41 -04:00
beeankha
bc365e2d01 Point to the correct name for AAP within collections 2021-08-06 10:13:06 -04:00
beeankha
e88e81928c Fix sanity errors for collections 2021-07-30 10:53:44 -04:00
Seth Foster
5da02690c1
Fix copy_from warning message
- warn() does not take keyword 'msg'
- add testing around the copy_from parameter for project creation
2021-06-26 01:28:02 -04:00
sean-m-ssullivan
214c27a5cf add job data to filed wait jobs 2021-06-11 09:45:28 -04:00
Seth Foster
4bd910493a
sanity tests 2021-06-08 14:33:28 -04:00
Sarabraj Singh
25ca8d22d6
added collection name to module.deprecate() calls; fixed pep8 linting issues 2021-06-08 14:33:27 -04:00
Sarabraj Singh
378a0711c2
linted AUTH_ARGSPEC to make it easier to read (<180 characters in the same line) 2021-06-08 14:33:26 -04:00
Seth Foster
4add72b9d2
actually make use of option aliases 2021-06-08 14:33:25 -04:00
Seth Foster
7d06fc74dd
tower_username to controller_username, etc 2021-06-08 14:33:25 -04:00
Seth Foster
1a2e56c785
restore tower_legacy.py, update examples to include CONTROLLER_HOST 2021-06-08 14:33:25 -04:00
Seth Foster
39b26c8f0e
Added env variable CONTROLLER_HOST, et al. Add awx.awx namespace to the runtime.yml redirects, and added templating task to change to ansible.controller 2021-06-08 14:33:24 -04:00
Seth Foster
82c5803e59
mostly includes renaming non-syntax references to tower 2021-06-08 14:33:24 -04:00
Seth Foster
7a63785255
more rename, mostly in test 2021-06-08 14:33:23 -04:00
Seth Foster
44fed1d7c1
pycharm refactor rename files and class, linux rename tower_ controller_ 2021-06-08 14:33:22 -04:00
beeankha
62a9c74040 Fix failing integration test playbooks 2021-05-17 15:56:39 -04:00
softwarefactory-project-zuul[bot]
0bdd873bd3
Merge pull request #9896 from sean-m-sullivan/approval_node
Add workflow approval and node wait modules

SUMMARY
Please see #9878 this is a clean PR after redoing my fork.
Add a module to find a workflow approval node and approve or deny it, based on Issue #8013.
Add a module to wait for a specific workflow node to complete and return information on it.
Both of these are based on tests I have been creating for testing workflows.
Scenario
Launch workflow
Wait for A node in the workflow to finish, compare output to expected output.
If it matches, approve the approval node, otherwise deny the approval node.
Workflow completes.
Even used in concert I've added the wait feature to both of these so a user can wait on either to appear.
This does require a workflow to use unique names on the job nodes they are waiting on, As the job # is created on the fly, it would be difficult for user to specify, A future update could explore searching for a specific identifier among a workflow template and then finding that job created by that identifier.
Currently without the modules this depends on generous use of the uri module, with until and retry coupled together.
ISSUE TYPE
Feature Pull Request

COMPONENT NAME
awx-collection
AWX VERSION
19.0.0

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
2021-04-24 22:52:50 +00:00
sean-m-ssullivan
ec312358e2 fix completeness 2021-04-23 11:57:24 -05:00
sean-m-ssullivan
ce1f3009f9 add tower workflow schema update 2021-04-22 13:39:33 -05:00
beeankha
b1119d2972 Fix format specification linting erros 2021-03-29 16:11:06 -04:00