Jeff Bradberry
8c33d0ecbd
Add the mesh_visualizer resource to awxkit
2022-01-13 15:01:54 -05:00
sezanzeb
cbe612baa5
add credential file support
...
Signed-off-by: sezanzeb <proxima@sezanzeb.de>
2021-09-12 17:58:49 +02:00
Elijah DeLee
11e416995a
accept old env vars
...
this broke our build of the cli docs
2021-06-22 10:49:39 -04:00
Amol Gautam
b64c2d6861
Removed references to tower in InventorySource and Credentials
...
--- Removed reference to tower in InventorySource and InventoryUpdate model
--- Added a migration for above change
--- Added new CONTROLLER* variables in awx/main/models/credentials/__init__.py
--- Migrated awxkit to new CONTROLLER* variables
--- Updated the tests to use new CONTROLLER* variables
--- Fix some issues with upgrade path, rename more cases
2021-06-22 10:49:35 -04:00
Bill Nottingham
1e68519c99
Remove insights_credential from inventory
2021-06-22 10:49:33 -04:00
Elijah DeLee
b74990c480
allow singular execution_environment for cli
...
this makes "execution_environments" or "execution_environment" work
which is helpful
2021-05-25 11:28:47 -04:00
Bill Nottingham
c8cf28f266
Assorted renaming and string changes
2021-04-30 14:32:05 -04:00
Alan Rominger
38352063e8
Remove custom inventory script API
2021-04-22 08:36:46 -04: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
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
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
Aggelos Kolaitis
9918b2581c
Support !import and !include in awx import -f yaml command
2020-09-13 17:01:12 +03: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
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
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
Graham Mainwaring
29da0abfc1
Don't traceback on KeyboardInterrupt
2020-06-23 16:14:02 -04:00
Jeff Bradberry
393369adec
First cut at examples of the import and export commands
2020-06-18 15:32:49 -04:00
Jeff Bradberry
3860c7597f
Move the import logic into methods on the ApiV2 class
2020-06-09 13:54:05 -04:00
Jeff Bradberry
e4146e9bc7
Move the export logic onto methods on the ApiV2 class
...
making it easier to invoke programmatically.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
19c92a7055
Enable notification templates
2020-06-09 13:54:05 -04:00
Jeff Bradberry
6a9add4fe3
Deal somewhat reasonably with missing fields as part of the natural key
...
- JobTemplate.organization has recently been added, we need to support
with and without
- WorkflowJobTemplateNode is shortly going to get an identifier field,
and we will need to support both with and without
2020-06-09 13:54:05 -04:00
Jeff Bradberry
ad574eb896
Enable credential export
2020-06-09 13:54:05 -04:00
Jeff Bradberry
55f79a4569
Fix a couple of flaws
...
- The dependency ordering may spit out page types that weren't in the import data set. Make sure to be able to map those to resources anyway.
- freeze() needs to be able to deal with nullable foreign keys.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
d20fa03034
Create new Import.dependent_resources method
...
that yields up resource names, even ones that aren't explicitly in the
import data, in dependency order.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
868aafb263
Filter out managed credential types
...
since we cannot patch them upon import.
2020-06-09 13:54:05 -04:00
Jeff Bradberry
3f204659a8
Temporarily disable export of resources that may not work yet
2020-06-09 13:54:05 -04:00
Jeff Bradberry
ea5b810e87
Sort the asset groups to be imported by their dependency relationships
2020-06-09 13:54:04 -04:00
Jeff Bradberry
2c00d42ced
Only use a default password if an import user doesn't already exist
2020-06-09 13:54:04 -04:00
Jeff Bradberry
d191edcaf1
Fix a Python 2 syntax error
...
it doesn't like multiple **kwargs, apparently.
2020-06-09 13:54:04 -04:00
Jeff Bradberry
65e16dc7ae
Get and assign the related objects
2020-06-09 13:54:04 -04:00
Jeff Bradberry
95b22bf05b
Begin to deal with existing matching assets
...
by using a registry allowing the lookup of Page objects by (frozen)
natural keys.
2020-06-09 13:54:04 -04:00
Jeff Bradberry
21e36ad19a
Add the calculated natural key to the export data for each asset
2020-06-09 13:54:04 -04:00
Jeff Bradberry
f53920d3bf
Begin changing Import to work with the structure created by Export
2020-06-09 13:54:04 -04:00
Jeff Bradberry
372570ce8e
Extract out get_natural_key as a standalone function
2020-06-09 13:54:04 -04:00
Jeff Bradberry
6f28361bf5
Make serialize_asset use Pages to a greater extent
2020-06-09 13:54:04 -04:00
Jeff Bradberry
0877e5305c
Modify get_natural_key to work on Pages
2020-06-09 13:54:04 -04:00
Jeff Bradberry
e4383c505f
Make more use of the functionality of Page in get_assets
...
and related methods. Also, rename get_resource_options -> get_options
and enhance_asset -> serialize_asset.
2020-06-09 13:54:04 -04:00
Jeff Bradberry
fb066eb52e
Fold the other methods doing API calls into get_assets()
2020-06-09 13:54:04 -04:00
Jeff Bradberry
6162ff0439
Start to record the role membership
...
but not really, since it still isn't fully capturing the role content_object
2020-06-09 13:54:04 -04:00
Jeff Bradberry
dfe34563aa
Resolve the natural keys of assets we've already collected
2020-06-09 13:54:04 -04:00
Jeff Bradberry
37cbf7691b
Split out separate methods for the OPTIONS call and massaging each asset dict
2020-06-09 13:54:04 -04:00
Jeff Bradberry
9280198b0f
Use a list of exportable resources to build up the parser
...
Also, handle an implicit export of everything.
2020-06-09 13:54:04 -04:00
Jeff Bradberry
2127f3c96d
Add organizations as a resource type to export
2020-06-09 13:54:04 -04:00
Jeff Bradberry
9f7fecf8da
Add basic import command
2020-06-09 13:54:04 -04:00
Jeff Bradberry
c1a07ff00b
Limit export output to only those fields needed to create the resource
2020-06-09 13:54:04 -04:00
Jeff Bradberry
f21d6b1fc4
Actually query the API for the user or users requested
2020-06-09 13:54:04 -04:00
Jeff Bradberry
4312395a3a
Normalize the requested resource into a pk
...
using the pk_or_name helper function. Also, authenticate to the API.
2020-06-09 13:54:04 -04:00
Jeff Bradberry
c1f6fec532
Add skeleton of a custom 'export' resource
...
This only takes a flag for users at the moment, and does nothing in
particular with it.
2020-06-09 13:54:04 -04:00
Francois Herbert
d0384799fd
Add ability to monitor jobs and workflow_jobs via awx cli, fixes #6165
...
Signed-off-by: Francois Herbert <francois@herbert.org.nz>
Fixup linting
Remove timeout option, not really required and it's making the api test fail
2020-04-27 15:09:16 -04:00