Commit Graph

4622 Commits (92562a2ba99229f6c11f9986c0100461c9e35def)

Author SHA1 Message Date
John R Barker 05cf76cbd7
Backport/2.5/38191 (#38327)
* issue:38167 add support for onyx version 3.6.6000 for onyx_linkagg (#38191)

Signed-off-by: Samer Deeb <samerd@mellanox.com>
(cherry picked from commit 72d42bd065)

* fragment
7 years ago
John R Barker 08029a38df
issue:37307 Add support for changes in pfc output in onyx 3.6.6000 (#… (#38330)
* issue:37307 Add support for changes in pfc output in onyx 3.6.6000 (#37651)

* issue:37307 Add support for changes in pfc output in onyx 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>
(cherry picked from commit 9dfb665e43)

* fragment
7 years ago
John R Barker aed8aea3f3
issue:37306 Fix issue with vlan support for onyx version 3.6.6000 (#37310) (#37635)
* issue:37306 Fix issue with vlan support for onyx version 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>
(cherry picked from commit a89bafce2e)
7 years ago
John R Barker 323e3b6914
nso_verify handle leaf-list in 4.5 and identityref (#37393) (#37634)
* nso_verify handle leaf-list in 4.5 and identityref (#37393)

NSO verify did not handle leaf-list value verification in 4.5 and
later due to changes made for configuration writing made.

map prefix for identityref types in verification.
(cherry picked from commit 6308047dc9)

* Remove timeout
7 years ago
Jordan Borean 09dc621238
win_service: backport of special char in name handler (#38250)
* win_service: fix when dealing with paths with special chars and change WMI to CIM cmdlets (#37897)

* win_service: fix when dealing with paths with special chars and change WMI to CIM cmdlets

* compare username in lowercase for test

(cherry picked from commit f37a44430f)

* Added changelog fragment
7 years ago
Jordan Borean 800980ec83
win_copy: backport 2.5 preserve local tmp path when sending multiple files (#37977)
* win_copy: added fix for win_copy deleting local tmp folder (#37964)

(cherry picked from commit b1ac65d95a)

* Added changelog fragment
7 years ago
Jordan Borean 886a88a967
win_uri: backport fix custom header override (#37889)
* append request headers instead of replacing (#37845)

(cherry picked from commit 2c44061a04)

* Added changelog fragment
7 years ago
Jordan Borean 0c88f199ec
azure_rm_networkinterface: backport no public IP fix (#37762)
* azure_rm_networkinterface: fixed issue when public ip address should not be created (#36824)

* fixed issue when public ip address should not be created

* adding test for public ip address

* fixed samples

* another fix to sample formatting

* fixed test

* fix test

* fixed test

* another attempt to fix test

* maybe it works now

* still wrong

* improved check per customer request

* removed stupid semicolon

* updated test to match main scenario

* changed ip configurations to list

* another attempt

(cherry picked from commit 89401f13f7)

* Added changelog fragment
7 years ago
Jordan Borean d0f1a23c45
Ansible.ModuleUtils.FileUtil - backport catch DirectoryNotFoundException (#37976)
* Ansible.ModuleUtils.FileUtil: catch DirectoryNotFoundException when testing a path (#37968)

(cherry picked from commit 68e44e082e)

* Added changelog fragments
7 years ago
Adrian Likins d64a352a40 Fix redundant yaml error blurbs on ModArgs parse errors (#36923)
* Fix redundant yaml error blurbs on ModArgs parse errors

Some of the AnsibleParserErrors from parsing.mod_args
are created with the obj=some_yaml_ds options but
some are not.

If they were, we don't want to add another yaml_ds to
it, because that will result in double yaml error blurbs.
And since we dont need to add info, we can just re raise it.

But if there is no ._obj, add it here so we get the extra
detail in the error message (see issue #14790) and raise
a new AnsibleParserError instance.

Fixes #36848

* cleanup existing test_tasks pep8/sanity issues

(cherry picked from commit e166946a0a)
7 years ago
Izuke 5b0d8ab868 Fixes #32146 Fixes reconcile inventory to correctly remove hosts from ungrouped
(cherry picked from commit e02c72d856)
7 years ago
Abhijeet Kasurde 87119348b5 VMware: Use environment variable for connection (#37726) (#37745)
This fix adds environment variables for connection in vmware_*
modules.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 0ae7a0e88c)
7 years ago
Olivier Bourdon 98633e5157 Fix interfaces_file for proper file contents (#37818)
The generated file was completely unusable by the system
therefore the fix which ensures that diffing the file
prior to changes and after only shows diffs

Furthermore the code did not work for Python 3.6
>       f.writelines(to_bytes(lines, errors='surrogate_or_strict'))
E       TypeError: a bytes-like object is required, not 'int'

The other modifications (lambda variable renaming) is to
comply with default flake8 rules
(cherry picked from commit 612d0d6634)
7 years ago
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)
7 years ago
Ganesh Nalawade ec59181a28
Fix eos_facts eapi integration test failures (#37919)
(cherry picked from commit af777c0f89)
7 years ago
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 017ea018d0)
7 years ago
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>
7 years ago
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)
7 years ago
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)
7 years ago
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
7 years ago
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
7 years ago
Matt Clay 2665912356 Fix docker_secret test on RHEL.
(cherry picked from commit f1899f784b)
7 years ago
Matt Clay 6b0b4ddf00 Pin httptester SHA.
(cherry picked from commit 8232c95f42)
7 years ago
Matt Clay 61887e7c2f Fix uri test on Python 2.6.
(cherry picked from commit 1fd9a616a4)
7 years ago
Sebastian Gumprich 20fcaeb854 fix spelling mistakes in several modules (#36296)
* fix more spelling mistakes

* fix spelling mistakes

(cherry picked from commit 16c564c4b4)
7 years ago
Matt Clay 5ebce3e618 Disable failing github_issue integration test.
(cherry picked from commit 30bb70cf2d)
7 years ago
Dag Wieers 1381de72d0 Backport of ACI document changes (#37502)
* Backport of ACI document changes

* Add missing test change
7 years ago
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
7 years ago
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
7 years ago
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)
7 years ago
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)
7 years ago
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)
7 years ago
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
7 years ago
René Moser f230d8e9c4 cs_router: fix missing doc (#37107)
* cs_router: fix missing doc

* update ignore.txt

(partly cherry picked from commit e1297af18a)
7 years ago
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)
7 years ago
Trishna Guha ee67c6c1e3
fix nxos_l2_interface tests for fretta (#37086) (#37101)
(cherry picked from commit b7bc61c7df)
7 years ago
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)
7 years ago
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
7 years ago
John R Barker e03b17e2e5
filesystem: fix documentation (#36556) (#36633)
(cherry picked from commit 07927f52ae)
7 years ago
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)
7 years ago
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)
7 years ago
Ganesh Nalawade 3f8377c2d9
Enable eapi integration test for eos modules (#36934) (#36935)
(cherry picked from commit 83c3561ee5)
7 years ago
Ganesh Nalawade a275a39299
Fix eos_vrf integration test failures (#36893) (#36896)
(cherry picked from commit 5c2a1a6124)
7 years ago
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)
7 years ago
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)
7 years ago
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)
7 years ago
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)
7 years ago
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)
7 years ago
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)
7 years ago
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)
7 years ago