11 Commits

Author SHA1 Message Date
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
AlanCoding
b90a296d41
Document and align the env var for OAuth token 2020-04-07 10:00:02 -04:00
Ryan Petrello
06b3e54fb1
remove python2 support from awxkit 2020-03-19 09:02:39 -04:00
Ryan Petrello
3e97608914
fix a human format bug for settings 2019-09-09 15:25:04 -04:00
Ryan Petrello
dbfe85da53
cli: fix a -f human formatting bug in py2
if we encounter non-strings in JSON responses, attempt to represent them
as JSON, instead of stringify-ing them (in py2, stringify-ing adds `u`
markers, which is confusing to users)
2019-09-04 11:10:12 -04:00
Ryan Petrello
1d2edc1d81
cli: fix a bug when printing complex data structures w/ -f human
see: https://github.com/ansible/awx/issues/4567
2019-08-26 12:41:35 -04:00
Ryan Petrello
44ff141c23
replace the (optional) tabulate dependency w/ a simple table printer 2019-08-21 15:54:47 -04:00
Ryan Petrello
80b4102aa9
support the new CLI in py2 *and* py3 2019-08-20 02:41:45 -04:00
Ryan Petrello
adaa4148c6
include awxkit CI in zuul runs
additionally, fix up some flake8 failures
2019-08-09 10:07:40 -04:00
Ryan Petrello
9616cc6f78
import awxkit
Co-authored-by: Christopher Wang <cwang@ansible.com>
Co-authored-by: Jake McDermott <jmcdermott@ansible.com>
Co-authored-by: Jim Ladd <jladd@redhat.com>
Co-authored-by: Elijah DeLee <kdelee@redhat.com>
Co-authored-by: Alan Rominger <arominge@redhat.com>
Co-authored-by: Yanis Guenane <yanis@guenane.org>
2019-08-08 22:12:31 -04:00