* add a new module to manage lacp
* add a new module to manage lacp
* add a new module to manage lacp
* add a new module to manage lacp
* add a new module to manage lacp
* update for shippable.
* update for shippable
* add units test to module ce_lacp.
* add units test to module ce_lacp.
* add units test to module ce_lacp.
* update
* update
* update
* update
* update
* update
* update for shippable.
* for shippable
* update ignore.txt to reslove conflict
* update for shippable
* update
* update unittest to remove provider.
* update unittest for shipppable.
* use to_native.
* intergration test
* syntax error
* syntax error
* syntax error
* update for `Andersson007` review and thanks.
* update for shippable
* Stop appending '/api' to configured galaxy server url
Since not all galaxy REST api server URLs live
at '/api', stop always appending it to the
'url' value loaded from config.
* Add note about manually migrated galaxy configs and /api
* Add '/api/' to galaxy url and guessing if galaxy API
* Fix most unit tests (update to expect /api/)
* Fix test_initialise_unknown unit test
Since we retry now with an added /api/, mock it as well.
* Update fallback default avail_ver to new format
* Add APCON modules
* Fix cli regex
* revise for passing sanity tests
* Add unit test for apcon_command module
Remove apconos_config.py apconos_update.py apconos_cert.py for now
* Fix for santiy test
* test
* Ignore action-plugin-docs test
* Add apcon_command module
* conflict solved
* merge
* Fix for sanity test
* Revise integration test
* Mark integration test unstable
* Remove integration test temprorily
* 1. Ignored privilege escalation;
2. Ignored get_configure command;
3. Removed doc_fragments;
Improve tests
- add more unit test cases
- add specific integration test with more cases
Testing shows no major downside to calling .strip() twice in a comprehension vs. using a regular for loop and only calling .strip() once. Going with the comprehension for ease of maintenance and because comprehensions are optimized in CPython.
when creating or deleting an object (e.g. via an API), before/after can
be `None` (or at least represented as such by the used library). to
avoid modules havig to do
diff={'before': before or '', 'after': after or ''}
let's just convert `None` to an empty string that can be diffed properly
* Add a representer for AnsibleUnsafeBytes
* changelog
* Add unit tests
Remove native string test until we have time to evaluate how this the function should work
Add non-ASCII characters to test cases
* Compare to the string on Python 2
Add a comment in the test about this behavior
* ansible-galaxy - add config to control the display wheel
* Fix changelog and make test more stable
* Don't use display thread at all if progress wheel isn't being shown
* Fix location of unit test requirements.
* Preserve ansible-test unit test requirements.
* Remove redundant unit test requirements.
* Fix location of network test requirements.
* Preserve ansible-test network test requirements.
* Remove redundant network test requirements.
* Add missing ordereddict requirements.
* Load collection requirements correctly.
* Add changelog fragment.
* Adding support for Plugin runnable type
Adding support for device arrays in vdirect_runnable module.
Adding "output" dictionary to the vdirect_runnable module result dictionary.
* Adding support for Plugin runnable type
Adding support for device arrays in vdirect_runnable module.
Adding "output" dictionary to the vdirect_runnable module result dictionary.
* Allow the use of _paramiko_conn even if the connection hasn't been started.
I'm not sure what the benefit is of Noneing paramiko_conn on close, but will keep for now
* Fix test
* Try to fix up net_put & net_get
* Add changelog
Python < 2.7.9 does not have the ssl.SSLContext attribute.
ssl.SSLContext is only required when we want to validate the SSL
connection. If `validate_certs` is false, we don't initialize the
`ssl_context` variable.
Add unit-test coverage and a little refactoring:
- avoid the use of `mocker`, when we can push `monkeypatch` which is
`pytest`'s default.
- use `mock.Mocker()` when possible
closes: #57072
* module_utils/ec2: (unit tests) Move unit tests for module_utils/ec2.py into test/units/module_utils
- compare_policies was refactored from s3_bucket
- "ec2_utils" doesn't seem to have ever existed
* module_utils/ec2: (unit tests) Add unit test for comparing quoted and unquoted bools and numbers within policies
As per https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html
"Values are enclosed in quotation marks. Quotation marks are optional for numeric
and Boolean values."
* module_utils/ec2: Explicitly convert bools and ints to strings when comparing policies
See also: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html
* luks_device.py: Allow manipulate LUKS containers with label or UUID
- Allow create a LUKS2 container format with label support
- Allow manipulate (open, close, modify) an LUKS container based on
both label (LUKS2 format) or UUID instead of using devices only.
Fixes: #58973
Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>
* test_luks_device.py: organizing tests to support labels
- Add label on some tests and fix errors reported by Shippable
Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>
* luks_device.py: adjusting versions and messages
- Modifying version_added from 2.9 to 2.10
- Fixing some messages
- Created a changelog fragment
- Moving blkid from scope
Fixes#58973
Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>
* Refactor galaxy collection API for v3 support
* Added unit tests for GalaxyAPI and starting to fix other failures
* finalise tests
* more unit test fixes
* Properly load module_prefix for collections
Now that we are using collections for tasks, we need to properly split
the name and load the prefix properly.
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
* Add unit tests for task_executor
This commit adds missing unit tests for action handler in test_task_executor.
Signed-off-by: Daniel Mellado <dmellado@redhat.com>
* default collection support
* playbooks run from inside a registered collection will set that collection as the first item in the search order (as will all non-collection roles)
* this allows easy migration of runme.sh style playbook/role integration tests to collections without the playbooks/roles needing to know the name of their enclosing collection
* disable default collection test under Windows
* enable collection search for role dependencies
* unqualified role deps in collection-hosted roles will first search the containing collection
* if the calling role has specified a collections search list in metadata, it will be appended to the search order for unqualified role deps
* disable cycle detection unit test
* failing on 3.7+, needs proper cycle detection
* see #61527
* play, block, task: New attribute forks
With this it is possible to limit the number of concurrent task runs.
forks can now be used in play, block and task. If forks is set in different
levels in the chain, then the smallest value will be used for the task.
The attribute has been added to the Base class as a list to easily provide
all the values that have been set in the different levels of the chain.
A warning has been added because of the conflict with run_once. forks will
be ignored in this case.
The forks limitation in StrategyBase._queue_task is not used for the free
strategy.
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
* Handle forks in free strategy
The forks attribute for the free strategy is handled in run in the free
StrategyModule. This is dony by counting the amount of tasks where the uuid
is the same as the current task, that should be queued next. If this amount
is bigger or equal to the forks attribute from the chain (task, block,
play), then it will be skipped to the next host. Like it is also done with
blocked_hosts.
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
* Test cases for forks with linear and free strategy
With ansible_python_interpreter defined in inventory file using
ansible_playbook_python.
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
* Changing forks keyword to throttle and adding some more docs
* Add na_santricity_firmware module.
Manages NetApp E-Series firmware upgrades.
Includes unit and integration tests.
* Add legacy support to na_santricity_firmware module.
* Rename na_santricity_firmware to netapp_e_firmware
* Improved netapp_e_firmware example documentation.
* Add na_santricity_drive_firmware module
Manage NetApp E-Series drive firmware downloads
Includes unit and integration tests
* Rename na_santricity_drive_firmware to netapp_e_drive_firmware
* Add galaxy collections API v3 support
Issue: ansible/galaxy-dev#60
- Determine if server supports v3
Use 'available_versions' from `GET /api`
to determine if 'v3' api is available on
the server.
- Support v3 pagination style
ie, 'limit/offset style', with the paginated
responses based on https://jsonapi.org/format/#fetching-pagination
v2 galaxy uses pagination that is more or less
'django rest framework style' or 'page/page_size style',
based on the default drf pagination described
at https://www.django-rest-framework.org/api-guide/pagination/#pagenumberpagination
- Support galaxy v3 style error response
The error objects returned by the galaxy v3 api are based
on the JSONAPI response/errors format
(https://jsonapi.org/format/#errors).
This handles that style response. At least for publish_collection
for now. Needs extracting/generalizing.
Handle HTTPError in CollectionRequirement.from_name()
with _handle_http_error(). It will raise AnsibleError
based on the json in an error response.
- Update unit tests
update test/unit/galaxy/test_collection*
to paramaterize calls to test against
mocked v2 and v3 servers apis.
Update artifacts_versions_json() to tale an
api version paramater.
Add error_json() for generating v3/v3 style error
responses.
So now, the urls generated and the pagination schema
of the response will use the v3 version if
the passed in GalaxyAPI 'galaxy_api' instance
has 'v3' in it's available_api_versions
* Move checking of server avail versions to collections.py
collections.py needs to know the server api versions
supported before it makes collection related calls,
so the 'lazy' server version check in api.GalaxyAPI
is never called and isn't set, so 'v3' servers weren't
found.
Update unit tests to mock the return value of the
request instead of GalaxyAPI itself.
* Model->Role->Module.
Yet to import modules/exos_facts.py
* exos_facts refactor
* future-import and metaclass
* Fix unit tests
* Fix openconfig-lldp word and send_request API from Httpapi class
idempotent, json.dumps in base class, send_requests from base exos class
* action file for exos_lldp_global
* Add intergration tests for exos_lldp_global
* Test data field of the request
* network module
* delete cp_network, cp_network_facts, and change test_cp_network to match the new network module
* Update ignore.txt
* adding state: present
* update example
* list to dict
* Update test_cp_mgmt_network.py
* remove white-space
* Files from PR#60621, continue working on fortios_facts modules
* PR#61405 unit test module test_fortios_facts.py
* sanity fixed in test_fortios_facts unit test module
* support wjh module config with testing file
* Fix version, fix enable/disable all groups
* refactor get current group status
* fix indentation and change command_generate function, add test cases and check them
* Update onyx_wjh.py
fix description
* Update onyx_wjh.py
remove extra spaces, add type to choices after run validate-modules
* fix format string - pytest use 2.6.6 format function
* Remove unused imports
* chenge onyx_wjh file permessions
* Fix version, fix enable/disable all groups
* fix indentation and change command_generate function, add test cases and check them
* support wjh module config with testing file
* Fix version, fix enable/disable all groups
* refactor get current group status
* fix indentation and change command_generate function, add test cases and check them
* Update onyx_wjh.py
fix description
* Update onyx_wjh.py
remove extra spaces, add type to choices after run validate-modules
* fix format string - pytest use 2.6.6 format function
* fix format string - pytest use 2.6.6 format function
* chenge onyx_wjh file permessions
* new module
* icx_cliconf
* icx test units module
* icx units module
* added notes
* new changes
* new module
* new fix
* new changes
* new fixes
* new changes
* Rebase
* new module
* new module
* new module
* new terminal
* new terminal
* new terminal
* new terminal
* new terminal
* new terminal
* new cliconf
* new cliconf
* cliconf
* cliconf
* icx cliconf
* icx cliconf
* icx_cliconf
* icx_cliconf
* icx test units module
* icx test units module
* icx units module
* icx units module
* icx banner unit test
* icx banner unit test
* icx banner unit test
* PR changes resolved
* PR changes resolved
* changes resolved
* changes resolved
* Changes Resolved
* Changes Resolved
* check_running_config changes resolved
* check_running_config changes resolved
* check_running_config changes resolved
* added notes
* added notes
* new changes
* PR comments resolved
* new module icx_interface
* new module icx_interface
* new changes
* new changes
* new changes
* new changes
* new changes
* new changes
* new changes
* new changes
* new changes
* new changes
* new changes
* new changes
* new changes
* new changes
* new changes
* new fix
* new fix
* new fix
* new fix
* new fix
* new fix
* new fix
* new fix
* new fix
* new fix
* new fix
* new changes
* new changes
* new changes
* new changes
* new changes
* new changes
* notes updated
* Update icx.py
* Whitespace error
* new module
* icx_cliconf
* icx test units module
* icx test units module
* icx units module
* icx units module
* icx banner unit test
* added notes
* new changes
* New branch to prevent complex rebase
* Rebase had problems
* win_updates: Add flag to only download updates without installing them
* Fix test
* Fixes ansible-test (pep8)
* Fix integration test
* Fix actual fix.
* Rename OneView _facts modules -> _info
* Adjust PR #.
* Forgot to update test names.
* Remove superfluous blank line.
* Some more things from review.
* Initial commit for rate limiting
- Detects if error code is 429
- Pauses for random time between .5 and 5 seconds before retrying
- If it fails 10 times, give up and tell user
* Redo structure of request() to support rate limiting
* Hold down timer is now a sliding scale
- 3 * number of retries
- Fails after the 30 second wait
* Whitespace fixes
* Redo implementation using decorators
- Errors aren't tested but code works for regular calls
* Unit tests work for error handling
* Add integration tests for successful retries
* Add condition for 502 errors and retry
* Move _error_report out of the class
* PEP8 fixes
* Add changelog entry
* Add controller ownership and cache without batteries option
* Add unit test for new netapp_e_volume options
* Add integration tests for netapp_e_volume module.
* Changed default read_ahead_enable option to true in netapp_e_volume module.
* Fix off-segment aligned volume size in netapp_e_volume module.
* FortiOS System Fimrware Upgrade Module
* default timeout 12 seconds is not enough for large firmware or slow connection, increase it to 300 seconds
* update fortios system firmware upgrade module together with unit test
* minor updates based on the new templates
* minor updates and remove fortiosapi dependency in unit test module
* add author, remove unused method, fix descriptions, apply some sanity fixes
* FortiOS modules for 2.9 - 9
* Undo ignore file
* Remove non valid identifiers
* Leave fortios_switch_controller_lldp_profile and fortios_switch_controller_managed_switch out of this PR
* Updated fortios_switch_controller_lldp_profile and fortios_switch_controller_managed_switch
* Fortinet's new module for fortios_wireless_controller_hotspot20_hs_profile
* Update fortios_wireless_controller_hotspot20_hs_profile.py and test_fortios_wireless_controller_hotspot20_hs_profile.py
* Added comment field to na_ontap_volume module
* fixed zapi attribute name in create_volume_options(), and fix to ensure comment field can be set back to an empty string
* Properly JSON encode AnsibleUnsafe, using a pre-processor. Fixes#47295
* Add AnsibleUnsafe json tests
* Require preprocess_unsafe to be enabled for that functionality
* Support older json
* sort keys in tests
* Decouple AnsibleJSONEncoder from isinstance checks in preparation to move to module_utils
* Move AnsibleJSONEncoder to module_utils, consolidate instances
* add missing boilerplate
* remove removed.py from ignore
* new cliconf
* cliconf
* icx cliconf
* icx test units module
* icx units module
* icx banner unit test
* added notes
* new changes
* icx .rst
* modified platform_index.rst
* test
* Revert "test"
This reverts commit 99b72c6614.
* new module icx_facts
* fixtures added
* Rebase causing problem on branch-PR4. So created new PR
* new commit
* new changes
* Added NetApp ONTAP Adaptive QoS Policy Module
* updated documentation to fix validation errors
* Updates to documentation fields and modified logging function to log against the current vserver
* Fixed minor formatting issues
* Documentation update for consistency - author field
* Empty commit to force CI
* fixes
* Fortinet's new module for fortios_wireless_controller_hotspot20_anqp_roaming_consortium
* Update fortios_wireless_controller_hotspot20_anqp_roaming_consortium.py
* Fortinet's new module for fortios_wireless_controller_hotspot20_h2qp_conn_capability
* Update fortios_wireless_controller_hotspot20_h2qp_conn_capability.py
* PR Update to fmgr_fwpol_ipv4 -- now allows for failure or skip behavior option upon missing dependencies
* fmgr_fwpol_ipv4 minor docs fix
* Removed "system_package_print" line from test/sanity/ignore.txt as instructed by failed shippable test.
Actual PR module isn't affected.
* add subdir support to collection loading
* collections may now load plugins from subdirs under a plugin type or roles dir, eg `ns.coll.subdir1.subdir2.myrole`->ns.coll's roles/subdir1/subdir2/myrole, `ns.coll.subdir1.mymodule`->ns.coll's plugins/modules/subdir1/mymodule.py
* centralize parsing/validation in AnsibleCollectionRef class
* fix issues loading Jinja2 plugins from multiple sources
* resolves#59462, #59890,
* sanity test fixes
* string fixes
* add changelog entry