Commit Graph

7888 Commits (5ef2c5314edf5e006e6180adf792d979e7dc6db0)

Author SHA1 Message Date
Abhijeet Kasurde 5ef2c5314e Fixed error handling in github_issue module (#39652)
* Fixed error handling in github_issue module

Due to recent changes in github3.py library module stopped working.
This fix adds extra error handling for new changes in library.

Fixes: #39627

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Check version

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Refactor github_issue

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
ShachafGoldstein 8e2bff407a Change S3 bucket urls to new method as per #56124 (#56418)
* Change S3 bucket urls to new method as per #56124

* duplicate / and dded changelog fragment

* Revert "duplicate / and dded changelog fragment"

This reverts commit b89d5cbe6d.

* duplicate /
5 years ago
Martin Krizek 826b99d4bd dnf: fix wildcard matching for state: absent (#56013)
* dnf: fix wildcard matching for state: absent

Fixes #55938

* Add changelog...

* Fix sanity check failure...
5 years ago
James E. King III 75788ecff4 azure_rm_virtualmachine (and _facts): add boot_diagnostics control and facts (#49661) 5 years ago
Matt Clay 4a2fa46429 Remove old references to `cloud-config-aws.yml`.
References to the new `cloud-config-aws.ini` file are provided by `"$@"` in tests.
5 years ago
Matt Clay f9b56a5b56 Add sanity test to check for unwanted files. 5 years ago
Abhijeet Kasurde 7a32bd8080
VMware: Improve vmware_portgroup (#56382)
* Rewrite vmware_portgroup module
* support check mode
* VLAN ID isn't required anymore
* VLAN ID 0 (no tagging) is the default
* Options match values in vSphere Client and vmware_vswitch module
* Policy override is configured properly
* VMware: vmware_portgroup updates
5 years ago
Gonéri Le Bouder cf78759f5b vmware_vm_facts: fix the support with regular ESXi
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
5 years ago
Gonéri Le Bouder 21d4e239b4 vmware_vm_facts: fix the test with vcsim
The VM is call `ha-host_VM0`, not `DC0_H0_VM0`. This commit adjusts
the test to make it more resilient if the VM name is different.
5 years ago
Gonéri Le Bouder 4b99a2ac50 vmware: use hostname in esxi_hostname
The use of the `hostvars[esxi1].ansible_host` was attempt to use
different hostname and IP address. But it's actually the source of
more problems.

VMware expects to be able to resolvable the host name. This means, that
if someone wants to run the test-suite, s/he needs to use a DNS or
update the `/etc/hosts` files on the different hosts.
5 years ago
Chris Van Heuveln d0f2da4f76 nxos: remove deprecated test target files (#55949)
* nxos_switchport: remove deprecated test target files

* Remove tests for nxos_ip_interface, nxos_portchannel; update nxos_interface

- `nxos_ip_interface` and `nxos_portchannnel` tests have been removed

- `nxos_interface` now uses current module `nxos_l3_interface` instead of `nxos_ip_interface`
5 years ago
anasbadaha 0f852f01c0 Adding Support For EVPN in BGP Module (#55503)
* 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>
5 years ago
anasbadaha 0cb0fa918f Adding Support for NVE Protocol in onyx_protocol (#55513)
* 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>
5 years ago
anasbadaha 031655def0 Adding Support for Traffic Class in Onyx Switches (#55577)
* 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>
5 years ago
Abhijeet Kasurde 9f86257a65
VMware: support folder param in vmware_vm_facts (#56298)
folder can be used as a filter while gathering facts about VMs.

Fixes: #56125

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
vicmunoz ecdb616954 NetApp ONTAP module for manage ipspaces (#49821)
* NetApp ONTAP module for manage ipspaces

* fixes for ci_cd and code layout

* indentation fixes

* code style fixes

* fixing yamllint issue

* unit test for module na_ontap_ipspace

* fixing sanity tests

* change pytest.skip to pytest.mark.skip

* adding ansible version to 2.9
5 years ago
Chris Van Heuveln 1554befd95 nxos_vpc:Fix multiple idempotency issues, add missing commands (#55735)
* nxos_vpc:Fix idempotency issues with multiple attributes

Several attributes were causing idempotency problems on various platforms:

- `auto_recovery`
 - This command can be disabled on certain platforms and will nvgen as `no auto-recovery`
 - When enabled it has an additional optional-keyword for changing the `reload-delay` timer value
  - This was addressed by adding a new attribute `auto_recovery_reload_delay` to handle setting the timer value
  - This new attribute is mutually exclusive with `auto_recovery`

- `/show run vpc/show run vpc all/`
 - Changed the command that gets state to `all` so that it could differentiate between `auto-recovery` and `auto-recovery reload-delay`
 - This change resulted in also changing some attribute handling withing `get_vpc`, since some attributes like `peer_gw` relied on presence of the config to determine state true or false. With `all` the config is always there so these attrs must specifically check for `'no '` in the string.

- `delay_restore`
 - This command has two additional, optional keywords that exist on some platforms and not others.
 - New attrs:
  - `delay_restore_interface_vlan`
  - `delay_restore_orphan_port`

- Modified the `sanity` test to include the new attributes and to fix the platform issues.

- Bugfix Pull Request

`modules/network/nxos/nxos_vpc.py`

- Validated `nxos_vpc` `sanity` test on these platforms, all are now 100% Pass: N35, N3K, N3K-F, N6K, N7K, N9K, N9K-F

- TBD: Future work is needed to add support for `peer_gw_exclude_gw` timers. This could be addressed in the same way as the `auto_recovery_reload_delay` changes included here.

* lint fix

* Add 'version_added' tags for new options
5 years ago
Chris Van Heuveln 8c56c116e5 nxos_snmp_user: platform fixes for get_snmp_user (#55832)
* nxos_snmp_user: platform fixes for get_snmp_user

snmp user output behavior varies quite a bit for the different nxos platforms and required several workarounds:

- N5K/N6k
 - These platforms do not support structured output for `show snmp user`.
 - The current code lands in an `except` clause when the output is not structured; so I added a new `get_non_structured_snmp_user` method to scrape the state from the regular cli output if it's present.

- N9K-F
 - The `group` data in the JSON output is different for this platform; it has a different key (just `group` instead of `TABLE_groups` or `group_names`) and it is not indexed
 - For a single group the value is a string, for multiple groups it's a list

- sanity
 - N5K/N6K/N9K-F platforms will reject `no snmp user <name> <role>` when it's the last role defined for the user.
 - workaround is to use `nxos_user` to remove the user

- Changes validated on:
 - `N3K, N3K-F, N35, N6K, N7K, N9K, N9K-F`
 - `6.0(2)A8`
 - `7.0(3)I2, 7.0(3)I4, 7.0(3)I5, 7.0(3)I6, 7.0(3)I7`
 - `7.3(2)D1`
 - `7.3(3)N1, 7.3(4)N1`
 - `8.3(2)`
 - `9.2(2), 9.2(3)`

* fix lint warning
5 years ago
Felix Fontein bd47e64bc7 Hetzner failover IP: refactoring (#56203)
* Rename helper function.

* Extract hetzner.py module_utils.

* Rewrite docs.

* Add module docs fragment.

* Split up get_failover function.

* Add tests for new function.

* hetzner_pass -> hetzner_password

* Move common argspec to module_utils.
5 years ago
Mike Wiebe d55c0cf8dc nxos_vtp_*: Fixes n6k issues (#55737)
* Add n6k support for nxos_vtp_domain

* Add n6k support for nxos_vtp_version

* Add n6k support for nxos_vtp_password

* Fix shippable error
5 years ago
Yunge Zhu f1ca5552aa fix webapp slot test (#56156) 5 years ago
Abhijeet Kasurde 499355fc13 VMware: Cleanup vCloud references (#56268)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Matt Clay 87d42ca11c Disable failing hcloud integration tests. 5 years ago
zengchen d8314e1a45 refactor moudule utils of hwc_utils.py (#55858)
* 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
5 years ago
Pavan Bidkar 34a8594c91 VMware: Modifying Rest Client to use vSphere-Api-Client instead of individual service(#55804)
* Same api client can be used for other service as well 
* Incorporated Review comments. Modified Category and Guest Fact modules which are also dependent on vmware_rest_client module util
* Adding Integration Tests for vmware_rest_client changes
* Changes to incroporate changes in vcsim testware
* Change to get vm name to attach the tag
5 years ago
Nathaniel Case 0bead3672f eos_config: Fix test issues (#56180)
* Alter tests to pass

* Change diff_against to make changed work again

* Add another diff_against

* Expose supports_sessions across all EOS connection types

* Change session warning to failure

* supports_sessions needs to be a method to survive the rpc boundary

* Alter tests to match
5 years ago
Paul Belanger f9589bd4b1 Don't validate ip address for mgmt interface (#56136)
It is possible the EOS appliance doesn't have an IP address on the
management1 interface, instead just check we have found that interface.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
rajaspachipulusu17 458b473d06 Pluribus network prefix list module (#55686)
* Pluribus network prefix list module

* Doc fix and unit test fix

* Added default value with args spec change

* Sanity fix
5 years ago
Mike Wiebe bceca72eb7 nxos_interface: Fix admin_state check for n6k (#55673)
* Fix admin_state check for n6k

* Fix rx and tx_rate intent check test
5 years ago
Strahinja Kustudic a5b6a161b5 sysctl will now return an error if the value is invalid (#55695)
* sysctl will now return an error if the value is invalid

sysctl can fail to set a value even if it returns an exit status 0. More
details: https://bugzilla.redhat.com/show_bug.cgi?id=1264080. Because of
this in case of an invalid value or a read-only file system, sysctl
module would return OK, even though it didn't set anything. To be sure
that sysctl correctly applied the changes we also need to check the
output of stderr.

* Run sysctl with LANG=C

Because we are parsing sysctl stderr we need to make sure that errors
are persistent across different system language settings.

* Add changelog fragment for sysctl
5 years ago
Chris Van Heuveln cf585831b4 nxos_banner: test file cleanup (#55992)
- Created `sanity.yaml` to contain all of the tests previously kept in separate files

- Removed `cli` and `nxapi` test directories

- Tested on current supported platforms and versions: `N3K,N6K,N7K,N9K,N3K-F,N9K-F`
5 years ago
Trishna Guha 2e8a3efccb
Revert nxos, ios, iosxr return_timestamps (#56206)
* Revert "nxos_command:run_commands results failure when commands array size >1 (#52670)"
This reverts commit 0df5b92af3.
* Revert "added timestamps to nxos_command module (#50261)"
This reverts commit e150943314.
* Revert "added timestamps to ios_command module (#50323)"
This reverts commit 2a432a093b.
* Revert "added response_timestamps to iosxr_command module (#50095)"
This reverts commit 2a0c356da9.
5 years ago
Brian Coca deae5b1bce
remove deprecated get_md5 from stat (#55659)
* remove deprecated get_md5 from stat

  fixes #55309

* removed get_md5 from tests involving stat

* keep get_md5 but hide it

* rst it

* ammended comment

* ws

* added ignore for hidden md5
5 years ago
Will Thames cd95843ea5 Make ansible adhoc work with include_role (#56163)
* Make ansible adhoc work with include_role

Fix logic condition so that include_role works
without

```
ERROR! 'async_val' is not a valid attribute for a IncludeRole

The error appears to be in 'None': line 0, column 0, but may
be elsewhere in the file depending on the exact syntax problem.

(could not open file to display line)
```

* Add include_role test for adhoc
5 years ago
Trishna Guha 57e0567310
fix nxos_vlan mode idempotence bug (#55144)
* fix nxos_vlan mode idempotence bug

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Fix CI failure

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
5 years ago
Felix Fontein 7a957ba64a openssl_certificate: fix passphrase handling for cryptography backend (#56155)
* Make sure passphrase is bytes string.

* Fix typo.

* Add more passphrase tests.

* Fix test names.

* Add changelog.
5 years ago
Felix Fontein ba9fee6c37 Hetzner failover IP module (#56103)
* First version of Hetzner failover IP module.

* Extend module.

* Add comments.

* Add basic unit tests.

* Add more tests.

* Tests for set_failover.
5 years ago
Anatoly Pugachev 6e73150244 refactor iscsi network facts module, remove external grep call, add unit test (#55643)
* 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
5 years ago
Abhijeet Kasurde 2007a79952
VMware: Add managed object id in VM facts (#53523)
Fixes: #53372

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Ganesh Nalawade ae373d5a10
Fix cli_config junos integration test failures (#56159)
*  Priviledge escalation is not required for junos
   cli_config backup opeation.
5 years ago
Andrey Klychkov f79b6b06f1 postgresql_table: added cascade option (#56068) 5 years ago
Chris Van Heuveln 0e0c2a7db7 nxos_snmp_traps: fix 'group: all' for N35 platforms (#55995)
* nxos_snmp_traps: fix 'group: all' for N35 platforms

- `group: all` attempts to enable traps for all features defined in the module's `feature_list`

- `N35` platforms do not support `snmp-server enable traps bfd`; so removing `bfd` from the `feature_list` for that platform

- Minor cleanup in `sanity.yaml` test file

* whitespace lint fix
5 years ago
Nathaniel Case d39be3d3e0 eos_bgp needs become: yes (#56131)
We don't specify that in hostvars, so add it to the tests
5 years ago
Yuwei Zhou a62f0a2fda Fix dtl test typo (#56094) 5 years ago
Ganesh Nalawade ec56ea4514
Fix junos_config backup testcase (#56148)
* For junos_config taking backup of running configuration
  does not required priviledge escalation.
5 years ago
wjohnston888 647ed207af Fixes Netconf_config single parameter bug (#56138)
* Fixes Netconf_config single parameter bug
Fixes 56022

fixed get_config to not require multiple parameters to just run a backup

* Add Integration test for netconf_config
Associated with #56022

tests backup through netconf only using one parameter.

* Added debug to the begin and end of file

* Fix formatting of save config.  #56022

* removed blank line at end: #56022
5 years ago
Deric Crago 9db3c8a40b bumped 'vcenter-test-container' to '1.5.0' 5 years ago
René Moser f42a32ad36
cs_network_acl_rule: implement cidr/cidrs as list (#56083) 5 years ago
Matt Clay 864bd941af Add support for isolated virtualenv in tests. 5 years ago
Michael Tipton dc711c3018 VMware: vCenter Cluster EVC Mode : new module (#56089)
* add vmware_evc_mode module

* alter result message for absent/absent

* Apply suggestions from code review

Co-Authored-By: CastawayEGR <36353334+CastawayEGR@users.noreply.github.com>

* add idempotency test

* change result dict to evc_mode_msg

* refactor to use pyvmomi class

* fix update to only process task on update

* minimize update code

* add single quotes around vars to match other code

* pass datacenter to cluster find

* add check_mode to disable test
5 years ago