softwarefactory-project-zuul[bot]
ad07d31b9a
Merge pull request #9219 from mazhead/devel
...
Adding the scm_track_submodules option for project
SUMMARY
Adding the scm_track_submodules option which should fix the related #7846
ISSUE TYPE
Feature Pull Request
COMPONENT NAME
API
UI
AWX VERSION
awx: 17.0.1
ADDITIONAL INFORMATION
This option will add the track_submodules option which is described in the ansible git module: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/git_module.html
if yes, submodules will track the latest commit on their master branch (or other branch specified in .gitmodules). If no, submodules will be kept at the revision specified by the main project. This is equivalent to specifying the --remote flag to git submodule update.
Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Alan Rominger <arominge@redhat.com>
Reviewed-by: None <None>
Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
2021-04-15 17:28:41 +00:00
Jake McDermott
2c61e8f6de
Use built-in suppress from contextlib
...
In python3, we can use the built-in suppress from contextlib
https://docs.python.org/3/library/contextlib.html#contextlib.suppress
2021-04-12 14:47:50 -04:00
mazhead
c6eb7da68d
Adding the scm_track_submodules option which should fix the https://github.com/ansible/awx/issues/7846
...
Signed-off-by: mazhead <mazhead@gmail.com>
2021-04-12 16:22:23 +02:00
Shane McDonald
5df50066a6
Update version and changelog for version 19
2021-04-07 12:29:34 -04:00
Shane McDonald
8fb393c0a1
Fix awxkit function that detects private data directories in job args
2021-03-29 09:11:56 -04:00
Yanis Guenane
e04e4e8c85
Python: Bump to python 3.8
2021-03-24 21:02:32 +01:00
Ryan Petrello
c2ef0a6500
move code linting to a stricter pep8-esque auto-formatting tool, black
2021-03-23 09:39:58 -04:00
Ryan Petrello
23f2ac4cbc
Bump version to 18.0.0
...
Co-Authored-By: Shane McDonald <me@shanemcd.com>
Co-Authored-By: AlanCoding <arominge@redhat.com>
Co-Authored-By: Rebeccah Hunter <rhunter@redhat.com>
Co-Authored-By: Graham Mainwaring <graham@mhn.org>
Co-Authored-By: Jeff Bradberry <jeff.bradberry@gmail.com>
Co-Authored-By: beeankha <beeankha@gmail.com>
Co-Authored-By: Elyézer Rezende <elyezermr@gmail.com>
Co-Authored-By: Yanis Guenane <yguenane@redhat.com>
Co-Authored-By: Jim Ladd <jladd@redhat.com>
Co-Authored-By: Seth Foster <fosterbseth@gmail.com>
Co-Authored-By: Elijah DeLee <kdelee@redhat.com>
Co-Authored-By: Tiago Góes <tiago.goes2009@gmail.com>
Co-Authored-By: Yago Marques <yagomarquesja@gmail.com>
Co-Authored-By: shebangbash <ndasilva@redhat.com>
Co-Authored-By: Jake McDermott <jmcdermott@ansible.com>
Co-Authored-By: Christian Adams <rooftopcellist@gmail.com>
Co-Authored-By: nixocio <nixocio@gmail.com>
Co-Authored-By: Caleb Boylan <calebboylan@gmail.com>
2021-03-18 18:56:47 -04:00
Elijah DeLee
3562be8317
refactor payload construction for awxkit
...
This fixes container_group creation to allow passing
"is_container_group" and "credential" to the "create" method
on instance groups, and refactors other page objects
to use a common utility function to eliminate copy-pasted code
2021-03-17 10:40:00 -04:00
Elijah DeLee
88a91cfeba
pin websocket-client lib
...
They've made breaking changes that is going to take
some deeper investigation to update awxkit to use
This is only used for development purposes, and should
have not impact on the "awx" cli entry point
2021-03-04 11:09:32 -05:00
Rebeccah
0921de5d2b
adding needed url endpoint for copy functionality and the beginning of some testing that can be fleshed out more fully in later work
2021-03-03 18:52:55 -05:00
Elijah DeLee
05dded397d
make sure we use built in credential type
...
this way we can pass kind="registry" to akit creat method and
we get the correct built in type
2021-03-03 18:52:55 -05:00
Rebeccah
b1361c8fe2
edit original migration file, add blank string as acceptable to model
2021-03-03 18:52:55 -05:00
Rebeccah
20ee73ce73
default pull options for container images to None, also adding pull options to awxkit
2021-03-03 18:52:55 -05:00
Yago Marques
8ab7745e3a
WIP Inclusion of the EE option in the payloads within the Organization and Projects. ( #9145 )
...
* add ee option on factories for organizations
* add new lines
* remove inventory from the options
* remove line
* remove line from projects
* fix the tuple
* fix lint problems
2021-03-03 18:52:55 -05:00
Jeff Bradberry
e7bf81883b
Populate the EE name field in awxkit
2021-03-03 18:52:54 -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
Alan Rominger
54681eb055
Add utility method to get controller private_data_dir
2021-03-03 18:52:54 -05:00
Alan Rominger
9530c6ca50
Changes to get execution environments factories working ( #8126 )
2021-03-03 18:52:54 -05:00
Jeff Bradberry
c05e4e07ee
Expose execution environments in awxkit and awx-cli
2021-03-03 18:52:54 -05:00
Christian M. Adams
8d8aadb193
Bump version to 17.0.1 & update changelog
2021-01-26 12:35:14 -05:00
Ryan Petrello
c77ca928cc
Bump version to 17.0.0
2021-01-21 15:31:46 -05:00
Jeff Bradberry
a3723db357
Do not drop inventories marked as has_inventory_sources
2021-01-08 14:32:33 -05:00
Elijah DeLee
a157a3598f
silent_delete also needs to handle Confict
2021-01-08 10:55:55 -05:00
softwarefactory-project-zuul[bot]
98b25f619e
Merge pull request #9040 from kdelee/new_teardown_error
...
When deleting a job sometimes we get this error
Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2021-01-07 22:38:29 +00:00
Elijah DeLee
908291dd3c
When deleting a job sometimes we get this error
...
For the silent delete method, we should let this one slide
because it is an expected error that may occur if there are still
events processing.
2021-01-07 15:37:57 -05:00
Alan Rominger
d3c51ce75d
Minor organization clarity for workflow failure summary
2021-01-05 10:33:35 -05:00
Alan Rominger
9a16e9f787
Condense logic for handling null job
2021-01-05 10:26:38 -05:00
Alan Rominger
d79b96b6cc
Make workflow_job.assert_successful() give specifics
2021-01-05 10:15:32 -05:00
Ryan Petrello
5f6a383ebe
Bump version to 16.0.0
2020-12-10 12:12:51 -05:00
Alan Rominger
501cf297df
Apply more rigor to asserting text in stdout
2020-11-25 10:04:48 -05:00
Alan Rominger
91eff51390
Avoid invalid group characters in default inventory script factory
2020-11-18 10:16:08 -05:00
Elyézer Rezende
aae0b29008
Separate page object for config/attach endpoint
2020-10-30 16:40:02 -04:00
Christian M. Adams
67000f0ce9
Remove license_key check & fix docker-compose make command
2020-10-30 16:39:59 -04:00
Christian M. Adams
b609e4ee84
remove outdated license references
2020-10-30 16:39:58 -04:00
Ryan Petrello
4445d096f5
reimplement licensing to work with RHSM and entitlement uploads
...
Co-authored-by: Christian Adams <chadams@redhat.com>
2020-10-30 16:39:57 -04:00
Jeff Bradberry
607bc07887
Rework the export of full dependent objects
...
and include hosts and groups in the export.
2020-10-30 16:39:56 -04:00
Ryan Petrello
6097066cd8
Merge branch 'downstream' into devel
2020-10-26 09:32:00 -04:00
Ryan Petrello
c373d5307f
allow the CLI to associate Galaxy credentials to Organizations
...
$ awx organizations associate Default --galaxy_credential "Ansible Galaxy"
2020-10-21 09:39:33 -04:00
Ryan Petrello
67a5ad7dd6
Bump version to 15.0.1
2020-10-20 09:39:43 -04:00
softwarefactory-project-zuul[bot]
bad064b577
Merge pull request #8370 from ryanpetrello/fix-bad-extra-vars-warning
...
fix a confusing error message when extra vars aren't valid JSON/YAML
Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-10-12 20:17:15 +00:00
Ryan Petrello
0cdcbdfea6
fix a confusing error message when extra vars aren't valid JSON/YAML
...
see: https://github.com/ansible/awx/issues/8359
2020-10-12 12:56:13 -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
98b24cd2d8
Bump version to 15.0.0
2020-09-29 17:36:32 -04:00
softwarefactory-project-zuul[bot]
ef3a497c42
Merge pull request #8147 from ryanpetrello/py-path
...
move an optional import for awxkit
Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-09-15 19:32:26 +00:00
Ryan Petrello
1a533a2a23
move an optional import for awxkit
...
I'm not sure that this function is actually in use anywhere anymore, but
it shouldn't be a top-level import because it represents an optional
dependency.
2020-09-15 14:50:01 -04:00
Aggelos Kolaitis
b8cf644959
Add name
to StringIO object to fix failing test
2020-09-13 17:41:53 +03:00
Aggelos Kolaitis
9918b2581c
Support !import
and !include
in awx import -f yaml
command
2020-09-13 17:01:12 +03:00
Elyézer Rezende
ad85b176f4
Update awxkit to manage Org galaxy credentials
...
Add the new credential type to the Credential page object and helper
methods to manage the galaxy credentials for the Organization page
object.
2020-09-01 13:46:47 -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
04188aa2d6
Bump version to 14.1.0
2020-08-25 09:45:05 -04:00
Ryan Petrello
815d691622
clean up old authtoken support
...
just use Bearer tokens - those are the only type of tokens we support
2020-08-19 12:23:00 -04:00
softwarefactory-project-zuul[bot]
3ca43e63b5
Merge pull request #7808 from zedr/feat-yaml-import
...
Allow YAML as a CLI import format
Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-08-11 14:31:01 +00:00
Ryan Petrello
987c7d48a0
minor cleanup up CLI import -f yaml support
2020-08-11 09:44:13 -04:00
Rigel Di Scala
579604d2c6
Allow YAML as a CLI import format
...
This changset allows the import of YAML formatted resources. The CLI
user can indicate which format to use with the `-f, --format` option.
The CLI help text has been amended to reflect the new feature.
The AWX CLI `export` subcommand offers the option of formatting the output
as YAML or JSON, so it makes sense that the `import` subcommand reflects
this.
A simple test is also provided. In order to ease the task of testing
commands that import resources by reading the stdin, the CLI has been
extended to allow specifying an alternative file descriptor for stdin,
similarly to stdout and stderr.
2020-08-10 23:43:53 +02:00
softwarefactory-project-zuul[bot]
d48cc1ab43
Merge pull request #7847 from zedr/feat-workflow-labels
...
Export Workflow Job Template Node Labels
Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-08-10 17:27:21 +00:00
Rigel Di Scala
0beff054af
Export Workflow Job Template Node Labels
...
This change adds related Labels to the Workflow Job Template document that is
exported by the AWX CLI.
Previously, exporting and then importing Workflow Job Templates would
not retain their related Labels.
2020-08-10 12:56:52 -04:00
Rigel Di Scala
eeebd517d1
Fix early return in assign related method
...
This change fixes an erroneus early return in a private method that was
preventing more than one type of related object from being correctly
assigned to the parent object, and therefore imported.
Also, a minor spelling mistake was corrected.
2020-08-10 12:54:23 -04:00
Ryan Petrello
99e417d748
Bump version to 14.0.0
2020-08-05 16:22:03 -04:00
Rigel Di Scala
490746fe8c
Fix garbage being printed when exporting as YAML - related #7795
...
This resolves issue #7795 , by passing the `encoding` keyword argument
only when the code is run on a Python 2 interpreter.
related #7795 .
2020-08-03 11:57:45 -04:00
softwarefactory-project-zuul[bot]
c1bbeadf8d
Merge pull request #7427 from ryanpetrello/awxkit-install
...
update instructions and metadata for awxkit/cli installs
Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-06-23 22:23:56 +00:00
Ryan Petrello
b6c210ee97
update instructions and metadata for awxkit/cli installs
2020-06-23 17:53:14 -04:00
Graham Mainwaring
29da0abfc1
Don't traceback on KeyboardInterrupt
2020-06-23 16:14:02 -04:00
Elyézer Rezende
e80942f6cd
Update awxkit credential creation
...
Does not have an organization by default. Let `create_payload` decide if
it should be automatically created or not. This will avoid having more
than one owner when either user or team is passed to `create`.
2020-06-23 12:32:51 -04:00
softwarefactory-project-zuul[bot]
0aa23a7d63
Merge pull request #7379 from AlanCoding/release_13
...
Bump AWX version, after notable inventory deprecation
Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-06-23 15:55:57 +00:00
Jeff Bradberry
393369adec
First cut at examples of the import and export commands
2020-06-18 15:32:49 -04:00
AlanCoding
f76c57b1ec
Bump AWX version, after notable inventory deprecation
2020-06-18 15:10:10 -04:00
Jeff Bradberry
0fda9d2c56
Continue after failures to grant roles
2020-06-11 13:19:24 -04:00
Jeff Bradberry
bf6e8f8e83
Prioritize membership roles
...
since certain role grants will not be accepted by the api unless the user or team is part of the correct organization.
2020-06-10 15:27:15 -04:00
Jeff Bradberry
19b7c91486
Return the changed status of imports
2020-06-09 15:00:06 -04:00
Jeff Bradberry
aeeed4d371
Add more logging
2020-06-09 15:00:06 -04:00
Jeff Bradberry
1f7c1af64e
Fix WFJT nodes endpoint to return node pages when posting
...
not the node list page.
2020-06-09 15:00:06 -04:00
Jeff Bradberry
65fc2db42f
Recursively queue up related assets to be created and/or assigned
2020-06-09 14:59:49 -04:00
Jeff Bradberry
c8288af87f
Make sure we have a cached version of existing objects
...
even if it isn't an object being directly imported. We might need it
for relations of things that are being imported.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
76fb605dcd
Deal with exports involving foreign keys where you don't have permission
2020-06-09 13:54:05 -04:00
Jeff Bradberry
a531b85b31
Redo waiting until Project updates are complete
2020-06-09 13:54:05 -04:00
Jeff Bradberry
86afa5cf42
Make more use of the PageCache for imports
2020-06-09 13:54:05 -04:00
Jeff Bradberry
57aff6394c
Log an error and continue when a related object is not found
2020-06-09 13:54:05 -04:00
Jeff Bradberry
66bc947adb
Reuse _import_list for import of related full objects
...
e.g. WFJT Nodes. Also rename _import_list from _create_assets.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
301f15bfdd
Rename some things for consistency
2020-06-09 13:54:05 -04:00
Jeff Bradberry
9fc1a4bb44
Change the method that exports list views to take a PageList or TentativePage
...
This will allow the related m2m views to also use this method, with a
bit of effort. Also, remove the use of pk_or_name in favor of a new
method that reduces the number of api calls.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
f7825aefeb
Avoid doing an OPTIONS call unless we know it is a related type we export
2020-06-09 13:54:05 -04:00
Jeff Bradberry
14b5f63bd8
Use the new PageCache to store and reuse Page.get results
2020-06-09 13:54:05 -04:00
Jeff Bradberry
1300d38e47
Introduce a new PageCache object
...
and split out get_post_fields into its own utility function.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
bb66e4633d
Split _get_options into two pieces
2020-06-09 13:54:05 -04:00
Jeff Bradberry
201de4e18a
Attempt to deal with foreign keys that get mislabeled as type integer
...
such as through the use of DeprecatedCredentialField.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
471dc2babf
Deal with relations that we cannot resolve
...
such as due to a lack of permissions. If there is a foreign key to
something where we don't have sufficient read permissions, we now drop
the parent object from the export.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
6387258da1
Only wait for Project updates
...
not other kinds of objects that have a status.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
6958815f6e
Remove the $encrypted$ placeholders from export values
2020-06-09 13:54:05 -04:00
Jeff Bradberry
43b76f4575
Deal with unreadable mandatory foreign keys
...
by dropping the parent object. Also, clarify some of the warning log
messages.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
53d81d42cc
Hook up creation and attachment of related objects
2020-06-09 13:54:05 -04:00
Jeff Bradberry
385725e52a
Fix the _create_assets method to use _get_options
2020-06-09 13:54:05 -04:00
Jeff Bradberry
1b264011a2
Enable interconnections between WFJT Nodes
2020-06-09 13:54:05 -04:00
Jeff Bradberry
719f0b407c
Enable credential relations
...
but only when it is in an attach/detach list view.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
a5fa34bd3b
Fall back to parsing the OPTIONS description
...
to determine the needed fields for constructing an object.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
eb10a1873d
Drop objects that cannot be read or do not have a natural key
...
don't fail hard.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
ab15349c8c
Remove the NoNaturalKey error
...
It's too awkward, and it makes more sense to return None instead.
2020-06-09 13:54:05 -04:00