summaryrefslogtreecommitdiffstats
path: root/awx_collection/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove oauth provider (#15666)Pablo H.3 days3-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove oauth provider This removes the oauth provider functionality from awx. The oauth2_provider app and all references to it have been removed. Migrations to delete the two tables that locally overwrote oauth2_provider tables are included. This change does not include migrations to delete the tables provided by the oauth2_provider app. Also not included here are changes to awxkit, awx_collection or the ui. * Fix linters * Update migrations after rebase * Update collection tests for auth changes The changes in https://github.com/ansible/awx/pull/15554 will cause a few collection tests to fail, depending on what the test configuration is. This changes the tests to look for a specific warning rather than counting the number of warnings emitted. * Update migration * Removed unused oauth_scopes references --------- Co-authored-by: Mike Graves <mgraves@redhat.com> Co-authored-by: Alan Rominger <arominge@redhat.com>
* 🧪 Make pytest notify us about future warningsSviatoslav Sydorenko4 days3-0/+26
| | | | | | | | | | | | | | | | | | | | | | | In essence, this configures Python to turn any warnings emitted in runtime into errors[[1]]. This is the best practice that allows reacting to future deprecation announcements that are coming from the dependencies (direct, or transitive, or even CPython itself)[[2]]. The typical workflow looks like this: 1. If a dependency is updated an a warning is hit in tests, the deprecated thing should be replaced with newer APIs. 2. If a dependency is transitive or we have no control over it otherwise, the specific warning and a regex matching its message, plus the module reference (where possible) can be added to the list of temporary ignores in `pytest.ini`. 3. The list of temporary ignores should be reevaluated periodically, including when dependency re-pinning in lockfile is happening. [1]: https://docs.python.org/3/using/cmdline.html#cmdoption-W [2]: https://pytest-with-eric.com/configuration/pytest-ignore-warnings/
* feat: remove collection support for oauth (#15623)Pablo H.9 days3-34/+2
| | | Co-authored-by: Alan Rominger <arominge@redhat.com>
* Removal of OAuth2 stuff from CLIAlan Rominger9 days1-1/+0
| | | | | | also from awxkit generally Remove login command
* Make lookup plugins return lists to fix failures (#15625)Alan Rominger2024-11-121-2/+2
| | | | | | | | | | | | | | | * Make lookup plugins return lists to fix failures * Update unit tests * Use lookup for test failures, update docs * Grammar fix from review Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua> --------- Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
* Removed oAuth methods from collection docs. (#15606)TVo2024-11-071-30/+0
| | | | * Removed oAuth methods from collection docs.
* Remove LDAP authentication (#15546)Djebran Lezzoum2024-10-151-30/+0
| | | Remove LDAP authentication from AWX
* Update AWX collection to use basic authentication (#15554)Djebran Lezzoum2024-10-081-0/+55
| | | | Update AWX collection to use basic authentication when oauth token not provided, and when username and password provided.
* Fix up ansible-test sanity checks due to ansible 2.17 release (#15208)24.4.0Seth Foster2024-05-211-1/+1
| | | | | | | | | | | | * 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>
* AWX Collections for DAB RBACSeth Foster2024-04-114-0/+279
| | | | | | | | | | | | | | | | | | | 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>
* Replace role system with permissions-based DB rolesAlan Rominger2024-04-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Develop ability to list permissions for existing roles Create a model registry for RBAC-tracked models Write the data migration logic for creating the preloaded role definitions Write migration to migrate old Role into ObjectRole model This loops over the old Role model, knowing it is unique on object and role_field Most of the logic is concerned with identifying the needed permissions, and then corresponding role definition As needed, object roles are created and users then teams are assigned Write re-computation of cache logic for teams and then for object role permissions Migrate new RBAC internals to ansible_base Migrate tests to ansible_base Implement solution for visible_roles Expose URLs for DAB RBAC
* Add tags and skip_tags option to awx.awx.workflow_launch (#15011)Tom Page2024-04-031-1/+32
| | | Signed-off-by: Tom Page <tpage@redhat.com>
* Loosen up body check on templateDavid O Neill2024-03-291-1/+1
| | | | | https://github.com/ansible/awx/issues/14985 https://github.com/ansible/awx/issues/13983
* Remove `tower_legacy` module_utils that appears unused (#14421)Alan Rominger2024-02-161-3/+1
| | | | | * Remove tower_legacy module that appears unused * Update license details
* GH13983 - Add additional check for bad templatesDavid O Neill2024-02-141-1/+1
|
* Fix the test_export_system_auditor collection testJeff Bradberry2024-02-071-14/+10
|
* Remove receptor_address module from collectionSeth Foster2024-02-022-11/+2
| | | | | | | | | | | 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>
* Fix proper indent to instance moduleSeth Foster2024-02-021-1/+1
| | | | Signed-off-by: Seth Foster <fosterbseth@gmail.com>
* Update awx_collection to support ReceptorAddressSeth Foster2024-02-022-12/+14
| | | | | | | | | | - 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>
* refactor awxkit import codeChris Meyers2023-12-181-14/+26
| | | | | | | * Move awxkit import code into a pytest fixture to better control when the import happens * Ensure /awx_devel/awxkit is added to sys path before awxkit import runs
* add awx collection export testsChris Meyers2023-12-182-9/+211
| | | | | | | | | | | * Basic export tests * Added test that highlights a problem with running Schedule exports as non-root user. We rely on the POST key in the OPTIONS response to determine the fields to export for a resource. The POST key is not present if a user does NOT have create privileges. * Fixed up forwarding all headers from the API server back to the test code. This was causing a problem in awxkit code that checks for allowed HTTP Verbs in the headers.
* Adding hosts bulk deletion feature (#14462)Avi Layani2023-12-132-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adding hosts bulk deletion feature Signed-off-by: Avi Layani <alayani@redhat.com> * fix the type of the argument Signed-off-by: Avi Layani <alayani@redhat.com> * fixing activity_entry tracking Signed-off-by: Avi Layani <alayani@redhat.com> * Revert "fixing activity_entry tracking" This reverts commit c8eab52c2ccc5abe215d56d1704ba1157e5fbbd0. Since the bulk_delete is not related to an inventory, only hosts which can be from different inventories. * get only needed vars to reduce memory consumption Signed-off-by: Avi Layani <alayani@redhat.com> * filtering the data to reduce memory increase the number of queries Signed-off-by: Avi Layani <alayani@redhat.com> * update the activity stream for inventories Signed-off-by: Avi Layani <alayani@redhat.com> * fix the changes dict initialiazation Signed-off-by: Avi Layani <alayani@redhat.com> --------- Signed-off-by: Avi Layani <alayani@redhat.com>
* [hop node] fix failing ci checks on feature_hop-node branch (#14226)Lila Yasin2023-08-291-1/+1
|
* Hop node AWX Collection Updates (#14153)Lila Yasin2023-08-291-0/+53
| | | | | | | | Add hop node support to awx collections - add peers and peers_from_control_nodes fields - show new node_type "hop" - add tests for adding hop nodes via collections Co-authored-by: Seth Foster <fosterseth@users.noreply.github.com>
* Only show the product version header when the requester is authenticated ↵Christian Adams2023-07-271-15/+0
| | | | (#14135)
* Changing how associations work in awx collection (#13626)John Westcott IV2023-07-172-2/+101
| | | | Co-authored-by: Alan Rominger <arominge@redhat.com> Co-authored-by: Jessica Steurer <70719005+jay-steurer@users.noreply.github.com>
* Use separate module for pytest settings (#13895)Alan Rominger2023-04-251-2/+6
| | | | | | | * Use separate module for test settings * Further refine some pre-existing comments in settings * Add CACHES to setting snapshot exceptions to accommodate changed load order
* remove redundant loopmatt2023-04-181-13/+12
|
* spaces for pep8matt2023-04-111-0/+1
|
* Merge branch 'devel' into collection-existential-state-for-credential-moduleMatthew Fernandez2023-04-102-1/+21
|\
| * add constructed kind to inventory moduleHao Liu2023-03-281-1/+3
| | | | | | | | | | | | | | | | - add kind 'constructed' to inventory module - add 'input_inventories' field to inventory module Co-authored-by: Rick Elrod <rick@elrod.me> Signed-off-by: Rick Elrod <rick@elrod.me>
| * Fix bug with awx collection manual type alias (#13671)Alan Rominger2023-03-201-0/+18
| | | | | | | | | | * Fix bug with manual type alias * Add unit test for creating manual project with path
* | add test coveragematt2023-03-231-0/+17
|/
* Merge pull request #13644 from fosterseth/inv_source_scm_branchSarah Akus2023-03-111-0/+1
|\ | | | | Add scm_branch to inventory source and inventory update
| * Add scm_branch to inventory source and inventory updateSeth Foster2023-03-071-0/+1
| | | | | | | | add scm_branch as optional field awxkit
* | Resolve id inventory and organization (#14)Seth Foster2023-03-081-1/+1
| |
* | add assertion to test on number of queries made (#9)Elijah DeLee2023-03-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * add assertions around access to resulting job there is a problem getting the job w/ the user that launched it add more assertions to bulk tests (#11) dig more into the results and assert on results also, use a fixture that already implemented the "max queries" thing fix ansible collection sanity tests (#12)
* | remove char_prompts and survey password from bulk jobNikhil2023-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix the api-lint fix the api-lint add the descrition to the bulk job launch module params add the description for the description field add the description for the description field add docs for the bulk api fix the models on the bulk api serializers fix some of the issues highlighted in the code review better use of role model remove comments better error message revert the PrimaryKeyRelatedField for unified_job_template and inventory
* | fixup return values for bulk launch and host create in awxkitElijah DeLee2023-03-082-0/+54
|/ | | | | | | | | | | | | | | | Enabled the params bulk job make black make black again Fixed inventory and organization input params for bulk modules add collection integration tests Fix cli return errors fix test completeness
* changing the signature of workflowapprovallistGabe Muniz2023-02-171-1/+1
| | | | included workflow approval as a read only endpoint to pass collection tests
* [collection] remove module defaults where API defaults are the same (#13037)Rick Elrod2023-02-011-1/+1
| | | | | | | | | | | | | | | | | | | Providing defaults for API parameters where the API already provides defaults leads to some confusing scenarios, because we end up always sending those collection-defaulted fields in the request even if the field isn't provided by the user. For example, we previously set the `scm_type` default to 'manual' and someone using the collection to update a project who does not explicitly include the `scm_type` every time they call the module, would inadvertently change the `scm_type` of the project back to 'manual' which is surprising behavior. This change removes the collection defaults for API parameters, unless they differed from the API default. We let the API handle the defaults or otherwise ignore fields not given by the user so that the user does not end up changing unexpected fields when they use a module. Signed-off-by: Rick Elrod <rick@elrod.me>
* Run collection sanity tests in CI (#13356)Alan Rominger2022-12-202-2/+2
| | | | | | | | | | | | | | | * 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
* Fix lookup plugins sanity (#13238)Jake Jackson2022-12-151-3/+3
| | | | | | | | | * fix pytz * fix NameError * fix tests and add sanity ignore files for import test until distutils replaced * change static method to regular method and update test to instantiate class
* [collection] Add 'instance' moduleRick Elrod2022-09-231-1/+0
| | | | Signed-off-by: Rick Elrod <rick@elrod.me>
* machinery to allow POSTing payloads to instances/ endpointSarabraj Singh2022-09-231-1/+2
|
* adding prompt-to-launch field on Labels field in Workflow Templates; with ↵Sarabraj Singh2022-09-221-1/+12
| | | | | | necessary UI and testing changes Co-authored-by: Keith Grant <keithjgrant@gmail.com>
* JT param everything (#12646)John Westcott IV2022-09-221-0/+24
| | | | | | | | * Making almost all fields promptable on job templates and config models * Adding EE, IG and label access checks * Changing jobs preferred instance group function to handle the new IG cache field * Adding new ask fields to job template modules * Address unit/functional tests * Adding migration file
* Adding subscriptions module and adding pool_id to license module (#12560)John Westcott IV2022-07-281-0/+1
|
* Allow modification of schedule if there are two of the same name (#12407)Tom Page2022-06-291-1/+14
|
* update awx collection workflow modulesean-m-sullivan2022-04-271-1/+1
|