* Returns zone ID for existing zone or `null`
* route53_zone: add module unit tests
* route53_zone: add compatibility with Python 2.6 to the unit tests
* route53_zone: address pycodestyle warning (add blank line)
- Also return url and update docs for other values to indicate they are only returned on success.
- Add integration tests
- Use info variable for common return values
- Use -1 as default status rather than None. This is lines up with with existing code in urls.py
- Add unit tests to ensure status and url are returned on failure
* Adding New Model onyx_qos for Configuring QoS on Onyx Switches
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Pep8 Failures in onyx_qos
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Pep8 Failures phase 2
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Samer's Comments on onyx_qos Module
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Shippable Comments Phase 3
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Current Version 2.9
Signed-off-by: Anas Badaha <anasb@mellanox.com>
Ensure the module still work with the ESXi where CustomFieldsManager
does not exist.
From: https://www.vmware.com/support/developer/converter-sdk/conv60_apireference/vim.CustomFieldsManager.html
The CustomFieldsManager object is used to add and remove custom fields to
managed entities.
The custom fields values set on managed entities are available through the
customValue property and through the summary objects for VirtualMachine
and HostSystem. They are not available directly through this managed object.
This functionality is only available through VirtualCenter.
Fixes: #56071
* Adding Support For EVPN in BGP Module
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Pep8 Failures in onyx_bgp.py
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Pep8 Failures in onyx_bgp.py Phase 2
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Samer's Comments
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Remove file Variable
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Adding Support for NVE Protocol in onyx_protocol
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Pep8 Failures in onyx_protocol.py
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Adding Support for Traffic Class in Onyx Switches
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Enhancing the code and elemenating code duplicate
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* use navigate_value instead navigate_hash
* add async wait method
* update dict compare
* remove unuse methods
* not all modules have timeouts parameter
* navigate_value, the input data may be None
* remove external grep call and parse with python
* use function for repeated code
* use module.get_bin_path() for iscsiutil on HPUX
* some code opt for HPUX
* clean up non-module code, module being defined is a requirement for this code
* import get_bin_path() directly and use without module prefix
* Add integration tests for AIX and HP-UX
* add changelog fragment
* Apply suggestions from code review
Co-Authored-By: mator <matorola@gmail.com>
* Apply suggestions from code review #2
Co-Authored-By: Sam Doran <sdoran@redhat.com>
* Remove strict requirement on executable to exist for get_bin_path() as
it will allow facts gathering to continue without an error. Almost all
other files under facts do not have "required=True" (except 2 files,
which should be probably fixed). And check return value for
get_bin_path() , before run attempt.
* add check for AIX lsattr run_command return code
* Add custom action class for version info
* Use args from CLI as prog for ArgumentParser object
* Make prog a required parameter of create_base_parser() and update all uses to pass in the newly required parameter.
* Add unit test for checking ansible --version
* Update other related unit tests
* Support using importlib on py>=3 to avoid imp deprecation
* Add changelog fragment
* importlib coverage for py3
* Ansiballz execute should use importlib too
* recursive module_utils finder should utilize importlib too
* don't be dumb
* Fix up units
* Clean up tests
* Prefer importlib.util in plugin loader when available
* insert the module into sys.modules
* 3 before 2 for consistency
* ci_complete
* Address importlib.util.find_spec returning None
* Start of migration to argparse
* various fixes and improvements
* Linting fixes
* Test fixes
* Fix vault_password_files
* Add PrependAction for argparse
* A bunch of additional tweak/fixes
* Fix ansible-config tests
* Fix man page generation
* linting fix
* More adhoc pattern fixes
* Add changelog fragment
* Add support for argcomplete
* Enable argcomplete global completion
* Rename PrependAction to PrependListAction to better describe what it does
* Add documentation for installing and configuring argcomplete
* Address rebase issues
* Fix display encoding for vault
* Fix line length
* Address rebase issues
* Handle rebase issues
* Use mutually exclusive group instead of handling manually
* Fix rebase issues
* Address rebase issue
* Update version added for argcomplete support
* -e must be given a value
* ci_complete
* Remove code but leave the metadata so that they can be listed as
removed in documentation.
* Remove removed modules from validate-modules ignore
* Remove unittests for the removed nodules
* Remove links to removed modules and add list of removed moduels to the
2.9 porting guide
* become mixin is no more
since sudo/su keywords are removed in 2.9 .. no need to keep this code around
* also don't need test for code that is removed
* made preprocess_data on base noop
its not used by anything anymore, but kept for backwards compat since other methods of same name are used
* Adding Support For Vxlan In Onyx Switches
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Pep8 Failures in onyx_vxlan.py
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Pep8 Failures in onyx_vxlan phase 2
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Shippable failures
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Samer's Comments on PR
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Adding New Model for Configure Buffer Pool on Onyx Switches
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Pep8 Failures in onyx_buffer_pool.py
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Don't pollute include_variables. Fixes#51667. Fixes#54618.
* Rename include_variables to include_args, so we can make the distinction about what they are
* Track args and vars separately
* oops
* oops again
* linting fix
* Add test
Remove test comparing output to platform.linux_distribution() since we are relying on distro.id() and are not concerned about matching the output of platform.linux_distribution()
* netbox_device: Allow device modification
* Add ability to update and existing device
* Allow check_mode
* Fail when device name is missing
* Fail when cannot resolve ID instead of taking ID 1 by default
* netbox_device: Add diff output
* netbox: Some refactoring
* Add diff output and check_mode to netbox_ip_address
* Deduplicate redundant code into netbox_utils
* netbox_utils: A few unit tests
* fix missing attribs with dirct module execution
* also make remote tmp handling smarter
update tests
* set default if attrib does not exist
* add simple test
* add asa_og module
* add test
* fix pep8
* fix some sanity pylint
* fix import error order
* fix import
* replace cmd() method
* rename file and class
* add mock for connection
* fix commands in replace test function
* fix lines list
* update unit test
* fix 'and' logic for port-object command
* restore previous unit test; fix pep8 and remove debug
* other unit tests
* Add state present, absent, replace
* Update doc; add default for state
* update unit test with state present/absent
* fix typo in unit test
* fix pep8 too many blank lines
* fix show run for service object ASA Ver 8.x
* Add description field; fix bug for state present and absent
* Re-designed module structure for network, service and port objects
* update integration test for new module structure
* fix pep8
* update EXAMPLES and RETURN
* update units tests
* fix module typos in unit test
* removed provider from examples
* fix missing comma in replace test
* fix module name and remove provider
* update license
* remove register; update license; change import order; chage def state
* remove shebang
* fix doc default state
* change import order
* Update year in banner
* fix integration test as set of tasks
* remove arg_spec
* remove extends_documentation_fragment: asa
* Update DOC, remove unused import, change import order
* Add latest updates from FTD Ansible downstream repository.
- add a better implementation of the upsert operation;
- add API version lookup functionality;
- add filter which remove duplicated references from the list of references;
- fix minor bugs.
* fix issues outlined by ansibot
* fix argument name for _check_enum_method
* basic plugin loading working (with many hacks)
* task collections working
* play/block-level collection module/action working
* implement PEP302 loader
* implicit package support (no need for __init.py__ in collections)
* provides future options for secure loading of content that shouldn't execute inside controller (eg, actively ignore __init__.py on content/module paths)
* provide hook for synthetic collection setup (eg ansible.core pseudo-collection for specifying built-in plugins without legacy path, etc)
* synthetic package support
* ansible.core.plugins mapping works, others don't
* synthetic collections working for modules/actions
* fix direct-load legacy
* change base package name to ansible_collections
* note
* collection role loading
* expand paths from installed content root vars
* feature complete?
* rename ansible.core to ansible.builtin
* and various sanity fixes
* sanity tweaks
* unittest fixes
* less grabby error handler on has_plugin
* probably need to replace with a or harden callers
* fix win_ping test
* disable module test with explicit file extension; might be able to support in some scenarios, but can't see any other tests that verify that behavior...
* fix unicode conversion issues on py2
* attempt to keep things working-ish on py2.6
* python2.6 test fun round 2
* rename dirs/configs to "collections"
* add wrapper dir for content-adjacent
* fix pythoncheck to use localhost
* unicode tweaks, native/bytes string prefixing
* rename COLLECTION_PATHS to COLLECTIONS_PATHS
* switch to pathspec
* path handling cleanup
* change expensive `all` back to or chain
* unused import cleanup
* quotes tweak
* use wrapped iter/len in Jinja proxy
* var name expansion
* comment seemingly overcomplicated playbook_paths resolution
* drop unnecessary conditional nesting
* eliminate extraneous local
* zap superfluous validation function
* use slice for rolespec NS assembly
* misc naming/unicode fixes
* collection callback loader asks if valid FQ name instead of just '.'
* switch collection role resolution behavior to be internally `text` as much as possible
* misc fixmes
* to_native in exception constructor
* (slightly) detangle tuple accumulation mess in module_utils __init__ walker
* more misc fixmes
* tighten up action dispatch, add unqualified action test
* rename Collection mixin to CollectionSearch
* (attempt to) avoid potential confusion/conflict with builtin collections, etc
* stale fixmes
* tighten up pluginloader collections determination
* sanity test fixes
* ditch regex escape
* clarify comment
* update default collections paths config entry
* use PATH format instead of list
* skip integration tests on Python 2.6
ci_complete
Currently, if we try to stop or start a network two time in a row, the
second call will fail. With this patch:
- we don't recreate a network, if it exists
- we only stop a network if it's active, and so we avoid an exception
saying the network is not active
* test: mock libvirt
* add integration tests for virt_net
* test: enable virt_net test on RedHat 7 and 8
* ci: use the unsupported alias
* tests that require privileged mode are run in VM
* virt_net/create raise unexpected libvirt exception
* import mock from units.compat
* virt_net: do not call create() on "active" network
* virt_net func test: only clean up the libvirt packages
* test: virt_net: don't use assert_called()
* virt_net: add the destructive alias
* move the test in virt_net dir
* test/virt_net: clean up the network at the end
* Add to_ipv6_subnet function
* Use the correct function for subnet
* Corrected code style and tests
* Corrected testcase assertion
64 bits make 8 octets, or 4 hextets
* Import from correct module directly
* Add support for multiple IPv6 addresses in nxos_l3_interface module
Cisco support multiple IPv6 addresses on each interface but only the first
IPv6 is considered by this module. There is no impact on the configuration
but the module is not idempotent.
* Add internal support for IPv6 list
* Fix module idempotency
* Initialize tests for nxos_l3_interface
* Fix IPv4 removal idempotency
* Fix data extraction from nxos config
* Fix silently ignored interfaces in nxos_l3_interface
* Add warning when interface does not exist in nxos config
* Adding cnos_user module to Ansible
* Update cnos_user.py
* Adding Functional test cases and unit test cases.
* Fixing Bug found in testing with Lenovo Mars.
* Review comments incorporated
* Review comments implemented.
* Copy paste mistake
* Modify EXOS module utils to utilize 'httpapi' or 'network-cli' connection
* Changes to cliconf plugin to support 'json' or 'text' output for compatibility between network-cli and httpapi
* Add HTTPAPI plugin supportng JSONRPC and RESTCONF for EXOS
* exos_facts modify commands with run script cli2json.py to command dictionary specifying 'json' output
Load appropriate fixtures
* Update exos_config module to utilize the get_diff and get_default_flag functionality.
JSONRPC doesn't work well with pipes, regex MULTILINE
* Support for NOS agnostic 'cli_config' module by implementing 'get_default_flag' and 'get_diff' functionality
* Update Ansible Documentation regarding the connections available for EXOS
* nxos_interfaces_ospf: fix passive-interface states & check_mode
This fix addresses issues #41704 and #45343.
The crux of the problem is that `passive-interface` should have been treated as a tri-state value instead of a boolean.
The `no` form of the command disables the passive state on an interface (allows it to form adjacencies and send routing updates). It's essentially an override for `passive-interface default` which enables passive state on all OSPF interfaces.\*
This `no` config will be present in `running-config`.
\**See `router ospf` configuration.*
Since both enable and disable states are explicit configs, the proper way to remove either of these is with the `default` syntax.
Passive-interface config syntax:
```
ip ospf passive-interface # enable (nvgens)
no ip ospf passive-interface # disable (nvgens)
default ip ospf passive-interface # default (removes config, does not nvgen)
```
Code changes:
* `passive_interface` param changed from boolean to string, restricted to `true`,`false`,`default`.
* Several passive-interface specific checks were added because the existing module logic tends to test for true or false and doesn't handle the None case.
* Fixed `check_mode`.
Sanity verified on: N9K,N7K,N3K,N6K
* Fix doc header
* Unit tests for passive-interface
* doc fix#2
* Fix indent for SA
* Remove 'default' keyword, restore bool behavior
* remove changes to sanity
* fix AWS plugin credential precedence for environment variables
* Allow aliases in direct plugins options
Consolidate precedence fix just in the doc fragment using aliases for mismatched options
* Access options with the option name rather than alias
* fix indentation
* update unit tests
* Improve readability
* Add Bitbucket pipelines variable module
* Add tests
* Remove parameters check for `absent` state
* Update version_added documentation field
* Minor fixes
* A few additional cosmetic changes
* Move to source_control
* Rename lib/ansible/modules/source_control/bitbucket_pipelines_variable.py to lib/ansible/modules/source_control/bitbucket/bitbucket_pipelines_variable.py
* Reflect directory change
* Move these imports as well
* Rename 'key' parameter (API) to 'name' (GUI)
* Add missing __init__.py files to mark modules
* Rename module (pipeline should be singular)
* Adjust module references and variable names after renaming
* Move check_type_str() out of basic.py
* Move check_type_list() out of basic.py
* Move safe_eval() out of basic.py
* Move check_type_dict() out of basic.py
* Move json importing code to common location
* Move check_type_bool() out of basic.py
* Move _check_type_int() out of basic.py
* Move _check_type_float() out of basic.py
* Move _check_type_path() out of basic.py
* Move _check_type_raw() out of basic.py
* Move _check_type_bytes() out of basic.py
* Move _check_type_bits() out of basic.py
* Create text.formatters.py
Move human_to_bytes, bytes_to_human, and _lenient_lowercase out of basic.py into text.formatters.py
Change references in modules to point to function at new location
* Move _check_type_jsonarg() out of basic.py
* Rename json related functions and put them in common.text.converters
Move formatters.py to common.text.formatters.py and update references in modules.
* Rework check_type_str()
Add allow_conversion option to make the function more self-contained.
Move the messaging back to basic.py since those error messages are more relevant to using this function in the context of AnsibleModule and not when using the function in isolation.
* Add unit tests for type checking functions
* Change _lenient_lowercase to lenient_lowercase per feedback
* Mention Docker SDK for Python instead of docker-py / docker.
* Docs fixes.
* Add myself as docker_container author.
* Use array syntax for running command.
* Break long lines.
* Avoid failure when docker_version is None.
* Improve docker-py vs. docker note in requirements.
* Canonicalize Docker SDK for Python upgrade instructions.
* Split long line.
* Make it clearer which hostnames are meant.
* Adding cnos_system module to Ansible.
* Adding UT, Functional test required for cnos_system. Bugs came up are fixed
* Adding more files to the cnos_system suit.
* Remove nose from unittests
This PR migrates the last of our unittests from using nose to using
pytest. We don't need to install nose in our testing environments
anymore
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
Adds missing Return values to documentation
Removes deprecated modules unit tests
adds ha order, ha group and ha load as failover types
refactors main() function and module manager to accomodate new patterns
updates docs
refactors unit tests
Refactors main() function and module manager in multiple modules in line with recent changes
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
* Revert "changes to clusteR"
This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.
* Revert "changes to clusteR"
This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.
* Revert "Revert "changes to clusteR""
This reverts commit f1104a37b4.
* Revert "Revert "changes to clusteR""
This reverts commit f1104a37b4.
* documentation changes
* Revert "documentation changes"
This reverts commit 02c369d0414fdff492d90865c903bdade3174261.
* Issue with port being removed and added on modify
* adds function to do version checks for bigiq
* adds version limitation to bigiq application modules
Refactors main() function and module manager in multiple modules in line with recent changes
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
* Moving comparision functions to compare.py from common.py
* Refactors main() function and module manager in multiple modules in line with recent changes
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
* Moving comparision functions to compare.py from common.py
* fixes issue with data group elements containing IPs with Route Domains
refactors main() function and module_manager to accomodate new patterns
updates doc variables
Refactors main() function and module manager in multiple modules in line with recent changes
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
* Pluribus Networks network cli terminal and cliconf plugins
* Changes in Unit tests and modules according to network_cli connection
* Changes in Unit tests and modules according to network_cli connection
* Allow parent groups to be variables or literal, requires {{ }}
* Check strict before failing on templating errors
* Don't add a group if an invalid parent group was provided
When user specifies the JUMP value to 'tee', gateway is required.
This fix adds new parameter 'gateway' to support this functionality.
Fixes: #53170
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Adding support for IP identifiers according to https://tools.ietf.org/html/draft-ietf-acme-ip-05.
* Add changelog.
* Make sure that the authorizations return value is unchanged for CSRs with DNS-only SANs.
* Remove unneeded import.
* type -> identifier_type
* Python 2.6 compatibility.
* Fix unit tests.
* Add IP address normalization.
* Extend tests.
* Move data into fixtures.
* Adjust BOTMETA.
* Revert "changes to clusteR"
This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.
* Fix issue and unit tests
* update to firewall
* fix import issues
* Revert "Revert "changes to clusteR""
This reverts commit 2713c75f31.
* fix docs
* stop pylint on unicode line, line can only be run in python2
* Review comment
* add pylint skip
* add pylint skip
- More info added to module docs.
- Fixed errors and typos in module docs.
- Added parameter types to module docs.
- Some error messages are fixed and/or changed to be more helpful.
- Some code comments changed and added.
- Updated unit tests that test changed error messages.
- Improved module examples.
- Improved docs for custom_params xenserver_guest module parameter
Fixes a bug where parse_distribution_file_ClearLinux() was called on CoreOS (and probably many other distros) and it returned True since it successfully parses the distribution file. Since this file exists on many Linux distributions and they are a very similar format, add an additional check to make sure it is Clear Linux.
Change the order in which distribution files are processed so NA is last. This prevents a match on CoreOS hosts since they also have /etc/os-release and the called matching function for NA is very general and will match CoreOS.
* Add changelog
* Add unit tests
Only add tests for Clear Linux parsing since that was the cause of this issue.
* Add support for Windows hosts in the SSH connection plugin
* fix Python 2.6 unit test and sanity issues
* fix up connection tests in CI, disable SCP for now
* ensure we don't pollute the existing environment during the test
* Add connection_windows_ssh to classifier
* use test dir for inventory file
* Required powershell as default shell and fix tests
* Remove exlicit become_methods on connection
* clarify console encoding comment
* ignore recent SCP errors in integration tests
* Add cmd shell type and added more tests
* Fix some doc issues
* revises windows faq
* add anchors for windows links
* revises windows setup page
* Update changelogs/fragments/windows-ssh.yaml
Co-Authored-By: jborean93 <jborean93@gmail.com>
* initial commit
* fixed the linting and requests error
* updated test file setup
* updated code as per feedback
* updated test import
* updated test import with unittest
* updated validate certs for https
* updated after pep8 test
* removed under-construction remark
* Initial commit
* removed type for tests
* removed types and added ssl compatibility
* applied return type
* applied return type as dict instead of obj
* applied types in eact field
* tested with a playbook
* modified owner
* added unit test
* following pep8 guidelines
* added mock and unittest separately
* Sanity check using pep8
* added full path on patch
* ios_logging: fix the error checking the existence of "host" destinations (IOS 12)
In the "have" list, records of type "host" do not contain the key "size",
although in the list "want" it is always there. Because of this, the module
assumes that the "host" type destinations is not configured and does it again.
This does not change the configuration on the device, but is redundant and
the status of the task will always be "changed". This patch fixes it.
* ios_logging: fixes#53227
* ios_logging: minor changes in string matching