Pyats
Set up test environment
lcha_lib.lcha.poll_lc_warm scp build@cmts-build02:/home/build/pyats/team/sereno_rest_api_test.py 172.22.10.41:3 easypy rphy_basic_lcha_job.py -no_log_copy easypy /home/build/pyats/yuanliu2/monitor_test/sereno_syslog_job.py -no_archive -datafile 'template.yaml'
We use pyATS to do our automation. Here's the wiki link: http://wwwin-pyats.cisco.com. I have a sample script you can use to start your automation:
/ws/jcwu-sjc/pyats3/aramanan/demo/bringupTest.py, the testbed file is demo.yaml.
1. To bring up pyats environment, you can run "source /auto/sjc-ccebuild-ar5/pyats-gate/env.sh; source /auto/pysw/ats64/env.sh" if you use BASH shell. source /auto/sjc-ccebuild-ar5/pyats-gate/env.sh; source /auto/pysw/ats64/env.sh 2.export PYTHONPATH=/opt/pyats_docker:/auto/sjgate/okrun/pyats_project
3.export GATE_SCRIPT_AREA=/auto/pysw/ats64/regression/gate/scripts/ ------------tcl 2017-07-13T05:40:13: %AETEST-ERROR: File "/auto/shgate/shared/cvsworkarea/zhiyqiu/regression/tests/cable/battlestar/SDN/D31_SREG1/rphy_basic_lcha.py", line 34, in <module> 2017-07-13T05:40:13: %AETEST-ERROR: tcl.eval('source $env(GATE_SCRIPT_AREA)/libInit') 2017-07-13T05:40:13: %AETEST-ERROR: File "/auto/sjc-ccebuild-ar5/pyats-gate/lib/python3.4/site-packages/ats/tcl/interpreter.py", line 272, in eval 2017-07-13T05:40:13: %AETEST-ERROR: raise TclError(self.vars['::errorInfo']) from None 2017-07-13T05:40:13: %AETEST-ERROR: _tkinter.TclError: can't read "env(GATE_SCRIPT_AREA)": no such variable 2017-07-13T05:40:13: %AETEST-ERROR: while executing 2017-07-13T05:40:13: %AETEST-ERROR: "source $env(GATE_SCRIPT_AREA)/libInit" 2017-07-13T05:40:13: %AETEST-ERROR: 4.pip install parsergen 2017-07-13T21:59:50: %AETEST-ERROR: from cable.testbed.pyats_oop import * 2017-07-13T21:59:50: %AETEST-ERROR: File "/auto/sjgate/okrun/pyats_project/cable/testbed/pyats_oop.py", line 8, in <module> 2017-07-13T21:59:50: %AETEST-ERROR: from ..topology import * 2017-07-13T21:59:50: %AETEST-ERROR: File "/auto/sjgate/okrun/pyats_project/cable/topology/__init__.py", line 6, in <module> 2017-07-13T21:59:50: %AETEST-ERROR: from .binos import Binos, \ 2017-07-13T21:59:50: %AETEST-ERROR: File "/auto/sjgate/okrun/pyats_project/cable/topology/binos.py", line 4, in <module> 2017-07-13T21:59:50: %AETEST-ERROR: from .util import oper_fill_tabular_raw 2017-07-13T21:59:50: %AETEST-ERROR: ImportError: cannot import name 'oper_fill_tabular_raw' 2017-07-13T21:59:50: %AETEST-ERROR:
telemetry easypy ./sereno_ui_rpdAssignments_job.py -no_archive -testbed_file R7673-cbr8-e2e_vm_build.yaml -datafile R7673-CBR8-vm-data-ui.yaml --no_rtr_chk 1 --skip_rpd_vm_reboot 1 -uids "Or('common_setup', 'ui_rpd_assignment_test','common_cleanup')"