Commit graph

23 commits

Author SHA1 Message Date
Matt Clay
4554e8d769 Remove unnecessary shebangs and execute bits. 2017-02-22 18:13:46 -08:00
Toshio Kuratomi
1786c81a65 Previous fix to this failed to account for open_url returning a filehandle (#20097)
* Previous fix to this failed to account for open_url returning a filehandle

Fixes the bugs introduced by c6fb355

* read() from HTTPError for python-3.6+

HTTPError is funny.  It contains a filehandle to read the response from
and also makes it available via a read() method.  On earlier versions of
python (2 and 3) the read() method was enough to make it work with
json.load().  The newer version of json.load() needs a more complete
file interface than this and has stopped working.  Read the bytes,
transform to str and pass it in manually to fix it.
2017-01-10 18:14:20 -08:00
Toshio Kuratomi
c6fb355b58 Convert all results from open_url() into text before deserializing the json. (#20069)
Fixes #20012
2017-01-10 08:35:08 -08:00
Monty Taylor
bd9ca5ef28 Allow setting alternate_role_name for galaxy CLI (#17418)
When using the ansible-galaxy CLI to import roles, it's not possible to
specify an alternate_role_name, even though the REST API seems to allow
such a thing (at least on investigation of the interactions the web app
makes) That makes importing things like:
openstack/openstack-ansible-os_cloudkitty wind up with roles named
"openstack-ansible-os_cloudkitty" instead of "os_cloudkitty".

Also, the web ui is smart and imports
"openstack-infra/ansible-role-puppet" as openstack-infra.puppet ... but
the CLI imports it as openstack-infra.ansible-role-puppet. Add that
filtering as well.

Issue ansible/galaxy-issues:#185
2016-10-27 22:34:59 -04:00
Chris Houseknecht
77de83730d Add warnings when installing container type roles 2016-10-09 14:38:40 -04:00
Toshio Kuratomi
4ed88512e4 Move uses of to_bytes, to_text, to_native to use the module_utils version (#17423)
We couldn't copy to_unicode, to_bytes, to_str into module_utils because
of licensing.  So once created it we had two sets of functions that did
the same things but had different implementations.  To remedy that, this
change removes the ansible.utils.unicode versions of those functions.
2016-09-06 22:54:17 -07:00
Toshio Kuratomi
44d979c8f5 Enable most unittests on python3 (just some vault unittests and a logging one left) (#17240)
Make some python3 fixes to make the unittests pass:

* galaxy imports
* dictionary iteration in role requirements
* swap_stdout helper for unittests
* Normalize to text string in a facts.py function
2016-08-25 07:30:03 -07:00
Toshio Kuratomi
a22909c226 Migrate basestring to a python3 compatible type (#17199) 2016-08-23 13:13:44 -07:00
s-hertel
7e834f4178 Fixes #163 in galaxy-issues 2016-07-21 14:04:17 -04:00
Brian Coca
2a984bbc98 much more fine grained error messages
fixes #16039
2016-06-06 11:48:16 -04:00
Brian Coca
011320793b moved validate info from vvv to debug 2016-05-27 09:45:10 -04:00
Chris Houseknecht
2261b2e59a Fix missing ignore_certs (#16018) 2016-05-27 09:39:00 -04:00
Brian Coca
941564b366 API now connects to server lazily (#15632)
This should fix most issues with offline operation.

Fixes #14486
Fixes #13991

Alternate to #15363 and #15593
2016-04-28 23:28:02 -04:00
chouseknecht
42b2077c93 Fix bug 14715: Galaxy CLI paging error 2016-02-29 21:21:32 -05:00
chouseknecht
342dee0023 Define and handle ignore_certs correctly. Preserve search term order. Tweak to Galaxy docsite. 2015-12-13 05:23:04 -05:00
chouseknecht
4f84769a17 Galaxy 2.0 2015-12-09 10:51:12 -05:00
Toshio Kuratomi
8aa2cbd647 Fix traceback because we're using display from another object that no
longer has it.
2015-11-11 12:19:00 -08:00
Toshio Kuratomi
f34b55ac2b Add python3-compat boilerplate to all .py files in lib/ansible 2015-10-19 18:36:19 -07:00
chouseknecht
8360a1b3f2 Replace categories with tags.
Also added --ignore-certs option for use with install and search commands. Helpful when
overriding server and server has self signed cert.
2015-09-30 13:36:17 -04:00
Toshio Kuratomi
3db8070aa3 Fix urlopen usage to use open_url instead
Add a travis test for urlopen usage
2015-09-16 20:40:17 -07:00
Brian Coca
6ffd9c3025 draft galaxy cli search
TODO: paging results
2015-08-22 02:28:27 -04:00
Brian Coca
08e981b9f4 corrected api permissions 2015-07-01 11:12:10 -04:00
James Cammarata
ce3ef7f4c1 Making the switch to v2 2015-05-03 21:47:26 -05:00
Renamed from v2/ansible/galaxy/api.py (Browse further)