Skip to content

Commit

Permalink
Create /etc/tacacs folder on PTF when it's missing (sonic-net#16352)
Browse files Browse the repository at this point in the history
Create /etc/tacacs folder on PTF when it's missing

Why I did it
TACACS test failed because /etc/tacacs+ folder does not exist, which recently missing on some version of PTF container image.

Error message:

E msg = Destination directory /etc/tacacs+ does not exist

How I did it
Create /etc/tacacs folder on PTF when it's missing

How to verify it
Pass all test case.

Description for the changelog
Create /etc/tacacs folder on PTF when it's missing
  • Loading branch information
liuh-80 authored and selldinesh committed Jan 9, 2025
1 parent 7c74a0d commit 533c871
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/common/helpers/tacacs/tacacs_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def setup_tacacs_server(ptfhost, tacacs_creds, duthost):
logger.debug("setup_tacacs_server: duthost options does not contains config for ansible_ssh_user.")

ptfhost.host.options['variable_manager'].extra_vars.update(extra_vars)
ptfhost.shell("mkdir -p /etc/tacacs+")
ptfhost.template(src="tacacs/tac_plus.conf.j2", dest="/etc/tacacs+/tac_plus.conf")

# Find 'python' command symbolic link target, and fix the tac_plus config file
Expand Down

0 comments on commit 533c871

Please sign in to comment.