* Don't use getattr in _get_parent_attribute to avoid recursion issues
Fixes#23609
* Move extend/prepend to field attribute
Also removes _get_attr* methods that were basically just calling
_get_parent_attribute because it needed to set those params.
Also modifies _get_parent_attribute() to pull those values from the
FieldAttributes instead of using the ones passed into the function.
* Better fixes for _get_parent_attribute
* Removes deprecated code from bigip_monitor_tcp
The deprecated code was moved into its own modules. We let it lay
here for a release, and now I'm removing it.
* Fixing upstreaming tests
This module can be used to create GTM servers (not to be confused with
GTM virtual servers) on a BIGIP. GTM servers are a component of the
datacenter, and GTM virtual servers are their members.
* basic.py: add mock to os.path.exists
* set_*_if_different: if check_mode enabled & file missing: set changed to True
Fixes#32676
Thanks to mscherer and Spredzy for the distributed triplet programming
session!
* galaxy unit tests: add missing program name
* galaxy unit tests: remove incorrect switchs
- 'install' action doesn't support '--offline' switch
- 'remove' action doesn't support '--init-path' switch
* Add integration test for missing attempts in until with failed/changed_when
* Extend tests to validate additional known behaviors of do-until loops
* Inject attempts into result earlier
This fix adds new module for managing various roles in
local ESXi server. Also, adds integration tests for this change.
Fixes: #27899
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Code refactor to use f5 coding conventions. Removed deprecated
"enabled/disabled" params (this is now a state). Adds token cleanup
for cases where many api calls are made.
This refactors the bigip_virtual_server module to address several issues and
missing features. Additionally it adds tests and updates the coding standards
to the recent version used by f5. Finally, it removes deprecated items that
were announced in 2.4
* Readd zypper tests
The tests were reenabled in #33034, but some tests were removed.
Readd the tests in a mostly distro-version-independent way.
* Remove with_items and use native yaml
* Dynamically determine test URL
This fix adds support for Virtual Machine resource allocation
information. This information is related to limit and reserve CPU and Memory
of virtual machine.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* mutually_exclusive add - ios_config parents works with lines by not src
* mutually_execlusive parents,src added to all other net modules
* tests for mutually_exclusive parents,src and whitespce removal
* obscure type promotion issue in some versions of Powershell causes [int]::MaxValue to be promoted to [int64] when doing a COM property get or set. Since the "All" profiles value of 0x7FFFFFFF is [int]::MaxValue, it would trigger "Specified cast is not valid" when modifying a rule that's already set to All Profiles or trying to be.
* Fixed catch-all error handler to include exception detail
* Added test converage for this case
* Begin rewrite of win_iis_webbinding
Add integration testing, check mode and idempotency
Add support for SNI
Fix replacing SSL cert on existing bindings
* finished up initial rewrite of win_iis_webbinding
* updated test to remove tests as filters
* updated win_iis_webbinding docs
* fix more doc/formatting issues win_iis_webbinding
* Removed string empty defaults for certs. Added a few new helpful
comments.
* Revert "Removed string empty defaults for certs. Added a few new helpful"
This reverts commit 48f35faea8.
* Add module mlnxos_linkagg for configuring LAG and MLAG on Mellanox
switches
Signed-off-by: Samer Deeb <samerd@mellanox.com>
* Remove unnecessary method in unit-test
remove _execute_module and use execute_module from base class
* Add eos_interface module
* Implementation of eos_interface module
* Intergration test for eos_interface module
* Minor fix in eos_l3_interface module
* Minor fix in ios_interface integration test
* Fix CI issues
* Fix more CI issues
* update version parsing and move requirements to nso_* modules
prepare for introduction of nso_show module that has other version
requirements than the existing nso_* modules.
* Add nso_show module for retreiving config from Cisco NSO
New module that supports getting configuration and operational data
from Cisco NSO.
Shell is implemented via the command module. There was a special case
in mod_args to do that. Make shell into an action plugin to handle that
instead.
Also move the special case for the command nanny into a command module
action plugin. This is more appropriate as we then do not have to send
a parameter that is only for the command module to every single module.
* vhba template and integration test
* SAN Connectivity Policies and integration test
* VSANs and integration tests
* WWNN/WWPN Pools and integration test
* WWNN/WWPN Pools and integration test
* option description spelled out (aliased to descr)
removed docs for list of dictionaries syntax
follow ACI indent style
state absent only requires dn name match (not full prop match)
* vhba template and integration test
* SAN Connectivity Policies and integration test
* VSANs and integration tests
* WWNN/WWPN Pools and integration test
* VSANs module and integration test
* removed docs for list of dictionaries syntax
follow ACI indent style
state absent only requires dn name match (not full prop match)
* vhba template and integration test
* SAN Connectivity Policies and integration test
* VSANs and integration tests
* WWNN/WWPN Pools and integration test
* vHBA templates and integration test
* option description spelled out (aliased to descr)
removed docs for list of dictionaries syntax
follow ACI indent style
state absent only requires dn name match (not full prop match)
* vhba template and integration test
* SAN Connectivity Policies and integration test
* VSANs and integration tests
* WWNN/WWPN Pools and integration test
* SAN Connectivity Policies only
* option description spelled out (aliased to descr)
removed docs for list of dictionaries syntax
follow ACI indent style
state absent only requires dn name match (not full prop match)
* 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
* disk can be mounted to vm
* add version added
* fix lint
* Fix some mirrors
* fix lint
* remove trailing space
* fix as review comment
* fix yaml
* fix
* fix
* Minor update to doc on unmounting disk from VM
* WIP adds network subnetting functions
* adds functions to convert between netmask and masklen
* adds functions to verify netmask and masklen
* adds function to dtermine network and subnet from address / mask pair
* network_common: add a function to get the first 48 bits in a IPv6 address.
ec2_group: only use network bits of a CIDR.
* Add tests for CIDRs with host bits set.
* ec2_group: add warning if CIDR isn't the networking address.
* Fix pep8.
* Improve wording.
* fix import for network utils
* Update tests to use pytest instead of unittest
* add test for to_ipv6_network()
* Fix PEP8
* Update task definitions for network_cli
* Add connection to debug messages
* Specify connection for prepare task
* pc won't be around for connection=network_cli
* Assorted Python 3 fixes
* Give default port if ansible_ssh_port missing
* delegate -> connection
* Extend error regex
* Added module new win_disk_facts
* Corrected examples section
* Added integration tests
* Added some disk properties
* Removed whitspaces
* Extended docu
* Changed header
* Added partition, volume and physical disk output
* Removed MediaType property of phys. disk
* Added return values
Added virtual disk, volume and physical disk output
* Added docu for return values
* Removed whitespaces
* Improved and added values
- Added virtual disk return values
- Improved code
* Updated docu
* Removed whitespaces
* Removed check
* Improved code and docu
* Changed integration test
* Changed integration test
* Changed integration test
* Changed integration test
* corrected typo
* Added admin test because CIM is not available with user rights
* Changed unit prefix from decimal to binary
This fix check if DNS4 is None or not before proceeding with
other operations. Also, added unit test for this change.
Signed-off-by: Fedor Sumkin <qosys.net@gmail.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Add eos and fix tests to run multiple connections
* Update tests to report connection
* Add missing START messages
* Fix unspecified connection
* Python 3 updates
Exceptions don't have `.message` in Python 3
* Override `become` when using `connection=local`
* Slight restructuring to make eapi easier later on
* Move eapi toggle to prepare_eos
* Pull out connection on eapi tasks
Split the one monolithic test for basic.py into several files
* Split test_basic.py along categories.
This is preliminary to get a handle on things. Eventually we may want
to further split it so each file is only testing a single function.
* Cleanup unused imports from splitting test_basic.py
* Port atomic_move test to pytest.
Working on getting rid of need to maintain procenv
* Split a test of symbolic_mode_to_octal to follow unittest best practices
Each test should only invoke the function under test once
* Port test_argument_spec to pytest.
* Fix suboptions failure
Currently when we make up the return value, we take values based of the
parameters rather than the generated openssl_certificate itself.
This commits returns the actual certificate values making it all time
accurate.
* 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!
* add nxos_aaa_server IT
* add nxos_aaa_server_host ITs
* Add nxos_gir IT
* Add nxos_gir_profile_management IT
* add newly added tests to nxos.yaml
* fix nxos.yaml indentation
* fix indentation again
* skip nxos_git_profile_management IT for titanium
* change idempotency to non-idempotency check
https://docs.python.org/2/library/stdtypes.html#str.split
str.split([sep[, maxsplit]])
If sep is given, consecutive delimiters are not grouped together and are deemed
to delimit empty strings.
>>> "85563 ----------------C-- /var/lib/libvirt/images".split(' ')[0:2]
['85563', '']
>>> "85563 ----------------C-- /var/lib/libvirt/images".split()[0:2]
['85563', '----------------C--']
Tests for:
* ecs_cluster
* ecs_service
* ecs_service_facts
* ecs_taskdefinition
* ecs_taskdefinition_facts
* Add idempotency testing
Test ecs_cluster, ecs_service and ecs_taskdefinition for trivial
idempotency. Add FIXMEs to the tests because the latter two fail.
Remove unused dependencies
This fix check for ESXi server instance before proceeding
with managing local user. Also, adds integration tests for
this change.
Fixes: #32465
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Port ec2_vpc_net to boto3 and add support to expand existing VPCs
* Add s-hertel as an author for ec2_vpc_net
* Update ec2_vpc_net test for new error triggered by lack of credentials
Fix backwards compatibility
Document new return value
* Fix pep8 and return documentation
* new package_facts module
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
* remove package_facts pkg manager aliases, they are misleading
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
* fix package_facts tests now that aliases are dropped
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
* Initial commit for UcsConnection and ucs_macpool module.
Configures MAC address pools on UCS Manager.
* ansible-doc fixes
* PEP8 fixes
* pep8, pylint, and validate-modules fixes
* Correct indent issue introduced during pycodestyle cleanup
* Simplified module arugment setup.
Placed all code in main to avoid multiple calls and arg passing.
* module_utils/ucs changed to UCSModule which now handles login/logout directly
login_handle removed from module.params
doc updates on mac_list params and change to first_addr/last_addr for mac blocks
checking of all mac params
* Move module_utils to remote_management/ucs
Fix validate-modules issue with docs
* UCS MAC pool integration tests
Fixed issues with MAC pool descr and address range params
* Fixing aruba's inconsitent indenting.
* Adding config with different children indentation and unit test to confirm the different spacing does not matter.
* Fixing pylint check. Missed an r prefix.
junos integration test fails intermittently after task enables netconf
on the remote host and the second task tries to create a persistent
connection. Add a delay after the first task to ensure netconf is up
running on remote host.
* When inserting a new rule in `insert_after_rule`, check if the old rule is
the last rule, to avoid a list index out of range error when attempting to
access the next rule.
* Add a test for inserting a new rule after the last rule.
Allow CamelCase version of snake_dict_to_camel_dict
(currently only dromedaryCase is supported)
Add reversible option to camel_dict_to_snake_dict
Add tests for both of these options
* Fix vyos on network_cli on python3
bytes do not have format() in Python3
* Push connection to tasks, with bonus connection=local test
* Run tests without explicit connection set
* Add/update START messages where appropriate
* vmware_host: add reconnect and add_or_reconnect states
Add "reconnect" and "add_or_reconnect" choices for "state".
* reconnect: reconnect an esxi to a vcenter (imply it is present).
* add_or_reconnect: do the same but add the esxi if absent.
Also:
* tag the cluster_name as required (because it is).
* tag esxi_username and esxi_password as not required because
they aren't when the esxi isn't added.
* vmware_host: add + prepare/document integration tests
vmware_host module
Add integration test for the add part of "add_or_reconnect" state.
Prepare and document integration tests for the reconnect part
of "add_or_reconnect" state and "reconnect" and "absent" states.
Currently we can't test those states as ReconnectHost_Task (for
"reconnect") and EnterMaintenanceMode_Task (for "absent") aren't
implemented yet in vcsim (from vmware/govmomi)
* TestPlaybookCLI: '--flush-cache' were ignored
Check that using '--flush-cache' does something
* check that '_flush_cache' does something
There isn't any fact by default: the assertion was true even if
'cli._flush_cache()' isn't called.
* Fixing save so it still works. Adding changed as an option for save_when.
* Updating unit tests.
* Updating description to state that changed was added in 2.5.
* Added new module: Azure RM SQL Servers
* fixed sanity issues
* enabled integration test
* disabling test as Microsoft.Sql namespace not available
* renamed servers -> server
* updates as requested in the review
* udpates to sql server
* renamed module
* replaced has_key by in
* flattened results
* final updates to sql server
* updates as requested in the review
* added more tests
* deleting unexisting instance up front
* more tests
* another round of test changes
* removed uneeded test
* Change cast_list_to_dict to more generic rekey_on_member
cast_list_to_dict was taking an arbitrary data format in and returning
an arbitrary data format out. Rework this to be a more generic function
which creates a dict of dicts based on a member of the dict.
Remove cast_dict_to_list since rekey_on_member handles the use cases we
know about and cast_dict_to_list suffers from the same problems as
cast_list_to_dict. If this is still needed we could think about filters
we could add to do this in a short jinja2 pipeline.
* Fix bare excepts (bare excepts even catch sys.exit())
* allow multiple values per key in name fields in openssl_certificate
* check correct side of comparison
* trigger only on lists
* add subject parameter to openssl_csr
* fix key: value mapping not skipping None elements
* temporary fix for undefined "subject" field
* fix iteration over subject entries
* fix docs
* quote sample string
* allow csr with only subject defined
* fix integration test
* look up NIDs before comparing, add hidden _strict params
* deal with empty issuer/subject fields
* adapt integration tests
* also normalize output from pyopenssl
* fix issue with _sanitize_inputs
* don't convert empty lists
* workaround for pyopenssl limitations
* properly encode the input to the txt2nid function
* another to_bytes fix
* make subject, commonname and subjecAltName completely optional
* don't compare hashes of keys in openssl_csr integration tests
* add integration test for old API in openssl_csr
* compare keys directly in certificate and publickey integration tests
* fix typo
* ACI Encap Pool: Add new module to support VLAN, VXLAN, and VSAN Pools
* update logic for allocation_mode
* update docstring and tests
* Update filter_target since url method has been updated
* Fix _clean_result for debug callback with 1 char var names
The check in _clean_results was removing any keys that happened
to be one of the chars in ('invocation') instead of the string
'invocation'. This was meant to be a tuple but there was no comma
so the for iterated the string instead of the tuple.
Introduced in 9dba580204
Update unit test to catch this.
Fixes#33723
* Use .pop() to remove invocation from results dict
In base callback _clean_results, simplify the way the
'invocation' item is removed.
Add some more unit tests.
* Deprecate Entity, EntityCollection and use subspec in network modules
* As per proposal https://github.com/ansible/proposals/issues/76
deprecate use of Entity, EntityCollection, ComplexDict, ComplexList
and use subspec instead.
* Refactor ios modules
* Refactor eos modules
* Refactor vyos modules
* Refactor nxos modules
* Refactor iosxr modules
* Add support for key in suboptions handling
* Fix CI issues
* Refactor cloudscale API code
Move code common to all cloudscale cloud modules into a common base
class.
This is needed as a prepartion of the cloudscale_floating_ip module.
* cloudscale_floating_ip module
New cloud module to manage floating IPs on the cloudscale.ch IaaS
service.
Fix a bunch of things mentioned in the review.
Delete commented code from module. Add fix for vcsim not returning
uncommitted.
Add integration test.
Add changes suggested
* Bulk pep8 fixes - hand crafted
Fix by hand the remaining issues that autopep8 couldn't
* Next batch of hand crafted pep8 fixes
* Ignore W503
https://github.com/PyCQA/pycodestyle/pull/499
* Revert more of W503
* add acr
* acr
* acr
* fix a minor error
* add tests and fixes as suggested
* use get_mgmt_svc_client to enable bi
* fixes as zim suggested
* code refinement
* get acr instance before update
* fix a bug
* remove Classic sku as it's going to deprecate
* pass sanity test
* fix sanity
* fixes based on comments
* fix broken namespace unregistered error
* fix a bug
* fix a bug
* fix
* add register namespace
* fixes tests
* remove pdb
* add ci azure test
* removed required: false
* renamed acr -> containerregistry
* fixed spelling mistake
* fixed idempotence
* fix for idempotence was wrong
* fixed a few issues
* different log when exception different than ResourceNotFound
* self.fail instead of log
* updated sample return value
* added login server in results
* fixed else
* fixed line too long
* cmp -> __ne__
* fixed trailing whitespace
* output.changed is false when instance updated
* fix for state change
* one more update
* update instance only when location or sku has changed
* fixed syntax error
* fixed acr test
* just removed unnecessary comment to trigger ci
* update return value shape
* flatten `state`
* change credential dictionary state
* add credentials to integration tests
* fixed: win_copy: typo "file file" (double "file")
Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
* Add quotes around filenames/directories
* Fix tests for new quotes
* Fix tests for new quotes
* One more ?
* Another one...
* - Netconf plugin addition for iosxr
- Utilities refactoring to support netconf and cliconf
- iosx_banner refactoring for netconf and cliconf
- Integration testcases changes to accomodate above changes
* Fix sanity failures, shippable errors and review comments
* fix pep8 issue
* changes run_command method to send specific command args
* - Review comment fixes
- iosxr_command changes to remove ComplexDict based command_spec
* - Move namespaces removal method from utils to netconf plugin
* Minor refactoring in utils and change in deprecation message
* rewrite build_xml logic and import changes for new utils dir structure
* - Review comment changes and minor changes to documentation
* * refactor common code and docs updates
In case of workflow delete action, the returned 404 status code
considered as invalid although it's a valid code for not found (deleted)
entity.
Removed verification of the status. Only success should be verified.
Fixes#33524
* Fix typo in net_logging/eos
* This seems to be required to use eos_user in this way
* Fix indentation in net_static_route/eos
* Rework interface check in eos_vrf
This should do the right thing.
* Add some integration tests for ec2_vpc_net module
* Add a couple tests for check mode
fix typo
ensure the DHCP option set is cleaned up
* Add permissions to test policy
* Porting tests to pytest
* Achievement Get: No longer need mock/generator.py
* Now done via pytest's parametrization
* Port safe_eval to pytest
* Port text tests to pytest
* Port test_set_mode_if_different to pytest
* Change conftest AnsibleModule fixtures to be more flexible
* Move the AnsibleModules fixtures to module_utils/conftest.py for sharing
* Testing the argspec code requires:
* injecting both the argspec and the arguments.
* Patching the arguments into sys.stdin at a different level
* More porting to obsolete mock/procenv.py
* Port run_command to pytest
* Port known_hosts tests to pytest
* Port safe_eval to pytest
* Port test_distribution_version.py to pytest
* Port test_log to pytest
* Port test__log_invocation to pytest
* Remove unneeded import of procenv in test_postgresql
* Port test_pip to pytest style
* As part of this, create a pytest ansiblemodule fixture in
modules/conftest.py. This is slightly different than the
approach taken in module_utils because here we need to override the
AnsibleModule that the modules will inherit from instead of one that
we're instantiating ourselves.
* Fixup usage of parametrization in test_deprecate_warn
* Check that the pip module failed in our test
* Integration tests for zabbix_host using Zabbix on Ubuntu 14.04.
* fix duplicate yaml key in test
* .changed -> is changed, |failed -> is failed, trim configfile
* zabbix_host integration test does not need BOTMETA entry, inherited from module
This fix adds functionality to configure vmware guest parameter called
'maxMkconnections'. Also, added integration test for this change.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This fix adds functionality to support memory_reservation and
memory_reservation_lock while managing Virtual Machine.
Fixes: #20407
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Fix azure_rm_acs due to Azure breaking API change
* resolve code review feedbacks
* resolve test failures
* better name
* ignore case for vm size
* reformat code
* resolve code review feedbacks
* new windows module win_audit_policy_system
* removed the backup/restore functionality
adjusted to use run-command rather than running the command directly
adjusted testing appropriately for the above changes
* fixed issue with variable naming in testing
removed .psm1 from requires
fixed copyright
* Updated audit_type to list and added appropriate error handling
Updated testing accordingly
Fixed up documentation