[veos_vtb] Add connection variable to 'sonic' group#2639
[veos_vtb] Add connection variable to 'sonic' group#2639lolyu merged 1 commit intosonic-net:masterfrom
Conversation
By default, Ansible will search for group variables from the directory where inventory file locates. For vtestbed Pytest users who calls Pytest with `tests/veos_vtb`, Ansible fails to find the groups variables defined under `ansible/group_vars`, thus fail to use `multi_passwd_ss`. So let's add those connection variables directly to `veos_vtb` Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
| vars: | ||
| mgmt_subnet_mask_length: 24 | ||
| ansible_connection: multi_passwd_ssh | ||
| ansible_altpassword: YourPaSsWoRd |
There was a problem hiding this comment.
This should fix the multi_passwd_ssh is not accessible if tests/veos_vtb is selected as the inventory file. I think a fundamental problem is that the whole ansible/group_vars directory is not accessible when using tests/veos_vtb as the inventory file. I am not sure if any other things in ansible/group_vars are useful (or potentially useful) in pytest? If so, it is probably better to help pytest finding the directory (maybe a symbolic link)?
There was a problem hiding this comment.
This looks like ansible always looks for group_vars and host_vars under the same directory of inventory file. Probably we can try:
cd tests
pytest -i ../ansible/veos_vtb ...
There was a problem hiding this comment.
Yes, but this is not the case in our public Jenkins vtestbed jobs, which uses the symbolic link under tests/.
swss: * f28d6622 2023-01-25 | [portinit] Do not call GET on SAI_PORT_ATTR_SPEED when AUTONEG is enabled (sonic-net#2484) (sonic-net#2639) (github/202012, 202012) [Ying Xie] * 217f7f00 2023-01-21 | Cherry pick of sonic-net/sonic-swss#2589 (sonic-net#2627) [siqbal1986] Signed-off-by: Ying Xie <ying.xie@microsoft.com> Signed-off-by: Ying Xie <ying.xie@microsoft.com>
``` 39cdb49c7 [202012][show] Add bgpraw to show run all (sonic-net#2639) b3ebba2ca [202012][show] add new CLI to show tunnel route objects sonic-net#2255 (sonic-net#2659) d08f59b9f Fixed a bug in "show vnet routes all" causing screen overrun. (sonic-net#2644) (sonic-net#2654) a996abdb5 [202012][show] show logging CLI support for logs stored in tmpfs (sonic-net#2652) c60f771c0 [202012][show_bfd] add local discriminator in show bfd command (sonic-net#2616) ```
By default, Ansible will search for group variables from the directory
where inventory file locates. For vtestbed Pytest users who calls Pytest
with
tests/veos_vtb, Ansible fails to find the groups variablesdefined under
ansible/group_vars, thus fail to usemulti_passwd_ss.So let's add those connection variables directly to
veos_vtbSigned-off-by: Longxiang Lyu lolv@microsoft.com
Description of PR
Summary:
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
If calling
pytestwithtests/veos_vtb,Ansiblewill fails to get groups variables inansible/group_vars, in which connection variables are defined forsonicgroup.How did you do it?
Add those connection variables to
veos_vtbHow did you verify/test it?
Run pytest with
--inventory tests/veos_vtbAny platform specific information?
Supported testbed topology if it's a new test case?
Documentation