Commit Graph

245 Commits (22c1c5ffcb155eea392b972fd90c35c7b85aebcd)

Author SHA1 Message Date
Toshio Kuratomi da26ba3760 Documentatin fixes 6 years ago
Toshio Kuratomi c4951cce0b Exorcise Python-2.6 6 years ago
Will Smith 2de692348f change raising errors example to raise error (#43664)
Example instantiates an AnsibleError which derives from Exception but doesn't actually raise it like intended. This is misleading as it's not clear without examining the code for AnsibleError to know that it's not some function which would raise the exception automatically.
6 years ago
Andreas Olsson 1a11cecaef Prefer https:// links in the docs site
All the changed urls are availible by way of https://. Most of them
already redirect.
6 years ago
Matt Martz 01c0446cb5
Add AnsibleModule signature schema, and fix associated issues (#43512) 6 years ago
Matt Clay 4e489d1be8
Update Shippable integration test groups. (#43118)
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
6 years ago
Brian Coca a37f27a243 removed note from already removed 1.x api comment
fixes #39888
6 years ago
Sachidananda Urs fecda03066 Fix typos in documentation (#42406)
Fix typos in unit test documentation

Fixes:  #42405
6 years ago
Brian Coca 475abc0af7
inventory plugin docs (#42022)
* inventory plugin docs
* added set options
* minor wording and formatting fixes
* changed headers to std as per #35520, also added to main readme
* unified inventory plugin devel, referenced from generic plugin dev
* fixed typos and update as per feedback
6 years ago
John R Barker 6366df700d Document module links (#42308) 6 years ago
John R Barker d962611528 Allow documentation of module options type (#42285)
* Allow documentation of module options

Pass through the `type` of a modules option so it's displayed on the
html module docs

* docs
6 years ago
Troy Murray 15ce7c5bab change OS X to macOS (#41294)
* change OS X to macOS

<!--- Your description here -->

+label: docsite_pr

* Update all Mac OS X references to be macOS

* Drop extra Mac
6 years ago
Andrea Tartaglia a342538aba Add shell out checks (#41545)
* Added error codes for shell_out checks

* Added ignore lines for allowed Modules

* Added shell out checks

* Fixed pep8

* Updated regex to only match subprocess.Popen

* Added failing modules to ignore.txt

* Wrong postgresql module in ignore.txt

* Removed bigip from ignore.txt
6 years ago
Abhijeet Kasurde 27b85e732d Argument spec must be dict/hash (#40858)
validate-modules should fail when argument is not dict/hash.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Matt Clay 70c475da6c Implement new changelog generator. 6 years ago
Sam Doran 8746d9ef87 Add guidelines on developing lookup plugins (#38681) 6 years ago
Matt Clay 8d39515914 Remove tab check from validate-modules.
It is redundant with the pycodestyle W191 "indentation contains tabs" check.
6 years ago
Simon fb6ae90f60 Memset: initial module, integration tests, module_utils and supporting documentation. (#40071)
*  * Memset:
   * module_utils and associated documentation.
   * module to manage DNS zones.
   * integration tests to run against Memset's API.

* * memset.py:
  * remove import of requests from memset.py in favour of internal Ansible modules.
  * import necessary Ansible modules for request and response handling.
  * create a response object in order to retain a stable interface to memset_api_call from existing modules.
  * rework memset_api_call to remove requests.
* memset_zone.py:
  * improve short description to be more verbose.
  * ensure all imports directly follow documentation.
  * remove any reference to requests.
  * correct keyerror carried over from elsewhere.

* remove dependency on requests from documentation string

* disable integration tests until we have a cleanup method available
6 years ago
Jon Dufresne 1d640182c6 Update all pypi.python.org URLs to pypi.org (#38988)
For details on the new PyPI, see the blog post:

https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html
6 years ago
Ken Celenza e476089bb9 spacing issue (#39884) 6 years ago
Matt Martz 1663b64e18
Allow subspec defaults to be processed when the parent argument is not supplied (#38967)
* Allow subspec defaults to be processed when the parent argument is not supplied

* Allow this to be configurable via apply_defaults on the parent

* Document attributes of arguments in argument_spec

* Switch manageiq_connection to use apply_defaults

* add choices to api_version in argument_spec
6 years ago
Kevin Breit c8d287fece Meraki organization module (#38773)
* Initial commit

Query an organization within Meraki. No support is in place for managing
or creating yet

* Change output_level method and make the state parameter required.

* Implemented listing all organizations

- Updated documentation
- Parse results and return all organizations
- Parse results and return specified organization

* Framework for creating an organization

- Documentation example for organization creation
- Framework exists for creating organizations, pending PR 36809
- Created functions for HTTP calls
- Renamed from dashboard.meraki.com to api.meraki.com
- Added required_if for state

* Remove absent state

- Meraki API does not support deleting an organization so absent is removed
- Updated documentation to call it state instead of status

* Small change to documentation

* Support all parameters associated to organization

- Added all parameters needed for all organization actions.
- None of the added ones work at this time.
- Added documentation for clone.

* Integration test for meraki_organization module

* Rename module to meraki for porting to module utility

* Meraki documentation fragment

- Created initial documentation fragment for Meraki modules

* Add meraki module utility to branch. Formerly was on a separate branch.

* CRU support for Meraki organization module

* CRU is supported for Meraki organizations
* There is no DELETE function for organizations in the API
* This code is very messy and needs cleanup
* Create and Update actions don't show status as updated, must fix

* Added Meraki module utility to module utility documentation list

* Added support for organization cloning
* Renamed use_ssl to use_https
* Removed define_method()
* Removed is_org()
* Added is_org_valid() which does all org sanity checks

* Fixes for ansibot
- Changed default of use_proxy from true to false
- Removed some commented out code
- Updated documentation

* Changes for ansibot
- Removed requirement for state parameter. I may readd this.
- Updated formatting

diff --git a/lib/ansible/module_utils/network/meraki/meraki.py b/lib/ansible/module_utils/network/meraki/meraki.py
index 3acd3d1038..395ac7c4b4 100644
--- a/lib/ansible/module_utils/network/meraki/meraki.py
+++ b/lib/ansible/module_utils/network/meraki/meraki.py
@@ -42,7 +42,7 @@ def meraki_argument_spec():
     return dict(auth_key=dict(type='str', no_log=True, fallback=(env_fallback, ['MERAKI_KEY'])),
                 host=dict(type='str', default='api.meraki.com'),
                 name=dict(type='str'),
-                state=dict(type='str', choices=['present', 'absent', 'query'], required=True),
+                state=dict(type='str', choices=['present', 'absent', 'query']),
                 use_proxy=dict(type='bool', default=False),
                 use_https=dict(type='bool', default=True),
                 validate_certs=dict(type='bool', default=True),
diff --git a/lib/ansible/modules/network/meraki/meraki_organization.py b/lib/ansible/modules/network/meraki/meraki_organization.py
index 923d969366..3789be91d6 100644
--- a/lib/ansible/modules/network/meraki/meraki_organization.py
+++ b/lib/ansible/modules/network/meraki/meraki_organization.py
@@ -20,11 +20,9 @@ short_description: Manage organizations in the Meraki cloud
 version_added: "2.6"
 description:
 - Allows for creation, management, and visibility into organizations within Meraki
-
 notes:
 - More information about the Meraki API can be found at U(https://dashboard.meraki.com/api_docs).
 - Some of the options are likely only used for developers within Meraki
-
 options:
     name:
         description:
@@ -32,21 +30,18 @@ options:
         - If C(clone) is specified, C(name) is the name of the new organization.
     state:
         description:
-        - Create or query organizations
-        choices: ['query', 'present']
+        - Create or modify an organization
+        choices: ['present', 'query']
     clone:
         description:
         - Organization to clone to a new organization.
-        type: string
     org_name:
         description:
         - Name of organization.
         - Used when C(name) should refer to another object.
-        type: string
     org_id:
         description:
         - ID of organization
-
 author:
     - Kevin Breit (@kbreit)
 extends_documentation_fragment: meraki
@@ -86,7 +81,6 @@ RETURN = '''
 response:
     description: Data returned from Meraki dashboard.
     type: dict
-    state: query
     returned: info
 '''

@@ -103,6 +97,7 @@ def main():
     argument_spec = meraki_argument_spec()
     argument_spec.update(clone=dict(type='str'),
+                         state=dict(type='str', choices=['present', 'query']),
                          )

@@ -125,11 +120,9 @@ def main():

     meraki.function = 'organizations'
     meraki.params['follow_redirects'] = 'all'
-    meraki.required_if=[
-                           ['state', 'present', ['name']],
-                           ['clone', ['name']],
-                           # ['vpn_PublicIP', ['name']],
-                       ]
+    meraki.required_if = [['state', 'present', ['name']],
+                          ['clone', ['name']],
+                          ]

     create_urls = {'organizations': '/organizations',
                    }
@@ -162,23 +155,16 @@ def main():

-
-    # method = None
-    # org_id = None
-
-
-    # meraki.fail_json(msg=meraki.is_org_valid(meraki.get_orgs(), org_name='AnsibleTestOrg'))
-
     if meraki.params['state'] == 'query':
-      if meraki.params['name'] is None:  # Query all organizations, no matter what
-        orgs = meraki.get_orgs()
-        meraki.result['organization'] = orgs
-      elif meraki.params['name'] is not None:  # Query by organization name
-        module.warn('All matching organizations will be returned, even if there are duplicate named organizations')
-        orgs = meraki.get_orgs()
-        for o in orgs:
-          if o['name'] == meraki.params['name']:
-            meraki.result['organization'] = o
+        if meraki.params['name'] is None:  # Query all organizations, no matter what
+            orgs = meraki.get_orgs()
+            meraki.result['organization'] = orgs
+        elif meraki.params['name'] is not None:  # Query by organization name
+            module.warn('All matching organizations will be returned, even if there are duplicate named organizations')
+            orgs = meraki.get_orgs()
+            for o in orgs:
+                if o['name'] == meraki.params['name']:
+                    meraki.result['organization'] = o
     elif meraki.params['state'] == 'present':
         if meraki.params['clone'] is not None:  # Cloning
             payload = {'name': meraki.params['name']}
@@ -193,7 +179,10 @@ def main():
             payload = {'name': meraki.params['name'],
                        'id': meraki.params['org_id'],
                        }
-            meraki.result['response'] = json.loads(meraki.request(meraki.construct_path('update', org_id=meraki.params['org_id']), payload=json.dumps(payload), method='PUT'))
+            meraki.result['response'] = json.loads(meraki.request(meraki.construct_path('update',
+                                                                                        org_id=meraki.params['org_id']),
+                                                                  payload=json.dumps(payload),
+                                                                  method='PUT'))

diff --git a/lib/ansible/utils/module_docs_fragments/meraki.py b/lib/ansible/utils/module_docs_fragments/meraki.py
index e268d02e68..3569d83b99 100644
--- a/lib/ansible/utils/module_docs_fragments/meraki.py
+++ b/lib/ansible/utils/module_docs_fragments/meraki.py
@@ -35,6 +35,7 @@ options:
         description:
         - Set amount of debug output during module execution
         choices: ['normal', 'debug']
+        default: 'normal'
     timeout:
         description:
         - Time to timeout for HTTP requests.
diff --git a/test/integration/targets/meraki_organization/aliases b/test/integration/targets/meraki_organization/aliases
new file mode 100644
index 0000000000..ad7ccf7ada
--- /dev/null
+++ b/test/integration/targets/meraki_organization/aliases
@@ -0,0 +1 @@
+unsupported

* Formatting fix

* Minor updates due to testing
- Made state required again
- Improved formatting for happier PEP8
- request() now sets instance method

* Fix reporting of the result

* Enhance idempotency checks
- Remove merging functionality as the proposed should be used
- Do check and reverse check to look for differences

* Rewrote and added additional integration tests. This isn't done.

* Updated is_update_required method:
- Original and proposed data is passed to method
- Added ignored_keys list so it can be skipped if needed

* Changes per comments from dag
- Optionally assign function on class instantiation
- URLs now have {} for substitution method
- Move auth_key check to module utility
- Remove is_new and get_existing
- Minor changes to documentation

* Enhancements for future modules and organization
- Rewrote construct_path method for simplicity
- Increased support for network functionality to be committed

* Changes based on Dag feedback and to debug problems

* Minor fixes for validitation testing

* Small changes for dag and Ansibot
- Changed how auth_key is processed
- Removed some commented lines
- Updated documentation fragment, but that may get reverted

* Remove blank line and comment

* Improvements for testing and code simplification
- Added network integration tests
- Modified error handling in request()
	- More testing to come on this
- Rewrote construct_path again. Very simple now.

* Remove trailing whitespace

* Small changes based on dag's response

* Removed certain sections from exit_json and fail_json as they're old
6 years ago
Alicia Cozine c8a9b411bc
Last docs link fixes (#39391)
* should not need <>, but fails without

* adds anchor to keywords page, uses it on plugins pages

* fixes envvar link errors

* harmonize file name and ref name as python_3

* removes undefined-lable from ignore list
6 years ago
Abhijeet Kasurde 9f1254a32f Typo fix in testing link (#39407)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Alicia Cozine 4b52a54e18 Reduce warnings (#39254)
* removes FAQ links; no entries exist for linked config settings

* fixes various anchors and links

* addresses abadger comments, thanks

* marks orphan pages, avoids TOC errors

* adds links for remote_tmp setting to FAQ
6 years ago
Matt Clay 7975c8fab0
Improve integration-aliases docs. (#39087) 6 years ago
Alicia Cozine 8f83061e70 corrects links to 'list_of' pages (#39161) 6 years ago
Matt Clay c262dbfd30 Use https for links to ansible.com domains. 6 years ago
Alicia Cozine bbfd6c6ab1 Internal refs (#39094)
* fixes community refs

* fixes appendix refs

* fixes scenario refs, keeps ACI guide link to devel

* fixes windows refs

* fixes user guide refs

* fixes dev guide refs
7 years ago
Alicia Cozine 64dcc7def0 Fixes more rST errors (#39042)
* removes include, avoids duplicate label rST warnings

* reduces literal_block errors on playbooks_filters

* addresses TOC errors

* ref error on modules page

* trying ref for list_of_database_modules
7 years ago
Toshio Kuratomi 9faf7b949e Fix places in docs that refer to modules without namespace
We've namespaced all plugin docs.  Change the docs to reflect that
7 years ago
Matt Clay 3d57f45815 Update httptester docs. 7 years ago
Rémy Léone d639d5dc96 Fix typo (#38652)
Typo
+label: docsite_pr
7 years ago
Matt Clay 26fa3adeab Add docs-build sanity test. 7 years ago
Pierre Templier 1e0df01980 Small typos in docs (#38371)
* Small typos in docs

* Use same wording as in porting_guide_2.5.rst
7 years ago
ewubnhn ea9ece8e72 Update spelling_word_choice.rst (#38113)
Added missing format string on "Installer"

 label: docsite_pr
7 years ago
Sam Doran b5b3beff83 Correct syntax highlighting in plugin dev docs (#38184)
Use rst em dash
7 years ago
Matt Martz ffbbb5a25b
Use arg_spec type for comparisons on default and choices (#37741)
* Use arg_spec type for comparisons on default and choices

* Further improve type casting

* Make sure to capture output in more places

* Individually report invalid choices

* Update ignore.txt after resolving merge conflicts
7 years ago
scottb 381359a8f8
Doc build warning/broken link clean-a-palooza (#37382)
* Doc build warning/broken link clean-a-palooza, WIP commit 1.

* Fixed broken anchor

* Fixing additional broken links; converting from doc to ref.

* Fix anchor
7 years ago
Alexander Lex 19f92005b9 Update developing_api.rst (#37108)
Fix for #17716 and #36110
7 years ago
Adam Miller 3fd5b0740e allow ANSIBLE_KEEP_REMOTE_FILES for local test runner (#33357)
* allow ANSIBLE_KEEP_REMOTE_FILES for local test runner
* add ANSIBLE_KEEP_REMOTE_FILES to tox.ini, update docs
* Clarify handling of environment variables.
7 years ago
John R Barker 985f09270d
Ability to link to other pages from plugin docs (#37009)
Support relative links
7 years ago
scottb e7f9c5cc60 Copy edits and tweaks 7 years ago
Brian Coca cf43e0d605 updated api example
- added many more comments
- removed very obsolete 1.x refs
7 years ago
Kevin Breit 487ff1fe9b Fix typos (#36671)
Fix minor typos
7 years ago
Brian Coca 3eff279dd7 updates to module testing (#36043)
* updates to module testing

gives those using internal modules an alternative

* Copy edit
7 years ago
Matt Martz 50adc5409b Add several new doc<->arg_spec checks (#36247)
* Add several new doc<->arg_spec checks. See #18183

* Update ignore.txt for validate-modules
7 years ago
David Newswanger 3f5caf659e added support for --testcase flag in ansible-test (#36134)
* added support for --testcase flag in ansible-test

* fixed command format

* added tab completion

* fixed sanity issues

* added documenation for --testcase

* don't autocomplete when multiple modules are selected
7 years ago
scottb 373b1dcf59
Core Docs Refactor and Redesign (#36067)
* Docs refactor as outlined in https://github.com/ansible/proposals/issues/79. Moves content into 'guides'; refactors TOC; fixes CSS; design tweaks to layout and CSS; fixes generated plugin, CLI and module docs to fix links accodingly; more.

* Adding extra blank line for shippable
7 years ago
Rvgate d5ae63c0ea Change wording of Going Further section (#35949)
* Change wording of Going Further section

The original wording was confusing with its non-devel branch part.
Made it much clearer for people to understand what to do.

Also removed the git command for creating branches, I believe a
develop should be aware of how basic git commands work.

* Edited for concision and clarity.

* Typo fix

* Typo fix
7 years ago
John R Barker c3523cdd60
Test against a single transport (#35903)
Network integration tests can use tags to run only a specific transport
7 years ago
Joshua Smith 0c012703c1 Update developing inventory script docs. (#35639)
* Update developing inventory script docs.

* Copy edit.
7 years ago
Alicia Cozine adf76b7d3f
Reflect new process for network integration tests (#35577)
With `ansible-test network-integration` we don't need the top level yaml files
except NXOS and Dell (for now)
7 years ago
John R Barker a23c95023b
Module deprecation: docs, scheme and tests (#34100)
Enforce module deprecation.
After module has reached the end of it's deprecation cycle we will replace it with a docs stub.

* Replace deprecated modules with docs-only sub
* Use of deprecated past deprecation cycle gives meaningful message (see examples below)
* Enforce documentation.deprecation dict via `schema.py`
* Update `ansible-doc` and web docs to display documentation.deprecation
* Document that structure in `dev_guide`
* Ensure that all modules starting with `_` have a `deprecation:` block
* Ensure `deprecation:` block is only used on modules that start with `_`
* `removed_in` A string which represents when this module needs **deleting**
* CHANGELOG.md and porting_guide_2.5.rst list removed modules as well as alternatives
* CHANGELOG.md links to porting guide index

To ensure that meaningful messages are given to the user if they try to use a module at the end of it's deprecation cycle we enforce the module to contain:
```python
if __name__ == '__main__':
    removed_module()
```
7 years ago
Jordan Borean 4da19f2d6b Added code-smell check to verify filenames are allowed with Windows (#35436) 7 years ago
Matt Clay 7abdab6c9e Convert ansible-test compile into a sanity test. 7 years ago
Matt Clay e0010f15e4 Add pslint sanity test. (#35303)
* Add pslint sanity test.

* Fix `no-smart-quotes` sanity test.

* Add docs for `pslint` sanity test.
7 years ago
Matt Martz 3c400c5899
ANSIBLE_METADATA doesn't support YAML currently, change 315 to invalid data type (#35009) 7 years ago
Matt Martz a352d43824
Compare arg+aliases between docs and argument_spec (#34809)
* compare arg+aliases between docs and argument_spec

* Add some special handling for the network modules provider options that also appear in the top level arg spec

* Fix error code for bigip_hostname

* Address merge conflicts due to changes in f5 modules

* Update validate-modules ignore based off a clean execution

* Address merge conflicts

* Address renamed module

* Address recent changes to modules

* Add ignore for ucs_ip_pool

* Update aci modules to get more reliable documentation comparison, but not mutating the module_utils aci_argument_spec

* Update ignore.txt after recent aci updates

* Add extra guard to ensure we handle provider special only for network modules

* Address additional changes to modules
7 years ago
Alexander Lex 59042d79f5 Update developing_api.rst to use correct inventory format for single explicit host (#34919)
Fix for #34918
7 years ago
Brian Coca bbd6b8bb42 Temporary (#31677)
* allow shells to have per host options, remote_tmp

added language to shell
removed module lang setting from general as  plugins have it now
use get to avoid bad powershell plugin
more resilient tmp discovery, fall back to `pwd`
add shell to docs
fixed options for when frags are only options
added shell set ops in t_e and fixed option frags
normalize tmp dir usag4e

- pass tmpdir/tmp/temp options as env var to commands, making it default for tempfile
- adjusted ansiballz tmpdir
- default local tempfile usage to the configured local tmp
- set env temp in action

add options to powershell
shift temporary to internal envvar/params
ensure tempdir is set if we pass var
ensure basic and url use expected tempdir
ensure localhost uses local tmp
give /var/tmp priority, less perms issues
more consistent tempfile mgmt for ansiballz
made async_dir configurable
better action handling, allow for finally rm tmp
fixed tmp issue and no more tempdir in ballz
hostvarize world readable and admin users
always set shell tempdir
added comment to discourage use of exception/flow control

* Mostly revert expand_user as it's not quite working.

This was an additional feature anyhow.

Kept the use of pwd as a fallback but moved it to a second ssh
connection.  This is not optimal but getting that to work in a single
ssh connection was part of the problem holding this up.

(cherry picked from commit 395b714120522f15e4c90a346f5e8e8d79213aca)

* fixed script and other action plugins

ensure tmpdir deletion
allow for connections that don't support new options (legacy, 3rd party)
fixed tests
7 years ago
jctanner b10d5f34ea Extend validate-modules to check the next to last line (#34819)
* Add validation for the next to last line of a module

* Fix last error code

* Reduce to a single conditional

* Fix conditionals

* Move the final warnings statement to main() in mysql_replication
7 years ago
Matt Martz dcc05093db Validate modules arg spec fixes (#34477)
* Update validate-modules arg_spec introspection to be faster, by only mocking the imports we explicitly list
* The use of types.MethodType in redhat_subscription wasn't py3 compatible, use partial instead
* Remove argument_spec import hacks, make them errors, we can ignore them with ansible-test
* Enable the --arg-spec flag for validate-modules
7 years ago
Samer Deeb f8884f12bc Mellanox OS name change: MLNXOS changed to ONYX (#34753)
* Mellanox OS name change: MLNXOS changed to ONYX

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* Fix alphabetical order of modules metadata

Signed-off-by: Samer Deeb <samerd@mellanox.com>
7 years ago
Pilou b66863abf0 dev_guide: don't ask to use '© Ansible Project' (#34704)
contributor don't sign any copyright assignment, then this makes no
sense.
7 years ago
osLEccse 9c7d987395 Update developing_api.rst (#34629)
Module path needs to be array instead of a string variable in order to work.
7 years ago
Lars Kellogg-Stedman 29fbf0c756 remove erroneous '.' in docsite footer (#34592)
This removes an erroneous '.' in the docsite that someone pointed out
on irc.
7 years ago
Pilou 6a6f5129a9 dev_guide: fix a slip (#34143)
replace 'Formatting options' with 'Formatting functions'
7 years ago
Matt Martz 57575d1cfa
Fix tests as filters #4 (#33930)
* Resolve newly added tests as filters

* Add code smell to test for ansible provided jinja tests as filters syntax

* Add docs for no-tests-as-filters code smell test

* Address tests as filters in new integration tests

* Address feedback

* Address feedback 2
7 years ago
John R Barker c50da48049
Fix various RST warnings (#34084)
* Fix various RST warnings

* shorter lines
7 years ago
Will Thames 5f29cd5e60 Add validation test for new copyright (#32919)
* Update validation test for new copyright

Ensure new modules without the new copyright header fail
validation
Ensure existing modules without copyright in top 20 lines fail

* Add documentation of 108 error

Create label in developing modules documentation so that
the validation page can point to it

* Ensure new style copyright header passes test!
7 years ago
Jordan Borean 07e9df11b3
windows dev docs - vagrant info (#33515)
* windows dev docs - vagrant info

* added info about FileUtil and LinkUtil

* Initial edit pass - WIP

* updated some wording

* fix some more general sayings to be more professional
7 years ago
Matt Martz 2d2f288e77
Add docs describing some additional behaviors around modules (#33631)
* Add docs describing some additional behaviors around modules, to outline why generic modules will not be accepted

* Add/copy the generic module guidelines to developing_modules

* Edits for clarity

* Edits for clarity
7 years ago
Matt Clay 90ac38bd4c Fix module validator handling of empty options. 7 years ago
Ganesh Nalawade 11c9ad23d5
Refactor common network shared and platform utils code into package (#33452)
* Refactor common network shared and platform specific code into package (part-1)

As per proposal #76 refactor common network shared and platform specific
code into sub-package.
https://github.com/ansible/proposals/issues/76

*  ansible.module_utils.network.common - command shared functions
*  ansible.module_utils.network.{{ platform }} - where platform is platform specific shared functions

*  Fix review comments

* Fix review comments
7 years ago
Toshio Kuratomi 7bd0af15d2
Enhance empty __init__ code-smell to check module_utils (#33438)
Empty __init__ will allow us to use python namespaces with all of these
files.  That may be something we want to take advantage of for allowign
them to be expanded by user dirs.  Also might be needed for AnsiballZ or
other wrapper enhancements in the future.
7 years ago
Eike Frost 16081d2751 Add keycloak_client module for administration of Keycloak clients (#31716)
Allows administration of Keycloak (http://www.keycloak.org/) clients via the Keycloak REST API
7 years ago
Matt Martz 4fe08441be Deprecate tests used as filters (#32361)
* Warn on tests used as filters

* Update docs, add aliases for tests that fit more gramatically with test syntax

* Fix rst formatting

* Add successful filter, alias of success

* Remove renamed_deprecation, it was overkill

* Make directory alias for is_dir

* Update tests to use proper jinja test syntax

* Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax

* Add conversion script, porting guide updates, and changelog updates

* Update newly added uses of tests as filters

* No underscore variable

* Convert recent tests as filter changes to win_stat

* Fix some changes related to rebasing a few integration tests

* Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name

* Add test for tests_as_filters_warning

* Update tests as filters in newly added/modified tests

* Address recent changes to several integration tests

* Address recent changes in cs_vpc
7 years ago
Samer Deeb cbf28c20cb Add Support for Mellanox switches: first module: mlnxos_command (#33121)
* Add Support for Mellanox switches: first module: mlnxos_command

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* Add cliconf support for mlnxos

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* 1- Fix short description, 2- remove waitfor

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* remove usage of check_args

Signed-off-by: Samer Deeb <samerd@mellanox.com>
7 years ago
gaellick bb38e34fc5 add prequisites for ubuntu dev env (#30713) 7 years ago
Pilou 16bcb0393e dev_guide: format code in testing_units_modules.rst (#33009)
* dev_guide: highlight Python code snippets

* dev_guide: use monospace for inline source code

* dev_guide: use links for classes and methods

Methods and classes prefixed with :method: and :class: will become
links once we have documentation for the relevant classes and methods.

Thanks to Toshio for pointing that.
7 years ago
Sebastian Safari a05bbb8a1b Update location of facts.py on module dev documentation (#32209)
* Update location of facts.py

I spent some time trying to find out where it was, since it's a 404 on a google search.

* Edits
7 years ago
Matt Martz 99d4f5bab4 Remove uses of assert in production code (#32079)
* Remove uses of assert in production code

* Fix assertion

* Add code smell test for assertions, currently limited to lib/ansible

* Fix assertion

* Add docs for no-assert

* Remove new assert from enos

* Fix assert in module_utils.connection
7 years ago
Will Thames 316e7939d6 [cloud] Improve aws testing and use `{{ region }}` var (#26892)
* Protect AWS credentials from accidental commits

* Improve documentation for IAM policies

* Update ELB tests to be multi region

Allow AZs to reflect the region in which the tests are run.

This will not work for regions with fewer than three AZs,
but those are relatively rare
7 years ago
cnasten f1fe467c22 nso_config module for setting configuration in Cisco NSO (#30973) 7 years ago
Jordan Borean d43985aa46
windows development: info about module_utils and requires (#32060)
* windows development: info about module_utils and requires

* Edits.

* update for CI fix

* removed link to Python module utils
7 years ago
Aaron Huslage 01af68911f Change 'connection' to 'inventory' in description
Fixing a copy/paste typo.
7 years ago
Matt Clay 36b13e3e3d Fix ansible-test default image. (#31966)
* Add openssh-client to default docker container.
* Include Azure requirements in default container.

To do so, handling of pip requirements was updated to install each
set of requirements separately and then run a verification pass to
make sure there are no conflicts between requirements.

* Add missing --docker-no-pull option.
* Add documentation for the azure-requirements test.
7 years ago
mikedlr fbbffbabde Mdd module unit test docs (#31373)
* new documentation for unit testing - especially module unit testing

* unit test documentation reformatting and further fixes

* unit test documentation - point to online coverage reports & fix bad spaces

* Small copy edits.

* First pass copy edit / rewrite. More info needed.

* testing documentation - clean up structure, especially code coverage - reduce repetition

* module unit test documentation - improved introduction

* testing documentation - more fixes from and inspired by review from dharmabumstead

* testing documentation - fixes from mattclay + some other minor tweaks

* More copy edits.

* testing documentation - further fixes from review

* Copy edits

* Copy edits

* More copy edits.
7 years ago
Toshio Kuratomi c81314dcb9 Add a hack to test whether type=path should be used in a module 7 years ago
Michihito Shigemura a71ca66e6e Fix typo in dev_guide/testing 7 years ago
Michihito Shigemura 78fd326908 Fix typo in dev_guide/developing_program_flow_modules 7 years ago
Michihito Shigemura d0d1c7d249 Fix typo in dev_guide/developing_plugins (#31142) 7 years ago
Michihito Shigemura 221c01ff49 Fix typo in dev_guide/developing_modules_general (#31122) 7 years ago
Michihito Shigemura b7b8c669a3 Fix typo in dev_guide/developing_modules_documenting (#31120) 7 years ago
Dag Wieers e63d949951 Add a blank line, and use the Copyright format as used during rewrite
So there is a discrepancy between the dev guide and what has been changed on disk by toshio.
Not a big deal, but needlessly confusing.
7 years ago
Michihito Shigemura b3cee37dc1 Update links in style_guide/trademarks (#30809) 7 years ago
Matt Martz d40eff720c Update API example for 2.4 7 years ago
scottb 6c732bb670 Plugin doc update edits for #30490 (#30889)
* Edit pass 1 for #30490 - command line tools and developing plugins.

* Continuing edit pass for #30490. WIP

* Last round of copy edits for #30490.
7 years ago
Michihito Shigemura b3177383da Fix typo in docs spelling_word_choice (#30785)
shocked that someone else spells the correst way, like me
7 years ago