Differences between revisions 8 and 9
Revision 8 as of 2023-05-06 07:38:11
Size: 1506
Editor: PieterSmit
Comment:
Revision 9 as of 2023-05-06 10:40:19
Size: 1431
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
root@11020816c531:/local# fb=tests/cisco_nxos/show_ip_arp_detail/cisco_nxos_show_ip_arp_detail
root@11020816c531:/local#  python3 tests/test_development_scripts.py -c ${fb}.raw && cat ${fb}.yml
fb=tests/cisco_nxos/show_ip_arp_detail/cisco_nxos_show_ip_arp_detail
invoke gen-yaml-file -c ${fb}.raw && cat ${fb}.yml

Dev/github-ntc-templates

Dev Setup

  • 2023 moved to invoke and docker away from direct python3 -m venv vev
    • Run tests on ntc-templates repo with

      # 1 time build test container
      invoke build #or rebuild
      # run test suite
      invoke tests
    • test under test

      # enter build/test container
      invoke cli
      fb=tests/cisco_nxos/show_ip_arp_detail/cisco_nxos_show_ip_arp_detail 
      invoke gen-yaml-file -c ${fb}.raw && cat ${fb}.yml

Checkout remote branch in PR to verify

  1. Go to the remote repo and get the clone repo e.g.  https://github.com/verbosemode/ntc-templates.git  1 Go to the remote repo and get the branch name e.g.  cisco_xr_show_install_active 

  2. Add the repo as a remote on local repo

     #git remote add -t <branch> <remote> <gitUrl>
     git remote add -t cisco_xr_show_install_active  verbosemode#1105 https://github.com/verbosemode/ntc-templates.git
     #
     git fetch verbosemode#1105
     git checkout verbosemode#1105
     git remote -v

Errors and fix's

  • Error  ModuleNotFoundError: No module named 'ruamel' 

    • Fix: forgot to install needed packages

             python -m pip install ruamel.yaml
             python -m pip install textfsm

Dev/github-ntc-templates (last edited 2023-06-29 07:32:45 by PieterSmit)