Add support of running general Ansible modules on EosHost#1742
Merged
neethajohn merged 4 commits intosonic-net:masterfrom Jun 19, 2020
wangxin:fix-eoshost
Merged
Add support of running general Ansible modules on EosHost#1742neethajohn merged 4 commits intosonic-net:masterfrom wangxin:fix-eoshost
neethajohn merged 4 commits intosonic-net:masterfrom
wangxin:fix-eoshost
Conversation
* Add support of running general Ansible modules on EosHost The EOS hosts support two types of command line interface: 1. Linux shell 2. EOS shell This change is to add the support of running general Ansible modules that can only be executed under Linux shell. * If not able to get the explicitly defined username and password, fallback to use the value of "fanout_admin_user" and "fanout_admin_password". It is unlikely to break the existing code. Signed-off-by: Xin Wang <[email protected]>
yxieca
approved these changes
Jun 8, 2020
Collaborator
|
Build triggered for merge commit. |
Collaborator
|
Build started for merge commit. |
The fanout device may be EOS type or other type. The credential name should be more generic. Signed-off-by: Xin Wang <[email protected]>
This was referenced Jun 11, 2020
lguohan
reviewed
Jun 17, 2020
lguohan
approved these changes
Jun 17, 2020
Contributor
|
retest this please |
1 similar comment
Contributor
|
retest this please |
Contributor
|
retest this please |
2 similar comments
Contributor
|
retest this please |
Contributor
|
retest this please |
Contributor
|
retest this please |
3 tasks
yxieca
pushed a commit
that referenced
this pull request
Jun 23, 2020
…n issue (#1805) PR #1742 introduced two sets of fanout variables as credentials for accessing the fanout network cli and linux shell. This change explicitly define the variables in ansible/group_vars/fanout/secrets.yml. After this PR is merged, please remember to update the credentials in ansible/group_vars/fanout/secrets.yml file to the actual values of your lab configuration. Another change in this PR is to fix the issue of getting results of FanoutHost shutdown and no_shutdown methods. The results are directly returned by inner function call. It's unnecessary and wrong to get results using dictionary `key self.hostname`. Signed-off-by: Xin Wang <[email protected]>
neethajohn
pushed a commit
to neethajohn/sonic-mgmt
that referenced
this pull request
Jan 8, 2021
After Github PR sonic-net#1742 is merged, we need to explicitly define the fanout credentials for accessing fanout network cli and Linux shell.
bingwang-ms
pushed a commit
to bingwang-ms/sonic-mgmt
that referenced
this pull request
May 20, 2021
After Github PR sonic-net#1742 is merged, we need to explicitly define the fanout credentials for accessing fanout network cli and Linux shell.
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
Why I did it include changes from sairedis submodule 102d20b | [202211][submodule][SAI]Advance header include 0031470 | improve enum values integration check (sonic-net#1727) (sonic-net#1737) 04d3c41 | [Submodule][upgrade]Upgrade SAI submodule (sonic-net#1204) updates from SAI 7710e24 | [cherry-pick][202211]Enhance the check enum lock script (sonic-net#1741) (sonic-net#1742) 0031470 | improve enum values integration check (sonic-net#1727) (sonic-net#1737) 4f11c7e | Enable github code scanning to replace LGTM. (sonic-net#1709) How I did it How to verify it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
Fixes # (issue)
This is a re-submit of PR #1721 which was reverted because of an issue.
The EOS hosts support two types of command line interface:
This change is to add the support of running general Ansible modules
that can only be executed under Linux shell.
password, fallback to use the value of "fanout_admin_user"
and "fanout_admin_password". It is unlikely to break the
existing code.
Type of change
Approach
What is the motivation for this PR?
This change is to add the support of running general Ansible modules that can only be executed under Linux shell.
How did you do it?
Improved the EosHost class defined in tests/common/devices.py to make it accepts two sets of credential:
The first set of credential exposes the EOS CLI interface. When use this set of credential, we use ansible_connection network_cli.
The second set of credential exposes the linux shell of EOS. When use this set of credential, we use ansible_connection ssh.
If name of the ansible module to be executed on EOS hosts starts with "eos_", then use ansible_connection network_cli to run the module. Otherwise, use ansible_connection ssh to run the module.
How did you verify/test it?
Test run the test scripts that depend on EosHost.
Any platform specific information?
Only EoSHost is enhanced. The OnyxHost may need to be enhanced in the similar way.
Supported testbed topology if it's a new test case?
Documentation