Commit Graph

91 Commits (ffa4f0c427e9a3ab2af442f71a7616e5fa5ccd60)

Author SHA1 Message Date
Toshio Kuratomi eb1214baad New metadata 1.0 (#22587)
Changes to the metadata format were approved here:
https://github.com/ansible/proposals/issues/54
* Update documentation to the new metadata format
* Changes to metadata-tool to account for new metadata
  * Add GPL license header
  * Add upgrade subcommand to upgrade metadata version
  * Change default metadata to the new format
  * Fix exclusion of non-modules from the metadata report
* Fix ansible-doc for new module metadata
* Exclude metadata version from ansible-doc output
* Fix website docs generation for the new metadata
* Update metadata schema in valiate-modules test
* Update the metadata in all modules to the new version
2017-03-14 09:07:22 -07:00
Matt Martz 6e8e90ceb4 Warn when using the deprecated HEADER_ arguments (#20236)
* Make sure the uri module warns about using the deprecated HEADER_ arguments, so that we can actually deprecate in a future version

* Use module.deprecate

* No need to de-dupe ourselves, looks like it is done somewhere I didn't initially see
2017-03-01 11:35:48 -05:00
Benjamin JOLIVOT 9baf95bcc4 Add status_code & failed:false when status==200 (#21457)
* Add status_code & failed:false when status==200

* remove failed=false, it's broking tests
2017-02-15 14:30:06 -08:00
Peter Sprygada 48b02336ab code clean of old code from network modules updates (#21469)
* removes unused code
* removes module_utils/local.py
* removes plugins/action/network.py
* removes action_handler from connection plugins
* removes code to use action_handler in task_executor
* updates action plugins to subclass from normal
2017-02-15 12:46:30 -05:00
caio2k 2505d56401 removed deprecated HEADER_* from examples (#21395)
Even though the documentation says that HEADER_* parameter is deprecated, the examples still show its usage.
2017-02-14 14:31:12 -05:00
Tim Rupp 0fcc6edf2b Replace expanduser with type path
This patch removes the use of expanduser and replaces it with
type 'path' for the option. This is related to #12263.
2017-02-13 11:15:13 -05:00
Scott Peshak 467fde5644 Correct typo in net_command docs (#20976) 2017-02-04 08:53:11 +01:00
Matt Martz 829c0b8f62 Update validate-modules (#20932)
* Update validate-modules

* Validates ANSIBLE_METADATA
* Ensures imports happen after documentation vars
* Some pep8 cleanup

* Clean up some left over unneeded code

* Update modules for new module guidelines and validate-modules checks

* Update imports for ec2_vpc_route_table and ec2_vpc_nat_gateway
2017-02-02 11:45:22 -08:00
Matt Clay cb76200c7d PEP 8 E111 & E114 cleanup. (#20838) 2017-01-30 15:01:47 -08:00
Matt Clay d913f69ba1 PEP 8 W291 whitespace cleanup. 2017-01-27 17:08:02 -08:00
Michael Scherer 809aa7a653 Do not leak uri password in logs (#20427) 2017-01-19 11:23:53 -08:00
Matt Martz 8928adf62e Updates uri to use six for isinstance comparison for py3 compatibility (#20239) 2017-01-13 13:16:21 -06:00
Matt Martz d25a70846f Only add Content-Type if not specified in headers. Fixes #20046 (#20234)
* Only add Content-Type if not specified in headers. Fixes #20046

* Update documentation to indicate body_format will not override Content-Type if specified in headers
2017-01-13 13:19:38 -05:00
John R Barker 8fe09d4ea9 net_command: formatting (#20121)
* net_command: formatting

* Update net_command.py
2017-01-11 08:22:19 +00:00
Toshio Kuratomi 08d6990e67 Fix code-blocks to use correct syntax highlighting 2017-01-08 09:18:45 -08:00
Peter Sprygada 2a5a2773c8 adds new module net_command for network devices (#19468)
* new module net_command for sending a command to a network device
* adds unit test cases for module
* only works with connection=network_cli
2016-12-19 11:21:37 -05:00
James Cammarata 8afa090417 Resolving differences in core modules post-merge 2016-12-08 11:25:36 -05:00
Toshio Kuratomi 7319104552 Refreshed metadata for core modules 2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati e49667d94c Unquote urls in YAML - network (#5792) 2016-12-08 11:25:34 -05:00
Dag Wieers c22e383836 Ensure proper error when fetch_url returns status -1
When using a file:// or ftp:// URL the normal provisions that a non-200 status code means error have been disabled.
But the common error status -1 from fetch_url is not properly returning an error message.
This fix ensures that if the status code returns -1, we return a proper error message.

This fixes #3563
2016-12-08 11:25:32 -05:00
Sam Doran 895179929c Examples syntax batch6 (#5623)
* Change example syntax on os_auth module

* Change example syntax on os_client_config module

* Change example syntax on os_image_facts module

* Change example syntax on os_networks_facts module

* Change example syntax on os_nova_flavor module

* Change example syntax on os_object module

* Change example syntax on os_server module

* Change example syntax on os_subnet_facts module

* Change example syntax on rax_files module

* Change example syntax on rax_files_objects module

* Change example syntax on mysql_db module

* Change example syntax on file module

* Change example syntax on uri module

* Change example syntax on cl_bond module

* Change example syntax on cl_bridge module

* Change example syntax on cl_img_install module

* Change example syntax on cl_interface module

* Change example syntax on cl_license module

* Change example syntax on cl_ports module

* Remove trailing colon
2016-12-08 11:25:31 -05:00
Toshio Kuratomi 38b3c43c68 Fix uri for change in case in response
In python3, response fields are title cased whereas in python2 they were
not.  We return these fields to the module's caller so we need to
normalize all of them to be lower case.

This reverts the lowercase check from 454f741ef5b56cccd123e12d7b2e6fe31d47c755
as that one was only targetted as a single field.
2016-12-08 11:25:24 -05:00
Toshio Kuratomi bd9e790cfe First set of fixes for uri module to work with py3.
This fix handles changes in the response headers (no longer all
lowercased) and switches from unicode() to to_text().
2016-12-08 11:25:24 -05:00
John R Barker 25b6492d37 Bulk spelling improvement to modules-core (#5225)
* Correct spelling mistakes

* Correct more spelling issues

* merge conflict

* Revert typo in parms
2016-12-08 11:25:20 -05:00
Martin Matuška 3366a95765 Force download if checksums do not match (#4262) 2016-12-08 11:25:04 -05:00
afunix f2c324facc Updated get_url module to process FTP results correctly [#3661] (#4601) 2016-12-08 11:25:02 -05:00
Michael Scherer b48e65219b Fix uri to run on python3 (#4580)
Since dict no longer have a method iteritems, we have to use
the six wrapper.
2016-12-08 11:24:56 -05:00
Timothy Appnel 5b00b40c22 Fixes get_url examples in docs and applies native YAML syntax. (#4474) 2016-12-08 11:24:55 -05:00
Roman 7b547e3e0b get_url headers param values parsing (#4245) 2016-12-08 11:24:49 -05:00
Brian Coca 01490688f4 document that get_url also takes file params
has for a long time, but was never documented, mode,group, owner can all be set here
2016-12-08 11:24:37 -05:00
Brian Coca 34b94ec4c4 Revert "Add mode option to the list" (#3946) 2016-12-08 11:24:37 -05:00
Victor Bocharsky 6037684d23 Add mode option to docstring for get_url (#3630)
Add mode option to the list
2016-12-08 11:24:37 -05:00
jctanner 48f096b52c Use the six import for urlsplit instead of importing directly. (#3902)
Fixes https://github.com/ansible/ansible/issues/16191
2016-12-08 11:24:36 -05:00
Toshio Kuratomi 79d12db02f Fix the six import 2016-12-08 11:24:35 -05:00
Toshio Kuratomi 8ba0af5df3 Be sure to import urllib.parse from somewhere 2016-12-08 11:24:35 -05:00
Michael Scherer c0217e14a7 Convert the network subfolder to py3/py2.4 syntax (#3690) 2016-12-08 11:24:29 -05:00
Brian Coca ca7defeee5 made note about slurp memory consumption 2016-12-08 11:24:27 -05:00
James Cammarata 124c4b94c1 Remove extraneous debug stuff from uri module left over from testing 2016-12-08 11:24:23 -05:00
James Cammarata 50cd8b0aa5 Make sure uri output contains json output when a non-200 status is returned
Prior to the switch to the urls.py code, non-200 responses contained
a 'json' value when the content-type was JSON. This fix restores that
field upon a non-2xx response.

Fixes ansible/ansible#15555
2016-12-08 11:24:23 -05:00
jctanner 56f5ca37af Fix status check on get_url with file schemas and update the examples. (#3512)
Addresses #3511
2016-12-08 11:24:20 -05:00
Toshio Kuratomi 6fae6c7b2d Give headers a default so that we can add to it. 2016-12-08 11:24:14 -05:00
Toshio Kuratomi 4c9f9973dd If file attribs are specified set them even if file already exists.
Fixes #11821
2016-12-08 11:24:13 -05:00
Matt Martz fe22ee9423 Don't pass follow_redirects to fetch_url, use module.params instead 2016-12-08 11:24:10 -05:00
Toshio Kuratomi 9551e51607 At least for now, set body to raw as it can be either a dict or jsonified-str
Since our validation does conversion as well as validation, I'm not sure
this is entirely correct.  May need to take a look at our conversion
code and re-examine to be sure we're doing it right.
2016-12-08 11:24:08 -05:00
Toshio Kuratomi 0400efa3f8 Change parameter to type=path
Read as binary for python3 preparedness
2016-12-08 11:24:08 -05:00
Michael Scherer 776d079e6b Fix non RFC 2606 domain name in doc 2016-12-08 11:24:08 -05:00
Matt Martz fada638d88 Indicate in notes that the dependency on httplib2 was removed for v2.1 2016-12-08 11:24:07 -05:00
Matt Martz a18206355a Drop dependency on httplib2 in the uri module, instead using ansible.module_utils.urls 2016-12-08 11:24:07 -05:00
Brian Coca 5b07831a11 fixes for uri module
- clarify docs on body_json behaviour
- only tranform into json if body input is not a string
  users keep passing json string and expecint it to not be jsonified again
- fixed issue with removes not handling path expansion correctly
- switched all path variables to 'type path' to handle expansions
2016-12-08 11:24:05 -05:00
Michal Svab 0676ecc03c Clarify get_url timeout documentation 2016-12-08 11:24:03 -05:00