1
0
mirror of https://github.com/ansible/tower-cli.git synced 2026-02-06 09:47:55 +01:00

229 Commits

Author SHA1 Message Date
AlanCoding
fd051703b4 Update docs and tests for credential fixes 2019-10-25 08:58:11 -04:00
Pierre-Louis Bonicoli
1a0f47368d Check that admin roles with space are supported 2019-06-11 02:47:58 +02:00
jainnikhil30
8c0510c7ca change FullLoader to SafeLoader 2019-03-21 21:55:06 +05:30
jainnikhil30
ad2f1c9a92 change the FullLoader to SafeLoader 2019-03-21 21:06:39 +05:30
jainnikhil30
cf6dd45af0 remove whitespace 2019-03-21 16:12:34 +05:30
jainnikhil30
b31895723f add Loader=yaml.FullLoader to yaml.load, because of the deprecation. More info here h[Dttps://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation 2019-03-21 15:16:17 +05:30
Pierre-Louis Bonicoli
bb812d8a54 certificates test: fix compat with Python < 3.6
Error was:

    AttributeError: 'function' object has no attribute 'assert_called_once'

Thanks to Alan Rominger for this suggestion.
2019-03-19 19:13:37 +01:00
Pierre-Louis Bonicoli
ff19713e33 Ensure certificates are verified by default. 2019-02-06 03:55:41 +01:00
Kyle Fattig
3997c14a3c Fixed page numbering when using all-pages and format human 2019-01-16 10:57:43 -06:00
AlanCoding
40807fadf3 Make test not case-sensitive, fix failure 2019-01-02 11:19:30 -05:00
Yanis Guenane
b6550b6e8e qa: Rely on pytest rather than nosetests
AWX/Tower projects rely on pytest to run their test suite.

Luckily, pytest can run nosetest perfectly fine. In order to be as
coherent as posible with the ecosystem, it might be a good idea to run
pytest also in tower-cli.

Signed-off-by: Yanis Guenane <yguenane@redhat.com>
2018-09-20 10:40:32 +02:00
Alan Rominger
71de9de667 Merge pull request #561 from willthames/monitor_outfile
Improving writing job output to files
2018-07-11 20:26:34 -04:00
Will Thames
1b46f75782 Allow stdout to write to an output file
monitor has more functionality than we need just to obtain the stdout
results, whereas outputting stdout to a file would be helpful

Better document the stdout method

Ensure tests work
2018-07-06 09:21:47 +10:00
Pierre Roux
d3f2a8ba93 Add multiple statuses processed from the list cmd
This shortcut is handled using OR queries so that it respects
the original pagination and order of objects.

To achieve that, we had to remove the limitation of passing
identical query names to the params argument of the client
and to remove the related test.
2018-07-03 17:06:41 +00:00
adamscmRH
6a29cf012f update login error & docs 2018-06-29 13:08:00 -04:00
Alan Rominger
c9b983e691 Merge pull request #541 from AlanCoding/exposed_values
Use the click expose_value flag instead of popping off
2018-06-18 07:24:41 -04:00
AlanCoding
58210f9a3a use the click expose_value flag instead of poping off 2018-06-08 15:52:40 -04:00
John Westcott IV
2853f491c9 Fixing tower-cli execution on windows 2018-06-08 15:23:54 -04:00
John Westcott IV
2182f4cf76 Removed commented out testing functions for merge 2018-03-21 08:57:16 -04:00
John Westcott IV
d969bb9aa5 Fixed flake8 issues
(didn't realize tests need to adher as well)
2018-03-20 17:06:22 -04:00
John Westcott IV
07628f95a3 Initial tests commit 2018-03-20 16:56:13 -04:00
John Westcott IV
090da3fd3c Send/Receive feature PR
Added dependencies and related to POSSIBLE_TYPES

They are needed for the import functionality

i before e except after c

Fixed typo in receive

Added receive option

Changed classname from Destroyer to Cleaner

Added empty command

Added required=False to scm-type field.

This field is not required by the API to create a project

Removed items from export if managed_by_tower = True

Added credential_type to dependencies for a credential

This allows resoluation of a credential_type when importing a credential

Added send command

Missing __init__.py file

Added type parameter to cleaner

Send and Receive now can do json or yaml

Removed possible types, adding its items into resource objects

Changed how assets are specified for export

Added exception if nothing was passed in to process

Added all option to cleaner method

Fixed issue where properties added in the source were not caught as needed to be updated

Added send/recieve/empty docs

Updated help text for empty

Move removeEncryptedValues to common

Added deepclone of asset when determining if asset needs update

This fixed an issue when removing items in the asset that were later referenced

Fixed some issues when importing credentials

Added workflow nodes import/export

Initial commit of inventory groups/hosts/sources and fix for vault_creds in job_template

Updated API to strip off /api/vX if passed in as url

This allows you send URLs retreived from the API back into TowerCLI

Caught additional exception

If already parsed Java is passed in you could get a TypeError exception which was not caught.

Added notification types

Added workflow name to error message when extracting nodes

When this condition occurs the message is displayed but in a receive no details are present as to what workflow had the error

Added all_pages when requesting workflow_nodes

Allowed for multiple tokens to be saved in ~/.tower_cli_token.json

Added debug log if asset does not have POST options

Removed unused import and debug message

If an object does not have POST options, just return

Changed how errors are logged

Added project updates if asset was created or updated

Removed local_path from SCM based projects

Changed removal of encrypted values from asset to exported_asset

Added workflow inventory and credential resolution

Added inventory group import/export

Added additional credential types for export/import

Added options for passwords for new items

Variablized workdlow node types

Fixed workflow comparison

Spell checking

All post PR fixes for send/receive

Modified print statements for python3

Wrapped TowerCLI class in try

This should give us a better error when performing exports

Don't get source project if its None

Fixed user passwords

Moved projects before inventory

An inventory with a source from a project requires projects to be created first

Added inventory source_script resolution

Another change for comparing workflow nodes

Revert "Merge remote-tracking branch 'upstream/master'"

This reverts commit d8b0d2dbff2713a86aee4c7ca901d789b6e1d470, reversing
changes made to 87ea5d2c6118f797dd908404974e790df8e4059a.

Fixed unintended injection of documentation

Added todo

Removed comments for pull request

Removed commants on dropping format

Fixed bad merge

Updated for flake8

Added all_pages to lists

Better handeling of extra_vars

Multiple changes

Made empty take params like receive

Output of send and empty are now ansible-ish

Changed function name to python standards

Extracted 'work' into method for calling programatically

Fixed missing :

Fixed newline at end of file causing flake8 failure

removed closing #'s

Changed from passing on TypeError to continuing if not a string

Added min_value and max_value to list of known types

Changed from .prefix to .get_prefix()

Moved out touchup_extra_vars so that it applies to all asset_types

Fixed issue where tox was sending back a json_token of 'invalid' causing issues with the dict

Added missing POST endpoint

Use six for string compare
2018-03-14 13:52:04 -04:00
Ryan Petrello
4409178b12 support app tokens via docker login --client-id X --client-secret Y
see: https://github.com/ansible/tower-cli/issues/478
2018-03-13 17:12:54 -04:00
Ryan Petrello
74c48fde59 check for oauth2 support in Tower w/ HTTP HEAD, not GET 2018-03-07 16:44:31 -05:00
Ryan Petrello
99c059a18f test tower-cli login --scope 2018-03-07 16:33:50 -05:00
Ryan Petrello
8c3af6ef41 support authentication via oauth2 personal access tokens
see: https://github.com/ansible/tower-cli/issues/478
2018-03-07 15:07:51 -05:00
Ryan Petrello
e08fd58de8 remove support for old-style Tower Auth Tokens in 3.3 2018-02-28 13:29:59 -05:00
Alan Rominger
fba0239b65 Merge pull request #433 from AlanCoding/m2m
Use field for many-to-many relationships
2017-11-21 12:08:03 -05:00
Alan Rominger
c11a3ffe0d Merge pull request #432 from AlanCoding/more_unicode
cleaner handling of unicode
2017-11-21 12:07:29 -05:00
AlanCoding
58aab0af26 use field for many-to-many relationships 2017-11-06 08:36:00 -05:00
AlanCoding
bbad291259 cleaner handling of unicode 2017-11-03 11:21:33 -04:00
AlanCoding
9090c2be8f always read settings from environment 2017-11-03 10:39:59 -04:00
AlanCoding
4499345a40 improve version command, detect AWX 2017-10-17 22:47:43 -04:00
AlanCoding
86eb1ee9d9 fix copy error with extra_vars 2017-10-11 09:32:24 -04:00
Aaron Tan
34f8a8dd81 Handle extra-long words in printing debug log
The initial implementation does not take into consideration that some
words in a debug log might be longer than 75 characters, thus cause
infinite loop.

Signed-off-by: Aaron Tan <jangsutsr@gmail.com>
2017-10-04 16:09:22 -04:00
AlanCoding
85efb8b15a add resources for project/inv updates 2017-10-02 10:53:47 -04:00
Aaron Tan
2cb3141691 Audit changes needed in 3.2 for job resources
Audit against OPTIONS return of Tower 3.2 and make up any missing fields
for resources job_template, job, workflow and ad_hoc_command.

Signed-off-by: Aaron Tan <jangsutsr@gmail.com>
2017-09-28 16:27:53 -04:00
Alan Rominger
5600fbeed3 Merge pull request #367 from AlanCoding/no_teams
remove old version logic not needed in v2 API
2017-09-28 10:56:52 -04:00
AlanCoding
518065e6c4 remove the unusable job endpoint launch method 2017-09-27 14:59:54 -04:00
AlanCoding
cac7aae8b4 remove outdated org-proj association functions 2017-09-27 08:35:07 -04:00
AlanCoding
e9821d6db5 remove old version logic not needed in v2 API 2017-09-27 08:28:04 -04:00
John Miller
f5ff81068d add tests for associating and disassociating credentials from job_templates 2017-09-26 16:26:41 -05:00
AlanCoding
ab089566a1 Merge branch 'v1' into merge_v1 2017-09-19 13:31:02 -04:00
Alan Rominger
4a4f791669 Merge pull request #336 from AlanCoding/fix_bases
allow for multiple inheritances with click methods
2017-09-05 11:19:48 -04:00
Alan Rominger
2cff865174 Merge pull request #348 from AlanCoding/more_unicode
fix bug with format_human unicode
2017-09-05 11:16:35 -04:00
AlanCoding
c186e6f189 fix bug with format_human unicode 2017-09-02 15:46:07 -04:00
Edward Betts
91ad3c3435 correct spelling mistakes 2017-09-01 15:45:55 -04:00
Edward Betts
5efe3ac544 correct spelling mistakes 2017-08-30 20:37:46 +01:00
AlanCoding
b4c16b21e6 allow for multiple inheritances with click methods 2017-08-24 09:22:20 -04:00
Aaron Tan
e42073e24c Insights implementation 2017-07-24 13:08:18 -04:00