View difference between Paste ID: k2WckvKj and ZfiZYdMZ
SHOW: | | - or go back to the newest paste.
1
Working directory: /usr/local/noc
2
<type 'exceptions.UnicodeEncodeError'>
3
'ascii' codec can't encode characters in position 2-10: ordinal not in range(128)
4
START OF TRACEBACK
5
------------------------------------------------------------------------
6
File: /usr/local/lib/python2.7/difflib.py (Line: 1205)
7
Function: unified_diff
8
 1198     
9
 1199         started = False
10
 1200         for group in SequenceMatcher(None,a,b).get_grouped_opcodes(n):
11
 1201             if not started:
12
 1202                 started = True
13
 1203                 fromdate = '\t{}'.format(fromfiledate) if fromfiledate else ''
14
 1204                 todate = '\t{}'.format(tofiledate) if tofiledate else ''
15
 1205 ==>             yield '--- {}{}{}'.format(fromfile, fromdate, lineterm)
16
 1206                 yield '+++ {}{}{}'.format(tofile, todate, lineterm)
17
 1207     
18
 1208             first, last = group[0], group[-1]
19
 1209             file1_range = _format_range_unified(first[1], last[2])
20
 1210             file2_range = _format_range_unified(first[3], last[4])
21
 1211             yield '@@ -{} +{} @@{}'.format(file1_range, file2_range, lineterm)
22
Variables:
23
                   a = 
24
[' 08-Dec-2013 23:08:11 %AAA-I-CONNECT: User CLI session for user mitya over telnet , source 10.116.0.211 destination  10.116.0.91 ACCEPTED\n',
25
 'show configuration running\n',
26
 '!----------------------------------------------------------------------\n',
27
 '!\n',
28-
28+
 '!         DGS-3100-24TG  Gigabit stackable L2 Managed Switch           \n',
29-
29+
 '!                            Configuration                             \n',
30-
30+
31-
31+
 '!                       Firmware: Build 3.00.43                        \n',
32-
32+
 '!     Copyright(C) 2008 D-Link Corporation. All rights reserved.       \n',
33
 '!----------------------------------------------------------------------\n',
34-
            fromdate = ''
34+
 ' \n',
35
 '! BASIC\n',
36
 ' \n',
37
 'disable web \n',
38
 ' \n',
39
 '! SNMP\n',
40
 ' \n',
41
 'create snmp community sgdrefwddaqtw view CommunityView read_only \n',
42
 'create snmp host 10.116.0.211 v2c sgdrefwddaqtw \n',
43
 'config snmp system_location SV \n',
44
 'config snmp system_name SV \n',
45
 ' \n',
46
 '! AUTHENTICATION\n',
47
 ' \n',
48
 '                                                                                                                     \n',
49
 '! NETWORK MONITORING\n',
50
 ' \n',
51
 ' \n',
52
 '! LINK AGGREGATION\n',
53
 ' \n',
54
 ' \n',
55
 '! PORT\n',
56
 ' \n',
57
 'config ports description 1:2 privatmelshkina40 \n',
58
 'config ports description 1:8 PrivatHunday \n',
59
 'config ports description 1:9 Uplink \n',
60
 'config ports description 1:15 PrivatTunka1a \n',
61
 ' \n',
62
 '! VLAN\n',
63
 ' \n',
64
 'create vlan users tag 13 \n',
65
 'create vlan sv_upr tag 14 \n',
66
 'create vlan privat tag 254 \n',
67
 'create vlan upr tag 256 \n',
68
 'config vlan users add tagged 1:(1-7,9-24),2:(1-24) \n',
69
 'config vlan sv_upr add tagged 1:(2-8,10-24),2:(1-24) \n',
70
 'config vlan sv_upr add untagged 1:1 \n',
71
 'config vlan privat add tagged 1:(1-7,9-24) \n',
72
 'config vlan privat add untagged 1:8 \n',
73
 'config vlan upr add tagged 1:9 \n',
74
 'config gvrp 1:1 pvid 14 \n',
75
 'config gvrp 1:8 pvid 254 \n',
76
 ' \n',
77
 '! FORWARDING TABLE\n',
78
 ' \n',
79
 'config multicast filtering_mode 1:(1-24),2:(1-24) filter_unregistered_groups \n',
80
 ' \n',
81
 '! BROADCAST STORM CONTROL\n',
82
 ' \n',
83
 'config traffic control 1:(1-8,10-24),2:(1-24) state enable threshold 3500 sto\n',
84
 'rm_type dlf_multicast_broadcast \n',
85
 ' \n',
86
 '! PORT MIRRORING\n',
87
 ' \n',
88
 ' \n',
89
 '! QOS\n',
90
 ' \n',
91
 ' \n',
92
 '! MULTIPLE SPANNING TREE\n',
93
 ' \n',
94
 ' \n',
95
 '! IGMP SNOOPING\n',
96
 ' \n',
97
 ' \n',
98
 '! 802.1X\n',
99
 ' \n',
100
 ' \n',
101
 '! SNTP\n',
102
 ' \n',
103
 'enable sntp \n',
104
 'config sntp primary 10.110.0.2 secondary 10.110.0.20 \n',
105
 'config time_zone operator + hour 02 minute 00 \n',
106
 ' \n',
107
 '! SSH\n',
108
 ' \n',
109
 ' \n',
110
 '! SSL\n',
111
 ' \n',
112
 ' \n',
113
 '! BASIC IP\n',
114
 ' \n',
115
 'config ipif System ipaddress 10.116.0.91/16 vlan upr \n',
116
 ' \n',
117
 '! ROUTING TABLE\n',
118
 ' \n',
119
 'create iproute default 10.116.0.1 \n',
120
 ' \n',
121
 '! ARP\n',
122
 ' \n',
123
 ' \n',
124
 '! LACP\n',
125
 ' \n',
126
 ' \n',
127
 '! PORT SECURITY\n',
128
 ' \n',
129
 'config port_security 1:(1-24) lock_address_mode deleteontimeout trap 10 \n',
130
 ' \n',
131
 '! STACK\n',
132
 ' \n',
133
 ' \n',
134
 '! POE\n',
135
 ' \n',
136
 ' \n',
137
 '! TRAFFIC SEGMENTATION\n',
138
 ' \n',
139
 'config traffic_segmentation 1:(2-8,10-24),2:(1-24) forward_list 1:(1,9) \n',
140
 'config traffic_segmentation 1:1 forward_list 1:(2-8,10-24),2:(1-24) \n',
141
 ' \n',
142
 '! ACCESS CONTROL LIST\n',
143
 ' \n',
144
 'create access_profile profile_id 1 ip tcp dst_port_mask ffff \n',
145
 'create access_profile profile_id 2 ip udp dst_port_mask ffff \n',
146
 'config access_profile profile_id 1 add access_id 1 ip tcp dst_port 135 ports \n',
147
 '1:(1-24) deny\n',
148
 'config access_profile profile_id 1 add access_id 2 ip tcp dst_port 139 ports \n',
149
 '1:(1-24) deny\n',
150
 'config access_profile profile_id 1 add access_id 3 ip tcp dst_port 369 ports \n',
151
 '1:(1-24) deny\n',
152
 'config access_profile profile_id 1 add access_id 4 ip tcp dst_port 445 ports \n',
153
 '1:(1-24) deny\n',
154
 'config access_profile profile_id 1 add access_id 5 ip tcp dst_port 593 ports \n',
155
 '1:(1-24) deny\n',
156
 'config access_profile profile_id 1 add access_id 6 ip tcp dst_port 2869 ports\n',
157
 ' 1:(1-24) deny\n',
158
 'config access_profile profile_id 1 add access_id 7 ip tcp dst_port 5000 ports\n',
159
 ' 1:(1-24) deny\n',
160
 'config access_profile profile_id 2 add access_id 8 ip udp dst_port 137 ports \n',
161
 '1:(1-24) deny\n',
162
 'config access_profile profile_id 2 add access_id 9 ip udp dst_port 138 ports \n',
163
 '1:(1-24) deny\n',
164
 'config access_profile profile_id 2 add access_id 10 ip udp dst_port 1900 port\n',
165
 's 1:(1-24) deny\n',
166
 ' \n',
167
 '! HISTORY\n',
168
 ' \n',
169
 ' \n',
170
 '! SAFEGUARD\n',
171
 ' \n',
172
 'config safeguard_engine state enable rising 80 falling 25 \n',
173
 ' \n',
174
 '! DOWNLOAD\n',
175
 ' \n',
176
 ' \n',
177
 '! LLDP\n',
178
 ' \n',
179
 'enable lldp \n',
180
 'config lldp ports 1:(1-8,10-24),2:(1-24) admin_status disable \n',
181
 'config lldp ports 1:9 basic_tlvs port_description system_name system_descript\n',
182
 'ion system_capabilities enable \n',
183
 'enable lldp forward_message \n',
184
 ' \n',
185
 '! MLD SNOOPING\n',
186
 ' \n']
187
              todate = ''
188
          tofiledate = ''
189
               group = [('delete', 0, 2, 0, 0), ('equal', 2, 5, 0, 3)]
190
             started = True
191
                   n = 3
192
              tofile = u'b/\u041c\u0435\u043b\u0435\u0448\u043a\u0438\u043d\u0430 40'
193
            fromdate = ''
194
            lineterm = '\n'
195
        fromfiledate = ''
196
                   b = 
197
['!----------------------------------------------------------------------\n',
198
 '!\n',
199
 '!         DGS-3100-24TG  Gigabit stackable L2 Managed Switch           \n',
200
 '!                            Configuration                             \n',
201
 '!\n',
202
 '!                       Firmware: Build 3.00.43                        \n',
203
 '!     Copyright(C) 2008 D-Link Corporation. All rights reserved.       \n',
204
 '!----------------------------------------------------------------------\n',
205
 ' \n',
206
 '! BASIC\n',
207
 ' \n',
208
 'disable web \n',
209
 ' \n',
210
 '! SNMP\n',
211
 ' \n',
212
 'create snmp community sgdrefwddaqtw view CommunityView read_only \n',
213
 'create snmp host 10.116.0.211 v2c sgdrefwddaqtw \n',
214
 'config snmp system_location SV \n',
215
 'config snmp system_name SV \n',
216
 ' \n',
217
 '! AUTHENTICATION\n',
218
 ' \n',
219
 '                                                                                                                     \n',
220
 '! NETWORK MONITORING\n',
221
 ' \n',
222
 ' \n',
223
 '! LINK AGGREGATION\n',
224
 ' \n',
225
 ' \n',
226
 '! PORT\n',
227
 ' \n',
228
 'config ports description 1:2 privatmelshkina40 \n',
229
 'config ports description 1:8 PrivatHunday \n',
230
 'config ports description 1:9 Uplink \n',
231
 'config ports description 1:15 PrivatTunka1a \n',
232
 ' \n',
233
 '! VLAN\n',
234
 ' \n',
235
 'create vlan users tag 13 \n',
236
 'create vlan sv_upr tag 14 \n',
237
 'create vlan privat tag 254 \n',
238
 'create vlan upr tag 256 \n',
239
 'config vlan users add tagged 1:(1-7,9-24),2:(1-24) \n',
240
 'config vlan sv_upr add tagged 1:(2-8,10-24),2:(1-24) \n',
241
 'config vlan sv_upr add untagged 1:1 \n',
242
 'config vlan privat add tagged 1:(1-7,9-24) \n',
243
 'config vlan privat add untagged 1:8 \n',
244
 'config vlan upr add tagged 1:9 \n',
245
 'config gvrp 1:1 pvid 14 \n',
246
 'config gvrp 1:8 pvid 254 \n',
247
 ' \n',
248
 '! FORWARDING TABLE\n',
249
 ' \n',
250
 'config multicast filtering_mode 1:(1-24),2:(1-24) filter_unregistered_groups \n',
251
 ' \n',
252
 '! BROADCAST STORM CONTROL\n',
253
 ' \n',
254
 'config traffic control 1:(1-8,10-24),2:(1-24) state enable threshold 3500 sto\n',
255
 'rm_type dlf_multicast_broadcast \n',
256
 ' \n',
257
 '! PORT MIRRORING\n',
258
 ' \n',
259
 ' \n',
260
 '! QOS\n',
261
 ' \n',
262
 ' \n',
263
 '! MULTIPLE SPANNING TREE\n',
264
 ' \n',
265
 ' \n',
266
 '! IGMP SNOOPING\n',
267
 ' \n',
268
 ' \n',
269
 '! 802.1X\n',
270
 ' \n',
271
 ' \n',
272
 '! SNTP\n',
273
 ' \n',
274
 'enable sntp \n',
275
 'config sntp primary 10.110.0.2 secondary 10.110.0.20 \n',
276
 'config time_zone operator + hour 02 minute 00 \n',
277
 ' \n',
278
 '! SSH\n',
279
 ' \n',
280
 ' \n',
281
 '! SSL\n',
282
 ' \n',
283
 ' \n',
284
 '! BASIC IP\n',
285
 ' \n',
286
 'config ipif System ipaddress 10.116.0.91/16 vlan upr \n',
287
 ' \n',
288
 '! ROUTING TABLE\n',
289
 ' \n',
290
 'create iproute default 10.116.0.1 \n',
291
 ' \n',
292
 '! ARP\n',
293
 ' \n',
294
 ' \n',
295
 '! LACP\n',
296
 ' \n',
297
 ' \n',
298
 '! PORT SECURITY\n',
299
 ' \n',
300
 'config port_security 1:(1-24) lock_address_mode deleteontimeout trap 10 \n',
301
 ' \n',
302
 '! STACK\n',
303
 ' \n',
304
 ' \n',
305
 '! POE\n',
306
 ' \n',
307
 ' \n',
308
 '! TRAFFIC SEGMENTATION\n',
309
 ' \n',
310
 'config traffic_segmentation 1:(2-8,10-24),2:(1-24) forward_list 1:(1,9) \n',
311
 'config traffic_segmentation 1:1 forward_list 1:(2-8,10-24),2:(1-24) \n',
312
 ' \n',
313
 '! ACCESS CONTROL LIST\n',
314
 ' \n',
315
 'create access_profile profile_id 1 ip tcp dst_port_mask ffff \n',
316
 'create access_profile profile_id 2 ip udp dst_port_mask ffff \n',
317
 'config access_profile profile_id 1 add access_id 1 ip tcp dst_port 135 ports \n',
318
 '1:(1-24) deny\n',
319
 'config access_profile profile_id 1 add access_id 2 ip tcp dst_port 139 ports \n',
320
 '1:(1-24) deny\n',
321
 'config access_profile profile_id 1 add access_id 3 ip tcp dst_port 369 ports \n',
322
 '1:(1-24) deny\n',
323
 'config access_profile profile_id 1 add access_id 4 ip tcp dst_port 445 ports \n',
324
 '1:(1-24) deny\n',
325
 'config access_profile profile_id 1 add access_id 5 ip tcp dst_port 593 ports \n',
326
 '1:(1-24) deny\n',
327
 'config access_profile profile_id 1 add access_id 6 ip tcp dst_port 2869 ports\n',
328
 ' 1:(1-24) deny\n',
329
 'config access_profile profile_id 1 add access_id 7 ip tcp dst_port 5000 ports\n',
330
 ' 1:(1-24) deny\n',
331
 'config access_profile profile_id 2 add access_id 8 ip udp dst_port 137 ports \n',
332
 '1:(1-24) deny\n',
333
 'config access_profile profile_id 2 add access_id 9 ip udp dst_port 138 ports \n',
334
 '1:(1-24) deny\n',
335
 'config access_profile profile_id 2 add access_id 10 ip udp dst_port 1900 port\n',
336
 's 1:(1-24) deny\n',
337
 ' \n',
338
 '! HISTORY\n',
339
 ' \n',
340
 ' \n',
341
 '! SAFEGUARD\n',
342
 ' \n',
343
 'config safeguard_engine state enable rising 80 falling 25 \n',
344
 ' \n',
345
 '! DOWNLOAD\n',
346
 ' \n',
347
 ' \n',
348
 '! LLDP\n',
349
 ' \n',
350
 'enable lldp \n',
351
 'config lldp ports 1:(1-8,10-24),2:(1-24) admin_status disable \n',
352
 'config lldp ports 1:9 basic_tlvs port_description system_name system_descript\n',
353
 'ion system_capabilities enable \n',
354
 'enable lldp forward_message \n',
355
 ' \n',
356
 '! MLD SNOOPING\n',
357
 ' \n']
358
            fromfile = u'a/\u041c\u0435\u043b\u0435\u0448\u043a\u0438\u043d\u0430 40'
359
------------------------------------------------------------------------
360
File: /usr/local/noc/sa/models/managedobject.py (Line: 532)
361
Function: save_config
362
  525                     new_data = data
363
  526                 if old_data == new_data:
364
  527                     return  # Nothing changed
365
  528                 diff = "".join(difflib.unified_diff(
366
  529                     old_data.splitlines(True),
367
  530                     new_data.splitlines(True),
368
  531                     fromfile=os.path.join("a", self.name),
369
  532 ==>                 tofile=os.path.join("b", self.name)
370
  533                 ))
371
  534             # Notify changes
372
  535             self.event(
373
  536                 self.EV_CONFIG_CHANGED,
374
  537                 {
375
  538                     "object": self,
376
Variables:
377
            new_data = 
378
'!----------------------------------------------------------------------\n!\n!         DGS-3100-24TG  Gigabit stackable L2 Managed Switch           \n!                            Configuration                             \n!\n!                       Firmware: Build 3.00.43                        \n!     Copyright(C) 2008 D-Link Corporation. All rights reserved.       \n!----------------------------------------------------------------------\n \n! BASIC\n \ndisable web \n \n! SNMP\n \ncreate snmp community sgdrefwddaqtw view CommunityView read_only \ncreate snmp host 10.116.0.211 v2c sgdrefwddaqtw \nconfig snmp system_location SV \nconfig snmp system_name SV \n \n! AUTHENTICATION\n \n                                                                                                                     \n! NETWORK MONITORING\n \n \n! LINK AGGREGATION\n \n \n! PORT\n \nconfig ports description 1:2 privatmelshkina40 \nconfig ports description 1:8 PrivatHunday \nconfig ports description 1:9 Uplink \nconfig ports description 1:15 PrivatTunka1a \n \n! VLAN\n \ncreate vlan users tag 13 \ncreate vlan sv_upr tag 14 \ncreate vlan privat tag 254 \ncreate vlan upr tag 256 \nconfig vlan users add tagged 1:(1-7,9-24),2:(1-24) \nconfig vlan sv_upr add tagged 1:(2-8,10-24),2:(1-24) \nconfig vlan sv_upr add untagged 1:1 \nconfig vlan privat add tagged 1:(1-7,9-24) \nconfig vlan privat add untagged 1:8 \nconfig vlan upr add tagged 1:9 \nconfig gvrp 1:1 pvid 14 \nconfig gvrp 1:8 pvid 254 \n \n! FORWARDING TABLE\n \nconfig multicast filtering_mode 1:(1-24),2:(1-24) filter_unregistered_groups \n \n! BROADCAST STORM CONTROL\n \nconfig traffic control 1:(1-8,10-24),2:(1-24) state enable threshold 3500 sto\nrm_type dlf_multicast_broadcast \n \n! PORT MIRRORING\n \n \n! QOS\n \n \n! MULTIPLE SPANNING TREE\n \n \n! IGMP SNOOPING\n \n \n! 802.1X\n \n \n! SNTP\n \nenable sntp \nconfig sntp primary 10.110.0.2 secondary 10.110.0.20 \nconfig time_zone operator + hour 02 minute 00 \n \n! SSH\n \n \n! SSL\n \n \n! BASIC IP\n \nconfig ipif System ipaddress 10.116.0.91/16 vlan upr \n \n! ROUTING TABLE\n \ncreate iproute default 10.116.0.1 \n \n! ARP\n \n \n! LACP\n \n \n! PORT SECURITY\n \nconfig port_security 1:(1-24) lock_address_mode deleteontimeout trap 10 \n \n! STACK\n \n \n! POE\n \n \n! TRAFFIC SEGMENTATION\n \nconfig traffic_segmentation 1:(2-8,10-24),2:(1-24) forward_list 1:(1,9) \nconfig traffic_segmentation 1:1 forward_list 1:(2-8,10-24),2:(1-24) \n \n! ACCESS CONTROL LIST\n \ncreate access_profile profile_id 1 ip tcp dst_port_mask ffff \ncreate access_profile profile_id 2 ip udp dst_port_mask ffff \nconfig access_profile profile_id 1 add access_id 1 ip tcp dst_port 135 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 2 ip tcp dst_port 139 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 3 ip tcp dst_port 369 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 4 ip tcp dst_port 445 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 5 ip tcp dst_port 593 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 6 ip tcp dst_port 2869 ports\n 1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 7 ip tcp dst_port 5000 ports\n 1:(1-24) deny\nconfig access_profile profile_id 2 add access_id 8 ip udp dst_port 137 ports \n1:(1-24) deny\nconfig access_profile profile_id 2 add access_id 9 ip udp dst_port 138 ports \n1:(1-24) deny\nconfig access_profile profile_id 2 add access_id 10 ip udp dst_port 1900 port\ns 1:(1-24) deny\n \n! HISTORY\n \n \n! SAFEGUARD\n \nconfig safeguard_engine state enable rising 80 falling 25 \n \n! DOWNLOAD\n \n \n! LLDP\n \nenable lldp \nconfig lldp ports 1:(1-8,10-24),2:(1-24) admin_status disable \nconfig lldp ports 1:9 basic_tlvs port_description system_name system_descript\nion system_capabilities enable \nenable lldp forward_message \n \n! MLD SNOOPING\n \n'
379
            old_data = 
380
' 08-Dec-2013 23:08:11 %AAA-I-CONNECT: User CLI session for user mitya over telnet , source 10.116.0.211 destination  10.116.0.91 ACCEPTED\nshow configuration running\n!----------------------------------------------------------------------\n!\n!         DGS-3100-24TG  Gigabit stackable L2 Managed Switch           \n!                            Configuration                             \n!\n!                       Firmware: Build 3.00.43                        \n!     Copyright(C) 2008 D-Link Corporation. All rights reserved.       \n!----------------------------------------------------------------------\n \n! BASIC\n \ndisable web \n \n! SNMP\n \ncreate snmp community sgdrefwddaqtw view CommunityView read_only \ncreate snmp host 10.116.0.211 v2c sgdrefwddaqtw \nconfig snmp system_location SV \nconfig snmp system_name SV \n \n! AUTHENTICATION\n \n                                                                                                                     \n! NETWORK MONITORING\n \n \n! LINK AGGREGATION\n \n \n! PORT\n \nconfig ports description 1:2 privatmelshkina40 \nconfig ports description 1:8 PrivatHunday \nconfig ports description 1:9 Uplink \nconfig ports description 1:15 PrivatTunka1a \n \n! VLAN\n \ncreate vlan users tag 13 \ncreate vlan sv_upr tag 14 \ncreate vlan privat tag 254 \ncreate vlan upr tag 256 \nconfig vlan users add tagged 1:(1-7,9-24),2:(1-24) \nconfig vlan sv_upr add tagged 1:(2-8,10-24),2:(1-24) \nconfig vlan sv_upr add untagged 1:1 \nconfig vlan privat add tagged 1:(1-7,9-24) \nconfig vlan privat add untagged 1:8 \nconfig vlan upr add tagged 1:9 \nconfig gvrp 1:1 pvid 14 \nconfig gvrp 1:8 pvid 254 \n \n! FORWARDING TABLE\n \nconfig multicast filtering_mode 1:(1-24),2:(1-24) filter_unregistered_groups \n \n! BROADCAST STORM CONTROL\n \nconfig traffic control 1:(1-8,10-24),2:(1-24) state enable threshold 3500 sto\nrm_type dlf_multicast_broadcast \n \n! PORT MIRRORING\n \n \n! QOS\n \n \n! MULTIPLE SPANNING TREE\n \n \n! IGMP SNOOPING\n \n \n! 802.1X\n \n \n! SNTP\n \nenable sntp \nconfig sntp primary 10.110.0.2 secondary 10.110.0.20 \nconfig time_zone operator + hour 02 minute 00 \n \n! SSH\n \n \n! SSL\n \n \n! BASIC IP\n \nconfig ipif System ipaddress 10.116.0.91/16 vlan upr \n \n! ROUTING TABLE\n \ncreate iproute default 10.116.0.1 \n \n! ARP\n \n \n! LACP\n \n \n! PORT SECURITY\n \nconfig port_security 1:(1-24) lock_address_mode deleteontimeout trap 10 \n \n! STACK\n \n \n! POE\n \n \n! TRAFFIC SEGMENTATION\n \nconfig traffic_segmentation 1:(2-8,10-24),2:(1-24) forward_list 1:(1,9) \nconfig traffic_segmentation 1:1 forward_list 1:(2-8,10-24),2:(1-24) \n \n! ACCESS CONTROL LIST\n \ncreate access_profile profile_id 1 ip tcp dst_port_mask ffff \ncreate access_profile profile_id 2 ip udp dst_port_mask ffff \nconfig access_profile profile_id 1 add access_id 1 ip tcp dst_port 135 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 2 ip tcp dst_port 139 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 3 ip tcp dst_port 369 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 4 ip tcp dst_port 445 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 5 ip tcp dst_port 593 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 6 ip tcp dst_port 2869 ports\n 1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 7 ip tcp dst_port 5000 ports\n 1:(1-24) deny\nconfig access_profile profile_id 2 add access_id 8 ip udp dst_port 137 ports \n1:(1-24) deny\nconfig access_profile profile_id 2 add access_id 9 ip udp dst_port 138 ports \n1:(1-24) deny\nconfig access_profile profile_id 2 add access_id 10 ip udp dst_port 1900 port\ns 1:(1-24) deny\n \n! HISTORY\n \n \n! SAFEGUARD\n \nconfig safeguard_engine state enable rising 80 falling 25 \n \n! DOWNLOAD\n \n \n! LLDP\n \nenable lldp \nconfig lldp ports 1:(1-8,10-24),2:(1-24) admin_status disable \nconfig lldp ports 1:9 basic_tlvs port_description system_name system_descript\nion system_capabilities enable \nenable lldp forward_message \n \n! MLD SNOOPING\n \n'
381
                self = <ManagedObject: <D0><9C><D0><B5><D0><BB><D0><B5><D1><88>
382
<D0><BA><D0><B8><D0><BD><D0><B0> 40>
383
              is_new = False
384
                diff = None
385
                data = 
386
'!----------------------------------------------------------------------\n!\n!         DGS-3100-24TG  Gigabit stackable L2 Managed Switch           \n!                            Configuration                             \n!\n!                       Firmware: Build 3.00.43                        \n!     Copyright(C) 2008 D-Link Corporation. All rights reserved.       \n!----------------------------------------------------------------------\n \n! BASIC\n \ndisable web \n \n! SNMP\n \ncreate snmp community sgdrefwddaqtw view CommunityView read_only \ncreate snmp host 10.116.0.211 v2c sgdrefwddaqtw \nconfig snmp system_location SV \nconfig snmp system_name SV \n \n! AUTHENTICATION\n \n                                                                                                                     \n! NETWORK MONITORING\n \n \n! LINK AGGREGATION\n \n \n! PORT\n \nconfig ports description 1:2 privatmelshkina40 \nconfig ports description 1:8 PrivatHunday \nconfig ports description 1:9 Uplink \nconfig ports description 1:15 PrivatTunka1a \n \n! VLAN\n \ncreate vlan users tag 13 \ncreate vlan sv_upr tag 14 \ncreate vlan privat tag 254 \ncreate vlan upr tag 256 \nconfig vlan users add tagged 1:(1-7,9-24),2:(1-24) \nconfig vlan sv_upr add tagged 1:(2-8,10-24),2:(1-24) \nconfig vlan sv_upr add untagged 1:1 \nconfig vlan privat add tagged 1:(1-7,9-24) \nconfig vlan privat add untagged 1:8 \nconfig vlan upr add tagged 1:9 \nconfig gvrp 1:1 pvid 14 \nconfig gvrp 1:8 pvid 254 \n \n! FORWARDING TABLE\n \nconfig multicast filtering_mode 1:(1-24),2:(1-24) filter_unregistered_groups \n \n! BROADCAST STORM CONTROL\n \nconfig traffic control 1:(1-8,10-24),2:(1-24) state enable threshold 3500 sto\nrm_type dlf_multicast_broadcast \n \n! PORT MIRRORING\n \n \n! QOS\n \n \n! MULTIPLE SPANNING TREE\n \n \n! IGMP SNOOPING\n \n \n! 802.1X\n \n \n! SNTP\n \nenable sntp \nconfig sntp primary 10.110.0.2 secondary 10.110.0.20 \nconfig time_zone operator + hour 02 minute 00 \n \n! SSH\n \n \n! SSL\n \n \n! BASIC IP\n \nconfig ipif System ipaddress 10.116.0.91/16 vlan upr \n \n! ROUTING TABLE\n \ncreate iproute default 10.116.0.1 \n \n! ARP\n \n \n! LACP\n \n \n! PORT SECURITY\n \nconfig port_security 1:(1-24) lock_address_mode deleteontimeout trap 10 \n \n! STACK\n \n \n! POE\n \n \n! TRAFFIC SEGMENTATION\n \nconfig traffic_segmentation 1:(2-8,10-24),2:(1-24) forward_list 1:(1,9) \nconfig traffic_segmentation 1:1 forward_list 1:(2-8,10-24),2:(1-24) \n \n! ACCESS CONTROL LIST\n \ncreate access_profile profile_id 1 ip tcp dst_port_mask ffff \ncreate access_profile profile_id 2 ip udp dst_port_mask ffff \nconfig access_profile profile_id 1 add access_id 1 ip tcp dst_port 135 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 2 ip tcp dst_port 139 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 3 ip tcp dst_port 369 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 4 ip tcp dst_port 445 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 5 ip tcp dst_port 593 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 6 ip tcp dst_port 2869 ports\n 1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 7 ip tcp dst_port 5000 ports\n 1:(1-24) deny\nconfig access_profile profile_id 2 add access_id 8 ip udp dst_port 137 ports \n1:(1-24) deny\nconfig access_profile profile_id 2 add access_id 9 ip udp dst_port 138 ports \n1:(1-24) deny\nconfig access_profile profile_id 2 add access_id 10 ip udp dst_port 1900 port\ns 1:(1-24) deny\n \n! HISTORY\n \n \n! SAFEGUARD\n \nconfig safeguard_engine state enable rising 80 falling 25 \n \n! DOWNLOAD\n \n \n! LLDP\n \nenable lldp \nconfig lldp ports 1:(1-8,10-24),2:(1-24) admin_status disable \nconfig lldp ports 1:9 basic_tlvs port_description system_name system_descript\nion system_capabilities enable \nenable lldp forward_message \n \n! MLD SNOOPING\n \n'
387
------------------------------------------------------------------------
388
File: /usr/local/noc/inv/discovery/jobs/config_discovery.py (Line: 32)
389
Function: handler
390
   25         def handler(self, object, result):
391
   26             """
392
   27             :param object:
393
   28             :param result:
394
   29             :return:
395
   30             """
396
   31             if self.to_save:
397
   32 ==>             object.save_config(result)
398
   33             return True
399
   34     
400
   35         @classmethod
401
   36         def initial_submit_queryset(cls):
402
   37             return {
403
   38                 "object_profile__enable_config_polling": True
404
Variables:
405
                self = 
406
<noc.inv.discovery.jobs.config_discovery.ConfigDiscoveryJob object at 0x809bbf350>
407
              object = <ManagedObject: <D0><9C><D0><B5><D0><BB><D0><B5><D1><88>
408
<D0><BA><D0><B8><D0><BD><D0><B0> 40>
409
              result = 
410
'!----------------------------------------------------------------------\n!\n!         DGS-3100-24TG  Gigabit stackable L2 Managed Switch           \n!                            Configuration                             \n!\n!                       Firmware: Build 3.00.43                        \n!     Copyright(C) 2008 D-Link Corporation. All rights reserved.       \n!----------------------------------------------------------------------\n \n! BASIC\n \ndisable web \n \n! SNMP\n \ncreate snmp community sgdrefwddaqtw view CommunityView read_only \ncreate snmp host 10.116.0.211 v2c sgdrefwddaqtw \nconfig snmp system_location SV \nconfig snmp system_name SV \n \n! AUTHENTICATION\n \n                                                                                                                     \n! NETWORK MONITORING\n \n \n! LINK AGGREGATION\n \n \n! PORT\n \nconfig ports description 1:2 privatmelshkina40 \nconfig ports description 1:8 PrivatHunday \nconfig ports description 1:9 Uplink \nconfig ports description 1:15 PrivatTunka1a \n \n! VLAN\n \ncreate vlan users tag 13 \ncreate vlan sv_upr tag 14 \ncreate vlan privat tag 254 \ncreate vlan upr tag 256 \nconfig vlan users add tagged 1:(1-7,9-24),2:(1-24) \nconfig vlan sv_upr add tagged 1:(2-8,10-24),2:(1-24) \nconfig vlan sv_upr add untagged 1:1 \nconfig vlan privat add tagged 1:(1-7,9-24) \nconfig vlan privat add untagged 1:8 \nconfig vlan upr add tagged 1:9 \nconfig gvrp 1:1 pvid 14 \nconfig gvrp 1:8 pvid 254 \n \n! FORWARDING TABLE\n \nconfig multicast filtering_mode 1:(1-24),2:(1-24) filter_unregistered_groups \n \n! BROADCAST STORM CONTROL\n \nconfig traffic control 1:(1-8,10-24),2:(1-24) state enable threshold 3500 sto\nrm_type dlf_multicast_broadcast \n \n! PORT MIRRORING\n \n \n! QOS\n \n \n! MULTIPLE SPANNING TREE\n \n \n! IGMP SNOOPING\n \n \n! 802.1X\n \n \n! SNTP\n \nenable sntp \nconfig sntp primary 10.110.0.2 secondary 10.110.0.20 \nconfig time_zone operator + hour 02 minute 00 \n \n! SSH\n \n \n! SSL\n \n \n! BASIC IP\n \nconfig ipif System ipaddress 10.116.0.91/16 vlan upr \n \n! ROUTING TABLE\n \ncreate iproute default 10.116.0.1 \n \n! ARP\n \n \n! LACP\n \n \n! PORT SECURITY\n \nconfig port_security 1:(1-24) lock_address_mode deleteontimeout trap 10 \n \n! STACK\n \n \n! POE\n \n \n! TRAFFIC SEGMENTATION\n \nconfig traffic_segmentation 1:(2-8,10-24),2:(1-24) forward_list 1:(1,9) \nconfig traffic_segmentation 1:1 forward_list 1:(2-8,10-24),2:(1-24) \n \n! ACCESS CONTROL LIST\n \ncreate access_profile profile_id 1 ip tcp dst_port_mask ffff \ncreate access_profile profile_id 2 ip udp dst_port_mask ffff \nconfig access_profile profile_id 1 add access_id 1 ip tcp dst_port 135 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 2 ip tcp dst_port 139 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 3 ip tcp dst_port 369 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 4 ip tcp dst_port 445 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 5 ip tcp dst_port 593 ports \n1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 6 ip tcp dst_port 2869 ports\n 1:(1-24) deny\nconfig access_profile profile_id 1 add access_id 7 ip tcp dst_port 5000 ports\n 1:(1-24) deny\nconfig access_profile profile_id 2 add access_id 8 ip udp dst_port 137 ports \n1:(1-24) deny\nconfig access_profile profile_id 2 add access_id 9 ip udp dst_port 138 ports \n1:(1-24) deny\nconfig access_profile profile_id 2 add access_id 10 ip udp dst_port 1900 port\ns 1:(1-24) deny\n \n! HISTORY\n \n \n! SAFEGUARD\n \nconfig safeguard_engine state enable rising 80 falling 25 \n \n! DOWNLOAD\n \n \n! LLDP\n \nenable lldp \nconfig lldp ports 1:(1-8,10-24),2:(1-24) admin_status disable \nconfig lldp ports 1:9 basic_tlvs port_description system_name system_descript\nion system_capabilities enable \nenable lldp forward_message \n \n! MLD SNOOPING\n \n'
411
------------------------------------------------------------------------
412
File: /usr/local/noc/lib/scheduler/scheduler.py (Line: 267)
413
Function: _job_wrapper
414
  260             else:
415
  261                 return self._job_wrapper(job, **kwargs)
416
  262     
417
  263         def _job_wrapper(self, job, **kwargs):
418
  264             tb = None
419
  265             t0 = time.time()
420
  266             try:
421
  267 ==>             r = job.handler(**kwargs)
422
  268             except Exception:
423
  269                 # error_report()
424
  270                 tb = get_traceback()
425
  271                 job.error(tb)
426
  272                 job.on_exception()
427
  273                 s = job.S_EXCEPTION
428
Variables:
429
                 job = 
430
<noc.inv.discovery.jobs.config_discovery.ConfigDiscoveryJob object at 0x809bbf350>
431
                  tb = None
432
                self = <noc.inv.discovery.scheduler.DiscoveryScheduler object at 0x80899d090>
433
                  t0 = 1390414371.535026
434
              kwargs = repr() failed
435
------------------------------------------------------------------------
436
END OF TRACEBACK