Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2021-01-07 07:51:11
Size: 320
Editor: PieterSmit
Comment:
Revision 6 as of 2022-04-02 22:49:40
Size: 1293
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
   * setup python virtual env {{{
     python3 -m venv venv
     source venv/bin/activate
     }}}
Line 8: Line 13:
  * test under test {{{  * test new raw and yaml
   * install python yaml lib {{{
pip3 install ruamel.yaml
pip3 install textfsm
}}}
   * test under test {{{
Line 11: Line 21:


== 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 }}}
 1. 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 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

  • github - github-ntc-templates
    • Clone template repo to local.
    • command line mapped through templates/index
  • setup python virtual env

         python3 -m venv venv
         source venv/bin/activate
  • test new raw and yaml
    • install python yaml lib

      pip3 install ruamel.yaml
      pip3 install textfsm
    • test under test

      $ fb=tests/cisco_nxos/show_ip_arp_detail/cisco_nxos_show_ip_arp_detail ; python3 development_scripts.py -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 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)