Skip to content

[device] simplify AnsibleHostBase constructor parameter handling#2033

Merged
yxieca merged 1 commit intosonic-net:masterfrom
yxieca:device
Aug 5, 2020
Merged

[device] simplify AnsibleHostBase constructor parameter handling#2033
yxieca merged 1 commit intosonic-net:masterfrom
yxieca:device

Conversation

@yxieca
Copy link
Collaborator

@yxieca yxieca commented Aug 5, 2020

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

AnsibleHostBase handles connection and become_user with a complicated if else structure. If we want pass another parameter to ansible_adhoc, it would be exploding.

How did you do it?

Let ansible_adhoc class handles the parameter list.

How did you verify/test it?

yinxi@acs-trusty8:/var/src/sonic-mgmt/tests$ ./run_tests.sh -d str-dx010-acs-1 -n vms3-t1-dx010-1 -i /var/src/sonic-mgmt/ansible/str,/var/src/sonic-mgmt/ansible/veos -u -p /tmp/logs-01 -c iface_namingmode/test_iface_namingmode.py::TestShowInterfaces::test_show_interfaces_counter[default]
=== Running tests in groups ===
================================================================================== test session starts ===================================================================================
platform linux2 -- Python 2.7.12, pytest-4.6.5, py-1.8.1, pluggy-0.13.1
ansible: 2.8.7
rootdir: /var/src/sonic-mgmt/tests, inifile: pytest.ini
plugins: ansible-2.2.2, xdist-1.28.0, forked-1.1.3, repeat-0.8.0
collected 1 item

iface_namingmode/test_iface_namingmode.py::TestShowInterfaces::test_show_interfaces_counter[default] PASSED [100%]

Let ansible_adhoc class handles the parameter list.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
@yxieca yxieca merged commit 1a4eae0 into sonic-net:master Aug 5, 2020
@yxieca yxieca deleted the device branch August 5, 2020 14:35
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
c31a362 - 2021-11-18 : [202012][Mux orch] set default as standby, change mux orch priority (sonic-net#2015) [Prince Sunny]
9a9e8e6 - 2021-11-18 : [202012] Check VS test failure (sonic-net#2033) [Prince Sunny]
7eaabca - 2021-11-11 : [202012] Fix random failure in PR/CI build. (sonic-net#2016) [Shilong Liu]
85230fe - 2021-11-04 : [orchagent] Fix group name of port-buffer-drop in flexcounterorch.cpp (sonic-net#1967) [Junchao-Mellanox]
a55c2ca - 2021-11-03 : [teammgrd]: Handle LAGs cleanup gracefully on Warm/Fast reboot. (sonic-net#1934) [Nazarii Hnydyn]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants