測試環境:python
CSR1000Vgit
CentOS7.4 X64github
Step 1:在CentOS7上安裝python 3.0環境docker
[root@docker ~]# python3 -V
Python 3.7.0
[root@docker ~]#app
Step 2:安裝GITide
[root@docker ~]# git --version
git version 1.8.3.1
[root@docker ~]#測試
Step 3:git獲取trattoit
[root@docker ~]# git clone https://github.com/akonkol/tratto.gitio
Step 4:測試ast
[root@docker sdn]# cd tratto/
[root@docker tratto]# ls -l
total 8
drwxr-xr-x 2 root root 24 Jun 18 23:10 examples
-rwxr-xr-x 1 root root 0 Jun 18 23:10 __init__.py
-rw-r--r-- 1 root root 805 Jun 18 23:10 README
-rwxr-xr-x 1 root root 548 Jun 19 01:29 test.py
drwxr-xr-x 4 root root 80 Jun 18 23:11 tratto
[root@docker tratto]#
[root@docker tratto]#
[root@docker tratto]# ./test.py
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is 192.168.188.254 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 192.168.188.254, GigabitEthernet1C 192.168.0.0/16 is directly connected, GigabitEthernet1 192.168.188.0/32 is subnetted, 1 subnetsL 192.168.188.150 is directly connected, GigabitEthernet1[root@docker tratto]#