@@ -56,34 +56,34 @@ ip domain name diffios.dev
5656username admin privilege 15 secret 5 {{ SECRET }}
5757!
5858interface Loopback0
59- ip address {{ LOOPBACK_IP }} 255.255.255.255
59+ ip address {{ LOOPBACK_IP }} 255.255.255.255
6060!
6161!
6262interface FastEthernet0/1
63- description *** Link to Core ***
64- ip address {{ FE_01_IP_ADDRESS }} 255.255.255.0
65- duplex auto
66- speed auto
63+ description *** Link to Core ***
64+ ip address {{ FE_01_IP_ADDRESS }} 255.255.255.0
65+ duplex auto
66+ speed auto
6767!
6868interface FastEthernet0/2
69- no ip address
70- shutdown
69+ no ip address
70+ shutdown
7171!
7272interface Vlan100
73- description User
74- ip address {{ VLAN100_IP }} 255.255.255.0
73+ description User
74+ ip address {{ VLAN100_IP }} 255.255.255.0
7575!
7676interface Vlan200
77- description Corporate
78- ip address {{ VLAN200_IP }} 255.255.255.0
79- no shutdown
77+ description Corporate
78+ ip address {{ VLAN200_IP }} 255.255.255.0
79+ no shutdown
8080!
8181!
8282line vty 0 4
83- exec-timeout 5 0
84- login local
85- transport input ssh
86- transport output ssh
83+ exec-timeout 5 0
84+ login local
85+ transport input ssh
86+ transport output ssh
8787!
8888!
8989end
@@ -114,37 +114,37 @@ hostname ABC12345RT01
114114ip domain name diffios.dev
115115!
116116interface Loopback0
117- ip address 192.168.100.1 255.255.255.255
117+ ip address 192.168.100.1 255.255.255.255
118118!
119119!
120120interface FastEthernet0/1
121- description *** Link to Core ***
122- ip address 192.168.0.1 255.255.255.128
123- duplex auto
124- speed auto
121+ description *** Link to Core ***
122+ ip address 192.168.0.1 255.255.255.128
123+ duplex auto
124+ speed auto
125125!
126126interface FastEthernet0/2
127- ip address 192.168.0.2 255.255.255.0
128- duplex auto
129- speed auto
127+ ip address 192.168.0.2 255.255.255.0
128+ duplex auto
129+ speed auto
130130!
131131interface Vlan100
132- description User
133- ip address 10.10.10.1 255.255.255.0
132+ description User
133+ ip address 10.10.10.1 255.255.255.0
134134!
135135interface Vlan300
136- description Corporate
137- ip address 10.10.10.2 255.255.255.0
138- no shutdown
136+ description Corporate
137+ ip address 10.10.10.2 255.255.255.0
138+ no shutdown
139139!
140140ip route 0.0.0.0 0.0.0.0 192.168.0.2
141141!
142142!
143143line vty 0 4
144- exec-timeout 5 0
145- login local
146- transport input telnet ssh
147- transport output telnet ssh
144+ exec-timeout 5 0
145+ login local
146+ transport input telnet ssh
147+ transport output telnet ssh
148148!
149149!
150150end
@@ -243,21 +243,21 @@ BASELINE_FILE = os.path.join(os.getcwd(), "configs", "baselines", "baseline.txt"
243243output = os.path.join(os.getcwd(), " diffs.csv" )
244244
245245with open (output, ' w' ) as csvfile:
246- csvwriter = csv.writer(csvfile, lineterminator = ' \n ' )
247- # write the headers
248- csvwriter.writerow([" Comparison" , " Baseline" , " Additional" , " Missing" ])
249- files = sorted (os.listdir(COMPARISON_DIR ))
250- for f in files:
251- comparison_file = os.path.join(COMPARISON_DIR , f)
252- # initialise the diffios Compare object
253- diff = diffios.Compare(BASELINE_FILE , comparison_file, IGNORE_FILE )
254- csvwriter.writerow([
255- f,
256- os.path.basename(BASELINE_FILE ),
257- # write the formatted differences to the csv file
258- diff.pprint_additional(),
259- diff.pprint_missing()
260- ])
246+ csvwriter = csv.writer(csvfile, lineterminator = ' \n ' )
247+ # write the headers
248+ csvwriter.writerow([" Comparison" , " Baseline" , " Additional" , " Missing" ])
249+ files = sorted (os.listdir(COMPARISON_DIR ))
250+ for f in files:
251+ comparison_file = os.path.join(COMPARISON_DIR , f)
252+ # initialise the diffios Compare object
253+ diff = diffios.Compare(BASELINE_FILE , comparison_file, IGNORE_FILE )
254+ csvwriter.writerow([
255+ f,
256+ os.path.basename(BASELINE_FILE ),
257+ # write the formatted differences to the csv file
258+ diff.pprint_additional(),
259+ diff.pprint_missing()
260+ ])
261261```
262262
263263## Development setup
0 commit comments