Commit graph

4659 commits

Author SHA1 Message Date
Ganesh Nalawade
f91cda4b02
Fix junos modules check_mode issue (#37311) (#37918)
Fixes #37208

If check_mode is enabled instead of committing th config need to
discard all the chnages to cnadidate db
In case of cli to discard changes issue `rollback 0` command
and for netconf execute `discard-changes` rpc call
(cherry picked from commit 8eaa9cc938)
2018-03-29 19:00:15 +05:30
Ganesh Nalawade
ec59181a28
Fix eos_facts eapi integration test failures (#37919)
(cherry picked from commit af777c0f895fb37db0e28fbcea9ddaaa66e451e1)
2018-03-29 18:59:14 +05:30
Ganesh Nalawade
4dffcd35cd
eos_config module exit session gracefully (#37920)
Fixes #36979
If `abort` is not issued in the top level session prompt
the existing session goes to pending state.
The fix is to come out of config mode by issuing `end` command
and again to same config session and execute `abort` which
`abort` is issued at the top level session prompt.

(cherry picked from commit 017ea018d0649b8b6f392f9505992f39e99943fa)
2018-03-29 18:58:43 +05:30
Trishna Guha
a716fe97e3
nxos bugfixes cherry-pick (#38091)
* Fix nxos_switchport (#37328)

(cherry picked from commit ff57fd0bb4)

* Fix nxos_l2_interface and test typo (#37336)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit ba5e562c76)

* fix ios_l2_interface (#37389)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit dd37857884)

* fix required args for nxos_snapshot and docs improvement (#37232)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit a10df8b0b5)

* add nxos_snapshot test for missing required param (#37248)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 2501834c42)

* Ensure network_cli nxos test is run only once - remove unnecessary files (#37462)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 957ab02e52)

* Integration Tests only: nxos_user (#37852)

* add new integration file to nxos_user

* fix shippable error

* change nxapi to connection

* review comments

(cherry picked from commit 63da50e1d8)

* fix UnboundLocalError nxos_bgp_af module (#37610)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 00abe6dbe7)

* Fix nxos_vrf issues (#37092)

* fix nxos_vrf issues

* fix doc

(cherry picked from commit dc61f4c6b1)

* fix nxos_vrf_af issues (#37211)

(cherry picked from commit 74e79d9f5e)

* fix nxos_udld issues (#37418)

(cherry picked from commit 05b266cc66)

* fix nxos_vlan issues (#38008)

(cherry picked from commit 6f2cb28bb9)

* add changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-29 08:47:32 -04:00
Will Thames
60e7aa0dbd [cloud]Ensure SGs in default VPCs get default egress rule (#38018)
SGs created when a VPC ID was not specified would not necessarily
get the default egress rule, even when no explicit egress rules
were set.

Add some checks for egress rules in results from existing tests

(cherry picked from commit 98b29f8ad6)
2018-03-28 17:52:17 -04:00
msven
ae4c246a3c ec2_asg: fix #28087 and #35993 (#36679)
Fixes #35993 - Changes to update_size in commit eb4cc31 made it so
the group dict passed into update_size was not modified. As a result,
the 'replace' call does not see an updated min_size like it previously
did and doesn't pause to wait for any new instances to spin up. Instead,
it moves straight into terminating old instances. Fix is to add batch_size
to min_size when calling wait_for_new_inst.

Fixes #28087 - Make replace_all_instances and replace_instances behave
exactly the same by setting replace_instances = current list of instances
when replace_all_instances used. Root cause of issue was that without lc_check
terminate_batch will terminate all instances passed to it and after updating
the asg size we were querying the asg again for the list of instances - so terminate batch
saw the list including new ones just spun up.

When creating new asg with replace_all_instances: yes and lc_check: false
the instances that are initially created are then subsequently replaced.
This change makes it so replace only occurs if the asg already existed.

Add integration tests for #28087 and #35993.

(cherry picked from commit a2b3120e85)
2018-03-28 17:36:32 -04:00
Matt Martz
0b0bb65198
Backport #36372 for 2.5 (#37666)
* Fix name parameter templating in include_role module (#36372)

An IncludedFile() object built using the original_task will have
its _task bound to the original_task. The iterative reassignment of
original_task._role_name during with_item loops leaves all returned
included_files with the same ._task._role_name (the final name from
the with_items list). This commit builds IncludedFile() objects
from an original_task.copy() to avoid the problematic binding.

(cherry picked from commit 54e70fc783)

* Test include role with items in name #36372 (#37001)

* Tests for #36372

* Tests for #36372

* Tests for #36372

(cherry picked from commit 8c4f349743)

* Add changelog for #36372
2018-03-28 11:05:03 -05:00
Matt Martz
687780323a
Backport #37881 for 2.5.1 (#37937)
* Don't overwrite builtin jinja2 filters with tests (#37881)

* Don't overwrite builtin jinja2 filters with tests. Fixes #37856

* Fix tests and other callers of _get_filters

(cherry picked from commit 1f824bd620)

* Add changelog for #37881
2018-03-28 11:04:44 -05:00
Matt Clay
2665912356 Fix docker_secret test on RHEL.
(cherry picked from commit f1899f784b)
2018-03-22 12:03:03 -07:00
Matt Clay
6b0b4ddf00 Pin httptester SHA.
(cherry picked from commit 8232c95f42)
2018-03-21 10:02:11 -07:00
Matt Clay
61887e7c2f Fix uri test on Python 2.6.
(cherry picked from commit 1fd9a616a4)
2018-03-21 10:02:03 -07:00
Sebastian Gumprich
20fcaeb854 fix spelling mistakes in several modules (#36296)
* fix more spelling mistakes

* fix spelling mistakes

(cherry picked from commit 16c564c4b4)
2018-03-15 17:57:11 -07:00
Matt Clay
5ebce3e618 Disable failing github_issue integration test.
(cherry picked from commit 30bb70cf2d)
2018-03-15 17:40:20 -07:00
Dag Wieers
1381de72d0 Backport of ACI document changes (#37502)
* Backport of ACI document changes

* Add missing test change
2018-03-15 17:35:18 -07:00
Toshio Kuratomi
c264061272 Bkprt conn err msg no template (#37381)
*  Connection error messages are unsafe: wrap them (#37329)

* Check that connection error msg are not unsafe

* Connection error messages are unsafe: wrap them

For example, in case of error, docker connection plugin returns exception
message containing Go template. These messages weren't tagged as unsafe
and were consequently rendered:

The conditional check 'result is failed' failed. The error was:
{
  'msg': u'Docker version check ([\'/usr/bin/docker\', \'version\', \'--format\', "\'{{.Server.Version}}\'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied\n',
  'failed': True
}:
template error while templating string: unexpected '.'.
String: Docker version check (['/usr/bin/docker', 'version', '--format', "'{{.Server.Version}}'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied

(cherry picked from commit 4378542ac7)

* Add a changelog for the no-template error message fix
2018-03-15 13:52:33 -07:00
Jordan Borean
acef6d25b1 powershell: backport environment string handler fixes 2.5 (#37223)
* win: handle non string as an environment value (#37215)

* win: handle non string as an environment value

* Changed powershell environment handler to use .net function instead for special chars

(cherry picked from commit 708869edd6)

* Added changelog fragement for powershell environment handler fix

* typo in changelog
2018-03-08 14:49:22 -08:00
René Moser
9e315f15ee
cs_instance: fix py3 user_data base64 (#37135) (#37199)
* cs_instance: tests: reproduce py3 user_data base64 issue

* cs_instance: fix base64 encoding with py3

(cherry picked from commit 0130490faa)
2018-03-08 17:57:14 +01:00
Abhijeet Kasurde
4477ce809f VMware: Re-enable VM poweroff testcases (#36734) (#36765)
This testcases were failing due to vcsim version.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 87d6bdaf98)
2018-03-08 08:40:09 -08:00
Trishna Guha
2e145cd1f2
fix nxos_switchport/l2_interface trunk_vlans state absent (#37180) (#37181)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 02999b77a4)
2018-03-08 18:22:43 +05:30
Jordan Borean
09de6dc020
win_uri: backport return value fix for non 200 responses (#37156)
* win_uri: return response info on non 200 responses, convert DateTime values to ISO 8601 (#37104)

(cherry picked from commit c1f5e11cdf)

* Added changelog fragment for win_uri return value fix
2018-03-08 10:38:32 +10:00
René Moser
f230d8e9c4 cs_router: fix missing doc (#37107)
* cs_router: fix missing doc

* update ignore.txt

(partly cherry picked from commit e1297af18a)
2018-03-07 19:12:25 +01:00
René Moser
c054527d65 cs_ip_address.py: fix missing doc (#37109)
* cs_ip_address.py: fix missing doc

* update ignore.txt

(partly cherry picked from commit 67d8c8f5c6)
2018-03-07 19:12:25 +01:00
Trishna Guha
ee67c6c1e3
fix nxos_l2_interface tests for fretta (#37086) (#37101)
(cherry picked from commit b7bc61c7df)
2018-03-07 10:42:16 +05:30
Nathaniel Case
2be960f84a
Don't fail on configure in command (#37094)
* Don't fail on configure in command

* Change test to check mode

(cherry picked from commit efb8b539c1)
2018-03-06 18:24:43 -05:00
Jordan Borean
f0a808e02c Win lineinfix fix (#36888)
* Win lineinfile fix (#35100)

* win_lineinfile: fix #33858. Removed conversion from \r\n

* win_lineinfile: added test for #33858

* win_lineinfile: added documentation and more tests for change

* win_lineinfile: fixed wrong hash in testing

(cherry picked from commit e15a903bdf)

* Added changelog for win_lineinfile fix

* fix typo in changelog
2018-03-06 13:05:31 -08:00
John R Barker
e03b17e2e5
filesystem: fix documentation (#36556) (#36633)
(cherry picked from commit 07927f52ae)
2018-03-06 08:35:54 +00:00
Ganesh Nalawade
bbf27efe06
Fix eos integration test failures (#37020) (#37054)
Fixes #36919

Fix other eos modules integration test failure in dci
(cherry picked from commit ba3201cd2f)
2018-03-06 10:24:54 +05:30
Nathaniel Case
a3f96ec4af
ios_static_route idempotence fix (#35912) (#37012)
* Remove default admin_distance and fix the idempotence thereof

Fixes #33290

* Fix tests and use yaml anchors to shorten tests

* Add test for undefined admin_distance

* Read config from `show run` if `show ip static route` fails

* Restore flags to ios.get_config &  use get_config where appropriate

(cherry picked from commit 7016b3b9ca)
2018-03-05 10:48:18 -05:00
Ganesh Nalawade
3f8377c2d9
Enable eapi integration test for eos modules (#36934) (#36935)
(cherry picked from commit 83c3561ee5)
2018-03-02 13:02:52 +05:30
Ganesh Nalawade
a275a39299
Fix eos_vrf integration test failures (#36893) (#36896)
(cherry picked from commit 5c2a1a6124)
2018-03-01 14:30:29 +05:30
Trishna Guha
f3653747bb
Fix nxos_interface multiple issues (#36827) (#36891)
* fix interface_type

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

* fix setting mtu, doc for state check param, doc for params applicable for ethernet intf

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

* speed idempotence and add unittest

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

* fabric_forwarding_anycast_gateway applicable for svi type intf only

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

* fix speed

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 2fbfce06e7)
2018-03-01 11:19:02 +05:30
John R Barker
d4252c89e9
nso_config break cycles in dependency sorting (#36828) (#36838)
False assumption that values can not have cyclic dependencies. Fix by
removing dependency on self and look for cycles, if found remove
dependency to get a partial sort done.
(cherry picked from commit 042c111563)
2018-02-28 11:33:18 +00:00
Trishna Guha
fb630c926a
nxos_facts fix and integration tests (#36796) (#36820)
* fix nxos_facts ipv6 error

* time_range not supported for N35

(cherry picked from commit db43fe6a76)
2018-02-28 10:54:35 +05:30
John R Barker
19ea7bcdd8
nso_config work around ordering issues (#36774) (#36785)
Include dependencies when sorting entries to avoid issues with certain
versions of NSO.
(cherry picked from commit e75989ec88)
2018-02-27 15:41:34 +00:00
David Newswanger
e1eae55e55
skip fmg_script unit test if the pyFMG script is not present (#36732) (#36749)
* skip fmg_script unit test if the pyFMG script is not present

* appease the sanity test gods

(cherry picked from commit 6bd715a17d)
2018-02-26 12:41:14 -05:00
René Moser
eb12520854
cs_sshkeypair: fix ssh key rename (#36726) (#36730)
* tests: cs_sshkeypair: add reproducer for failed key rename

* cs_sshkeypair: fix rename ssh key

(cherry picked from commit cdb2969703)
2018-02-26 15:45:39 +01:00
John R Barker
5052db2698
NSO ValueBuilder improvements. 4.5 leaf-list compatability. (#36583) (#36735)
Fix issues in ValueBuilder used in nso_config and nso_verify so that it
can handle leaf-list in NSO 4.5 and detect identityref types from
unions.

Fail gracefully if a type is not found.
(cherry picked from commit 2789cc5c09)
2018-02-26 13:50:11 +00:00
Peter Sprygada
0aa62a54cd allows ib_spec attrs to be filtered in update (#36673)
* allows ib_spec attrs to be filtered in update

This change will allow the ib_spec entries to be be filtered on a change
object by setting the update keyword to false.  The default value for
update is true.  When the update keyword is set to false, the keyed
entry will be removed from the update object before it is sent to the
api endpoint.

fixes #36563

* fix up pep8 issues

(cherry picked from commit 93b795baf0)
2018-02-26 08:17:55 -05:00
Trishna Guha
b1bdc5dae2
nxos_vlan, nxos_linkagg fix (#36711)
* fix nxos_vlan aggregate (#36710)

* fix nxos_vlan aggregate

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

* Add test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 44332bda78)

* nxos_linkagg fix (#36706)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit d6912cf40e)
2018-02-26 13:01:20 +05:30
Ganesh Nalawade
d60eac9bc4
Decouple config and state check in vlan and vrf network modules (#36386) (#36704)
* Decouple config and state check in {network_os }_vlan and { network_os }_vrf modules

Fixes #35567
Fixes #34754

`interfaces` option is used for configuration as well as operational state
check. If interface is configured to given vlan or vrf but if
operational state of interface is disabled it results in module failure.

Fix is to decouple same option usage for config and state.
With this fix `interfaces` is used as config option and a new
option named `associated_interfaces` will be used for intent check
for assigned interfaces.

* Fix CI failures

* Fix review comment

* Fixed integration test failure

(cherry picked from commit 5a6b893240)
2018-02-26 10:16:39 +05:30
Matt Clay
a48254275f Temporarily disable subversion test on osx.
(cherry picked from commit f283edcb19)
2018-02-24 17:26:39 -08:00
Matt Davis
ed9781bbfb
Do not cache the loop item label so that it will update with each item (#36609)
Add integration test for #36430 (#36432)

(cherry picked from commit d1f76939e5)
(cherry picked from commit 9fced4f0a9)
2018-02-22 16:08:00 -08:00
Dag Wieers
b1e125b718 Backport missing integration tests (#36610)
Somehow this file was missing from the previous backport.
2018-02-22 15:18:06 -08:00
Jordan Borean
f8d8d84f05 Win feature error cp (#36559)
* win_feature: better error handling to make it easier to debug issues (#36491)

* win_feature: better error handling to make it easier to debug issues

* removed ignroed pslint rules that are no longer needed

(cherry picked from commit ef4f8851dc)

* Added changelog for win_feature error handling fix
2018-02-22 15:05:13 -08:00
Matt Martz
9bd7147bb8 Start of tests for modify_module, specifically to ensure proper shebang replacement on old style modules (#36602) (#36606)
(cherry picked from commit a7062b7587)
2018-02-22 14:56:03 -08:00
Abhijeet Kasurde
980b6a00e2 Fixup VMware module docs issues (#36409) (#36523)
Fix various argspec vs documentation issue

(cherry picked from commit 5d0ed38e3a)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-22 08:44:09 -08:00
Sam Doran
84debca5fb Check for regexp match when using insertbefore or insertafter (#36474) (#36552)
Add tests to cover this scenario
Add changelog fragment
Fixes #36156

(cherry picked from commit 723daf3e3a)
2018-02-21 18:08:45 -08:00
mikedlr
26cdfd84a0 Bring aws_ssm None fixes into stable (from #36456) (#36492)
* aws ssm parameter lookup - change to reutrn Nones for missing variables

* aws ssm parameter lookup - fix error case message to dump response

* aws ssm parameter lookup - fix integration test cases
2018-02-21 20:53:31 -05:00
Dag Wieers
df78df5d90 Apply all devel ACI changes missing from stable-2.5 (#36553) 2018-02-21 15:36:47 -08:00
Toshio Kuratomi
7f9fdbbb30 Revert "remove query/q (#36315)"
This reverts commit b47d2e07e1.

query is a feature for 2.5.  We're not reverting it now.

(cherry picked from commit 03a6d72633)
2018-02-21 11:03:55 -08:00
Sloane Hertel
77af8f36cb [cloud] Retry WAF actions on WAFStaleDataException (#36405) (#36507)
Add a util to run functions with AWSRetry to retry on WAFStaleDataExceptions and update ChangeToken for each attempt
2018-02-21 13:46:29 -05:00
Brian Coca
7188165dd1 remove query/q (#36315)
* remove query/q

remove and fixed tests for removed func

* paren fix

(cherry picked from commit b47d2e07e1)
2018-02-21 10:45:50 -05:00
Jordan Borean
9b00fd4ca1
fetch: set fail_on_missing: True as default as per docs (#36469)
* fetch: set fail_on_missing: True as default as per docs

* Updated docs for fetch to say behaviour was changed in 2.5 and updated tests

(cherry picked from commit df8a5d7a4f)
2018-02-21 18:11:32 +10:00
Deepak Agrawal
6ff000254f
vyos_config IndexError in sanitize_config (#36375) (#36484)
* Bug in del(list) logic. Say you have a list of 4 elements a[0-3]
and you have to remove index 1 and 3, if you remove index 1 first
then list is cut short a[0-2] and does not have index 3

Fix: Remove indexes in reverse sorted order e.g. 3 and 1 in above
example so that order of indexes remain preserved even after deleting

fix is to remove indexes in reverse sorted order

* Add test cases for failed case

(cherry picked from commit 0bbea9a579)
2018-02-21 12:06:16 +05:30
Trishna Guha
d86d4907cc
fix nxos_bgp_neighbor_af issues (#36472) (#36481)
(cherry picked from commit 47a92386c9)
2018-02-21 10:29:18 +05:30
Matt Clay
8db5d139a1 Fix path handling in validate-modules sanity test.
(cherry picked from commit a9b58b84d8)
2018-02-20 13:57:58 -08:00
Trishna Guha
108cbbc40e
fix vyos_l3_interface adding multiple addresses to interface (#36377) (#36443)
* fix vyos_l3_interface adding multiple addresses to interface

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

* add test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 3d06ce245a)
2018-02-20 21:07:17 +05:30
Brian Coca
0ee6771659 remove extra fields from debug output
fixes #35493

updated tests

(cherry picked from commit a79378fccb)
2018-02-20 08:46:12 -05:00
Trishna Guha
21b74f7cce
fix nxos_bgp_neighbor issues (#36318) (#36420)
(cherry picked from commit 80d19e6af3)
2018-02-20 11:21:33 +05:30
Trishna Guha
9692394c7d
Stable 2.5 (#36374)
* Set hostname to 'switch' on nxos_system (#36373)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit eb7f4460c8)

* fix nxos_config json pipeline error (#36236)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 736d6406c0)
2018-02-19 11:22:30 +05:30
Trishna Guha
22b4d69a7b
nxos_system test fix inventory_hostname_short (#36359) (#36360)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit a5654bd63c)
2018-02-18 10:38:34 +05:30
Trishna Guha
b08bdc5f6d
nxos fix cherry-pick (#36340)
* Fix nxos_system tests (#36201)

* Fix nxos_system tests

* Add debug connection plugin info

* Move sanity test under common

(cherry picked from commit 5b5d24631a)

* Fixes for the N3500 platform that uses the A8 image (#36261)

* fix nxos_l3_interface tests as n35 doesn't support ipv6

* add terminal dont-ask to nxos_feature and nxos_lldp

* put interfaces in L2 mode for N35

* fix nxos_feature unit-tests

(cherry picked from commit e24c547a3a)
2018-02-17 12:20:42 +05:30
David Newswanger
cf196613ff
re enabled tests that were fixed in ansible/ansible-modules-core#5008 (#36257) (#36303)
(cherry picked from commit a7c2f6d092)
2018-02-16 10:54:41 -05:00
Matt Davis
62139bb828 v2.5.0b2 release cut 2018-02-16 01:13:00 -08:00
Dag Wieers
179aa475a5 aci_firmware_source: Add integration tests (#36246)
This PR includes:
- Rename 'protocol' parameter to 'url_protocol'
- Add limited integration tests (as we have no public firmware access)
- Add missing examples
(cherry picked from commit e1b5bc049c)
2018-02-15 23:53:17 -08:00
Dag Wieers
dd92db800a aci_taboo_contract: Add integration tests and examples (#36276)
This PR includes:
- Missing integration tests
- Missing examples
- Two typo's in other integration tests
(cherry picked from commit 334e405e6f)
2018-02-15 23:52:06 -08:00
Dag Wieers
51c4fceb64 aci_domain_to_encap_pool: Add integration tests (#36217)
(cherry picked from commit d86c5aee3c)
2018-02-15 23:50:07 -08:00
Dag Wieers
eb0232fa86 aci_encap_pool: Standardize on 'pool_allocation_mode' (#36215)
(cherry picked from commit e431d578da)
2018-02-15 23:46:35 -08:00
Dag Wieers
66e7c8d938 ACI: Avoid using 'previous' with query operations (#36181)
When ACI modules are being used for querying MOs, we should not return
the previous state, as there is no previous state, there's only the
current state.

This impacts a lot of tests that were used to testing the current state
as 'previous'.
(cherry picked from commit dba561efa7)
2018-02-15 23:45:50 -08:00
Dag Wieers
38b000062f aci_vlan_pool: Improve integration tests (#36173)
This PR includes:
- More elaborate integration tests
- Split static and dynamic VLAN pools in separate files
(cherry picked from commit 3093285c94)
2018-02-15 23:44:12 -08:00
Abhijeet Kasurde
fb46cf3718
VMware: Fix DVPG idempotency issue (#36285)
This fixes, cloning operation where template or existing VM
does not have network or DVPG. Also, adds some strict type checking in
network parameters.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit a377302d6b)
2018-02-16 13:07:23 +05:30
Dag Wieers
5ce2822855 aci_aep_to_domain: Fix query all objects (#36131)
This PR includes:
- A fix to the module where domain_type without domain caused havoc
- A fix to the integration tests when querying all binding objects
- Improvements to integration tests
(cherry picked from commit 7897558b95)
2018-02-15 23:36:11 -08:00
Dag Wieers
b85989205f aci_domain_to_vlan_pool: Add missing integration tests (#36079)
(cherry picked from commit 9f028e9dea)
2018-02-15 23:33:46 -08:00
Dag Wieers
e81c181881 aci_aep_to_domain: Add missing integration tests (#36071)
(cherry picked from commit 98a3059f7b)
2018-02-15 23:32:22 -08:00
Dag Wieers
eec7945222 aci_interface_policy_leaf_policy_group: Fix tests (#35973)
(cherry picked from commit d76db835ff)
2018-02-15 23:30:06 -08:00
Dag Wieers
76648f358e ACI: Fixes to recent change to parameter choices (#35968)
This PR includes:
- Fixes related to the recent merge of #31637 and #34537
- A generic fix for a reference for assignment issue
- Fixes to aci.boolean() in order to catch exception
(cherry picked from commit 01ba3a4efc)
2018-02-15 23:28:42 -08:00
Dag Wieers
c5f7b5baa5 aci_domain: Add missing integration tests (#36051)
(cherry picked from commit 30adc2f124)
2018-02-15 23:11:40 -08:00
Abhijeet Kasurde
92e64c9eb9
VMware: re-enable vmware_guest_powerstate tests (#36094)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 66743f33fa)
2018-02-16 11:01:19 +05:30
Trishna Guha
fe9e887f86
fix nxos_bgp_af issues (#36147) (#36283)
* fix nxos_bgp_af issues

* shippable fix

* review comments

* shippable error fix

(cherry picked from commit 75a34f6668)
2018-02-16 10:12:42 +05:30
John R Barker
784932875f
Reduces the unit test time of select bigip modules (#36256) (#36260)
The modules in this patch include waits that need to happen to ensure
something is correctly configured on a BIG-IP. These waits were
raised as an issue in a recent ansible-testing meeting.

This patch eliminates the waits by mocking time.sleep
(cherry picked from commit 77fa41795e)
2018-02-15 20:28:45 +00:00
Toshio Kuratomi
a7a03bbf4a Normalize usage of temp and tmp on tmp (#36221)
* Normalize usage of temp and tmp on tmp
* Rename system_tmps system_tmpdirs
* Add ANSIBLE_REMOTE_TMP spelling of environment variables

(cherry picked from commit 06f73ad578)
2018-02-15 09:01:33 -08:00
Monty Taylor
4848652c7a Add a module_utils OpenStack Cloud constructor (#20974)
Start using this to construct shade OpenStack Cloud objects in a
consistent manner. This will let us centralize things like dealing with
password arguments and whatnot. It also allows us to introduce the
ability to pass a fully formed config dict directly to the module.

Migrate all OpenStack modules to use openstack_cloud_from_module.

Have it return the shade library since it's responsible for
importing shade and shade is needed for the exceptions.

Only pull specific OpenStack arguments for the constructor

Rather than passing **module.params to the shade constructor, pull out
only the values that make sense. This should prevent the issues with
module parameters stepping on shade parameters.

Replace module.params.pop with module.params.get

We don't need to pop these anymore since the shade constructor is now
using opt-in values.

Using real urls is ungood. Use example.com domains. Also, get rid of the
antiquated port numbers.

(cherry picked from commit 0f893027c4)
2018-02-15 17:59:05 +01:00
Trishna Guha
a6be3df24c
Fix nxos_linkagg tests (#36175) (#36222)
(cherry picked from commit 787114462e)
2018-02-15 11:07:18 +05:30
Brian Coca
74b120329c never tags docs and test (#35964)
* fufilling the promise

* moved changes

* Copy edit

(cherry picked from commit 0cf70a8970)
2018-02-14 20:34:11 -05:00
David Newswanger
078467d18d 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

(cherry picked from commit 3f5caf659e)
2018-02-14 15:41:43 -08:00
Jordan Borean
7dd4625dde
win_uri: fix creates/removes option (#36016)
(cherry picked from commit f8d1c97279)
2018-02-15 07:17:59 +11:00
Jordan Borean
375bc11139
win_updates: fix regression when using string cat names (#36015)
(cherry picked from commit 8fb66c18de)
2018-02-15 07:16:42 +11:00
John R Barker
67d14c963a
Add unit tests for edgeos_command (#35861) (#36184)
(cherry picked from commit 97573d8b0c)
2018-02-14 15:42:27 +00:00
John R Barker
8833823195
Ensure docs are valid before checking deprecation (#36160) (#36182)
(cherry picked from commit 3e22efa0ba)
2018-02-14 15:39:36 +00:00
David Newswanger
3e8b0487bb
[WIP] Add ios smoke tests (#35972) (#36133)
* added basic ios_smoke files

* added smoke tests for network.common.config

* added tests for network.common.utils

* added remainder of test cases

(cherry picked from commit 01bd9759e3)
2018-02-13 14:06:09 -05:00
Nathaniel Case
707fd61a78
Fix VyOS check mode (#35977) (#36114)
* Revert "commented out check tests (#35788)"

This reverts commit 3df2561405.

* `discard_changes()` now uses `exit discard`

instead of just `discard`. Also a slight tweak to avoid a second `exit` after
`exit discard`

(cherry picked from commit 6cdf91fd35)
2018-02-13 10:31:04 -05:00
Trishna Guha
be92a5f876
fix nxos_interface_ospf issues (#35988) (#36090)
* fix nxos_interface_ospf issues

* review comment

(cherry picked from commit eab1b62cd2)
2018-02-13 10:11:12 +05:30
Matt Davis
96b682b157 cherry-pick disable of unstable azure tests 2018-02-12 10:31:10 -08:00
John R Barker
c232d6cb85
Fix more docs vs argspec (#36048) (#36052)
(cherry picked from commit 17c0d3eae0)
2018-02-12 18:05:39 +00:00
Ganesh Nalawade
1b9dde7c29
Fix vrf parsing in eos_vrf and eos_eapi module (#35791) (#36023)
* Fix vrf parsing in eos_vrf and eos_eapi module

Fixes #30250

Fix logic to parse vrf when interface value in `show vrf`
command output spans on multiple lines

* Add idempotent test case

(cherry picked from commit 6a223d5576)
2018-02-12 12:59:45 +05:30
Matt Davis
50e79c5a14 initial cutover to API profiles (#35538)
* hardcoded API profiles in azure_rm_common
* changed azure_rm_securitygroup module to use api_profiles, dynamic models, kwargs on all SDK methods
* changed azure_rm_containerinstance module to use api_profiles, dynamic models, kwargs on all SDK methods
* fixed polling performance issue in azure_rm_securitygroup (default poll interval was 30s)
(cherry picked from commit 26f551d1c3)
2018-02-09 14:27:30 -08:00
Ryan Brown
a1d53b4e98 Tower callback fixes (#35927) (#35981)
* Fix tower_callback script return code

* Add ec2_key parameter to integration tests
2018-02-09 14:55:28 -05:00
Trishna Guha
e2e6e14644
fix nxos_evpn_vni issues (#35930) (#35945)
(cherry picked from commit c7305393a3)
2018-02-09 17:51:53 +05:30
Toshio Kuratomi
03c73e2bbb Rename var lookup to vars and add tests 2018-02-08 08:03:41 -08:00
Toshio Kuratomi
abbac1a2ff Revert "Temporarily comment out tests causing CI errors (#35883)"
This reverts commit 157a41c843.

Have a fix for the underlying issue so reenabling the tests
2018-02-08 06:57:09 -08:00