cisco-config-parser 2.0__tar.gz → 2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/PKG-INFO +26 -15
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/README.md +25 -14
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/__init__.py +2 -1
- cisco_config_parser-2.1/cisco_config_parser/cisco_config_parser.py +3 -0
- cisco_config_parser-2.1/cisco_config_parser/old_version/__init__.py +4 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/old_version/utils.py +1 -1
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/parser/__init__.py +32 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser.egg-info/PKG-INFO +26 -15
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/setup.py +1 -1
- cisco_config_parser-2.0/cisco_config_parser/cisco_config_parser.py +0 -2
- cisco_config_parser-2.0/cisco_config_parser/old_version/__init__.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/global_search/__init__.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/global_search/global_obj.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/global_search/global_parser.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/global_search/global_separator.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/layer2_interface/__init__.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/layer2_interface/l2_interface_obj.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/layer2_interface/l2_interface_parser.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/layer2_interface/l2_interface_separator.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/layer2_interface/l2_section_parser.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/layer3_interface/__init__.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/layer3_interface/l3_interface_obj.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/layer3_interface/l3_interface_parser.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/layer3_interface/l3_interface_separator.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/layer3_interface/l3_section_parser.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/old_version/exceptions.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/old_version/obj.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/old_version/old_parse.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/old_version/ssh.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/parent_child/__init__.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/parent_child/parent_child_obj.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/parent_child/parent_child_parser.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/parent_child/parent_child_separator.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/parser/parser.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/parser_regex/__init__.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/parser_regex/regex.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/separator/__init__.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/separator/separator.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/setup.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/testing.py +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser.egg-info/SOURCES.txt +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser.egg-info/dependency_links.txt +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser.egg-info/top_level.txt +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/pyproject.toml +0 -0
- {cisco_config_parser-2.0 → cisco_config_parser-2.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cisco_config_parser
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1
|
|
4
4
|
Summary: This Package Will Parse Cisco IOS, IOS-XE, IOS-XR and NXOS Configuration File.
|
|
5
5
|
Home-page: https://github.com/arezazadeh/cisco_config_parser
|
|
6
6
|
Author: Ahmad Rezazadeh
|
|
@@ -12,7 +12,7 @@ Description-Content-Type: text/markdown
|
|
|
12
12
|
## This Package Will Parse Cisco IOS, IOS-XE, IOS-XR, and NXOS Configuration File.
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
# New
|
|
15
|
+
# New Version 2.0
|
|
16
16
|
|
|
17
17
|
### 1. Layer3 Interfaces:
|
|
18
18
|
- added interface details - returns dict of all layer3 interfaces
|
|
@@ -23,6 +23,8 @@ Description-Content-Type: text/markdown
|
|
|
23
23
|
* Example:
|
|
24
24
|
|
|
25
25
|
```python
|
|
26
|
+
from cisco_config_parser import ConfigParser
|
|
27
|
+
|
|
26
28
|
l3_intf = ConfigParser(res)
|
|
27
29
|
l3 = l3_intf.get_l3_interfaces(ip_pim="ip pim *", ospf="ip ospf.*")
|
|
28
30
|
|
|
@@ -51,12 +53,20 @@ None
|
|
|
51
53
|
<hr>
|
|
52
54
|
<hr>
|
|
53
55
|
|
|
56
|
+
# Old Version < 2.0
|
|
54
57
|
|
|
55
58
|
There are two ways to parse the config, 1, SSH which is not recommended, and 2, feeding the running-config file
|
|
59
|
+
|
|
56
60
|
* to use file, use `ConfigParser(method="file", content=<your_file>, json=True/False)`.
|
|
57
61
|
* to use SSH:
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from cisco_config_parser import ConfigParserOld
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
ConfigParserOld(
|
|
60
70
|
method="int_ssh",
|
|
61
71
|
ssh=True,
|
|
62
72
|
user="username",
|
|
@@ -112,7 +122,8 @@ parse.find_parent_child("^.*Loopback")
|
|
|
112
122
|
|
|
113
123
|
|
|
114
124
|
```ruby
|
|
115
|
-
|
|
125
|
+
|
|
126
|
+
>>> nxos_parser = ConfigParserOld(method="file", content=file1)
|
|
116
127
|
>>> vlan_info = nxos_parser.nxos_get_vlan_info()
|
|
117
128
|
>>> vlan_info.vlan = "2626"
|
|
118
129
|
>>> print(vlan_info.vlan)
|
|
@@ -149,11 +160,11 @@ evpn
|
|
|
149
160
|
|
|
150
161
|
```ruby
|
|
151
162
|
|
|
152
|
-
from cisco_config_parser import
|
|
163
|
+
from cisco_config_parser import ConfigParserOld
|
|
153
164
|
|
|
154
165
|
my_file = "running-config.txt"
|
|
155
166
|
|
|
156
|
-
parser =
|
|
167
|
+
parser = ConfigParserOld(method="file", content=my_file)
|
|
157
168
|
|
|
158
169
|
obj = parser.ios_get_routed_port()
|
|
159
170
|
|
|
@@ -191,11 +202,11 @@ there are two different mode on switchport, `access` and `trunk`. you should spe
|
|
|
191
202
|
|
|
192
203
|
```ruby
|
|
193
204
|
|
|
194
|
-
from cisco_config_parser import
|
|
205
|
+
from cisco_config_parser import ConfigParserOld
|
|
195
206
|
|
|
196
207
|
my_file = "switch01_run_config.txt"
|
|
197
208
|
|
|
198
|
-
parser =
|
|
209
|
+
parser = ConfigParserOld(method="file", content=my_file)
|
|
199
210
|
|
|
200
211
|
obj = parser.ios_get_switchport(mode="access")
|
|
201
212
|
|
|
@@ -229,11 +240,11 @@ Voice vlan 700
|
|
|
229
240
|
|
|
230
241
|
* Finding Routing Protocol
|
|
231
242
|
```ruby
|
|
232
|
-
from cisco_config_parser import
|
|
243
|
+
from cisco_config_parser import ConfigParserOld
|
|
233
244
|
|
|
234
245
|
|
|
235
246
|
my_file = "switch01_running_config.txt"
|
|
236
|
-
parse =
|
|
247
|
+
parse = ConfigParserOld(method="file", content=my_file)
|
|
237
248
|
|
|
238
249
|
|
|
239
250
|
obj_list = parse.find_parent_child("^router")
|
|
@@ -271,11 +282,11 @@ Voice vlan 700
|
|
|
271
282
|
* Finding Interface and Helper address Example
|
|
272
283
|
|
|
273
284
|
```ruby
|
|
274
|
-
from cisco_config_parser import
|
|
285
|
+
from cisco_config_parser import ConfigParserOld
|
|
275
286
|
|
|
276
287
|
|
|
277
288
|
my_file = "switch01_running_config.txt"
|
|
278
|
-
parse =
|
|
289
|
+
parse = ConfigParserOld(method="file", content=my_file)
|
|
279
290
|
obj_list = parse.find_parent_child("^interface")
|
|
280
291
|
|
|
281
292
|
for i in obj_list:
|
|
@@ -298,12 +309,12 @@ interface Vlan200
|
|
|
298
309
|
|
|
299
310
|
```ruby
|
|
300
311
|
|
|
301
|
-
from cisco_config_parser import
|
|
312
|
+
from cisco_config_parser import ConfigParserOld
|
|
302
313
|
|
|
303
314
|
|
|
304
315
|
|
|
305
316
|
my_file = "switch_01-run_config.txt"
|
|
306
|
-
parser =
|
|
317
|
+
parser = ConfigParserOld(method="file", content=my_file)
|
|
307
318
|
|
|
308
319
|
res = parser.ios_get_svi_objects()
|
|
309
320
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
## This Package Will Parse Cisco IOS, IOS-XE, IOS-XR, and NXOS Configuration File.
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
# New
|
|
5
|
+
# New Version 2.0
|
|
6
6
|
|
|
7
7
|
### 1. Layer3 Interfaces:
|
|
8
8
|
- added interface details - returns dict of all layer3 interfaces
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
* Example:
|
|
14
14
|
|
|
15
15
|
```python
|
|
16
|
+
from cisco_config_parser import ConfigParser
|
|
17
|
+
|
|
16
18
|
l3_intf = ConfigParser(res)
|
|
17
19
|
l3 = l3_intf.get_l3_interfaces(ip_pim="ip pim *", ospf="ip ospf.*")
|
|
18
20
|
|
|
@@ -41,12 +43,20 @@ None
|
|
|
41
43
|
<hr>
|
|
42
44
|
<hr>
|
|
43
45
|
|
|
46
|
+
# Old Version < 2.0
|
|
44
47
|
|
|
45
48
|
There are two ways to parse the config, 1, SSH which is not recommended, and 2, feeding the running-config file
|
|
49
|
+
|
|
46
50
|
* to use file, use `ConfigParser(method="file", content=<your_file>, json=True/False)`.
|
|
47
51
|
* to use SSH:
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
from cisco_config_parser import ConfigParserOld
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
ConfigParserOld(
|
|
50
60
|
method="int_ssh",
|
|
51
61
|
ssh=True,
|
|
52
62
|
user="username",
|
|
@@ -102,7 +112,8 @@ parse.find_parent_child("^.*Loopback")
|
|
|
102
112
|
|
|
103
113
|
|
|
104
114
|
```ruby
|
|
105
|
-
|
|
115
|
+
|
|
116
|
+
>>> nxos_parser = ConfigParserOld(method="file", content=file1)
|
|
106
117
|
>>> vlan_info = nxos_parser.nxos_get_vlan_info()
|
|
107
118
|
>>> vlan_info.vlan = "2626"
|
|
108
119
|
>>> print(vlan_info.vlan)
|
|
@@ -139,11 +150,11 @@ evpn
|
|
|
139
150
|
|
|
140
151
|
```ruby
|
|
141
152
|
|
|
142
|
-
from cisco_config_parser import
|
|
153
|
+
from cisco_config_parser import ConfigParserOld
|
|
143
154
|
|
|
144
155
|
my_file = "running-config.txt"
|
|
145
156
|
|
|
146
|
-
parser =
|
|
157
|
+
parser = ConfigParserOld(method="file", content=my_file)
|
|
147
158
|
|
|
148
159
|
obj = parser.ios_get_routed_port()
|
|
149
160
|
|
|
@@ -181,11 +192,11 @@ there are two different mode on switchport, `access` and `trunk`. you should spe
|
|
|
181
192
|
|
|
182
193
|
```ruby
|
|
183
194
|
|
|
184
|
-
from cisco_config_parser import
|
|
195
|
+
from cisco_config_parser import ConfigParserOld
|
|
185
196
|
|
|
186
197
|
my_file = "switch01_run_config.txt"
|
|
187
198
|
|
|
188
|
-
parser =
|
|
199
|
+
parser = ConfigParserOld(method="file", content=my_file)
|
|
189
200
|
|
|
190
201
|
obj = parser.ios_get_switchport(mode="access")
|
|
191
202
|
|
|
@@ -219,11 +230,11 @@ Voice vlan 700
|
|
|
219
230
|
|
|
220
231
|
* Finding Routing Protocol
|
|
221
232
|
```ruby
|
|
222
|
-
from cisco_config_parser import
|
|
233
|
+
from cisco_config_parser import ConfigParserOld
|
|
223
234
|
|
|
224
235
|
|
|
225
236
|
my_file = "switch01_running_config.txt"
|
|
226
|
-
parse =
|
|
237
|
+
parse = ConfigParserOld(method="file", content=my_file)
|
|
227
238
|
|
|
228
239
|
|
|
229
240
|
obj_list = parse.find_parent_child("^router")
|
|
@@ -261,11 +272,11 @@ Voice vlan 700
|
|
|
261
272
|
* Finding Interface and Helper address Example
|
|
262
273
|
|
|
263
274
|
```ruby
|
|
264
|
-
from cisco_config_parser import
|
|
275
|
+
from cisco_config_parser import ConfigParserOld
|
|
265
276
|
|
|
266
277
|
|
|
267
278
|
my_file = "switch01_running_config.txt"
|
|
268
|
-
parse =
|
|
279
|
+
parse = ConfigParserOld(method="file", content=my_file)
|
|
269
280
|
obj_list = parse.find_parent_child("^interface")
|
|
270
281
|
|
|
271
282
|
for i in obj_list:
|
|
@@ -288,12 +299,12 @@ interface Vlan200
|
|
|
288
299
|
|
|
289
300
|
```ruby
|
|
290
301
|
|
|
291
|
-
from cisco_config_parser import
|
|
302
|
+
from cisco_config_parser import ConfigParserOld
|
|
292
303
|
|
|
293
304
|
|
|
294
305
|
|
|
295
306
|
my_file = "switch_01-run_config.txt"
|
|
296
|
-
parser =
|
|
307
|
+
parser = ConfigParserOld(method="file", content=my_file)
|
|
297
308
|
|
|
298
309
|
res = parser.ios_get_svi_objects()
|
|
299
310
|
|
|
@@ -73,6 +73,38 @@ class ConfigParser(Parser):
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
+
from cisco_config_parser.old_version.utils import OldParser
|
|
77
|
+
|
|
78
|
+
class ConfigParserOld(OldParser):
|
|
79
|
+
def find_parent_child(self, regex):
|
|
80
|
+
return self._parent_child_relationship(regex)
|
|
81
|
+
|
|
82
|
+
def ios_get_banner_login(self):
|
|
83
|
+
return self._ios_fetch_banner_login()
|
|
84
|
+
|
|
85
|
+
def ios_get_switchport(self, **kwargs):
|
|
86
|
+
return self._ios_fetch_switchport(**kwargs)
|
|
87
|
+
|
|
88
|
+
def ios_get_routed_port(self):
|
|
89
|
+
return self._ios_fetch_routed_port()
|
|
90
|
+
|
|
91
|
+
def ios_get_svi_objects(self):
|
|
92
|
+
return self._ios_fetch_svi_objects()
|
|
93
|
+
|
|
94
|
+
def nxos_get_vlan_info(self):
|
|
95
|
+
return self._nxos_fetch_vlan_info()
|
|
96
|
+
|
|
97
|
+
def nxos_get_vlan(self):
|
|
98
|
+
return self._nxos_fetch_vlan_list()
|
|
99
|
+
|
|
100
|
+
def nxos_get_l3_int(self):
|
|
101
|
+
return self._nxos_fetch_l3_int()
|
|
102
|
+
|
|
103
|
+
def nxos_get_routing_protocol(self):
|
|
104
|
+
return self._nxos_fetch_routing_protocol()
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
76
108
|
|
|
77
109
|
|
|
78
110
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cisco-config-parser
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1
|
|
4
4
|
Summary: This Package Will Parse Cisco IOS, IOS-XE, IOS-XR and NXOS Configuration File.
|
|
5
5
|
Home-page: https://github.com/arezazadeh/cisco_config_parser
|
|
6
6
|
Author: Ahmad Rezazadeh
|
|
@@ -12,7 +12,7 @@ Description-Content-Type: text/markdown
|
|
|
12
12
|
## This Package Will Parse Cisco IOS, IOS-XE, IOS-XR, and NXOS Configuration File.
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
# New
|
|
15
|
+
# New Version 2.0
|
|
16
16
|
|
|
17
17
|
### 1. Layer3 Interfaces:
|
|
18
18
|
- added interface details - returns dict of all layer3 interfaces
|
|
@@ -23,6 +23,8 @@ Description-Content-Type: text/markdown
|
|
|
23
23
|
* Example:
|
|
24
24
|
|
|
25
25
|
```python
|
|
26
|
+
from cisco_config_parser import ConfigParser
|
|
27
|
+
|
|
26
28
|
l3_intf = ConfigParser(res)
|
|
27
29
|
l3 = l3_intf.get_l3_interfaces(ip_pim="ip pim *", ospf="ip ospf.*")
|
|
28
30
|
|
|
@@ -51,12 +53,20 @@ None
|
|
|
51
53
|
<hr>
|
|
52
54
|
<hr>
|
|
53
55
|
|
|
56
|
+
# Old Version < 2.0
|
|
54
57
|
|
|
55
58
|
There are two ways to parse the config, 1, SSH which is not recommended, and 2, feeding the running-config file
|
|
59
|
+
|
|
56
60
|
* to use file, use `ConfigParser(method="file", content=<your_file>, json=True/False)`.
|
|
57
61
|
* to use SSH:
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from cisco_config_parser import ConfigParserOld
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
ConfigParserOld(
|
|
60
70
|
method="int_ssh",
|
|
61
71
|
ssh=True,
|
|
62
72
|
user="username",
|
|
@@ -112,7 +122,8 @@ parse.find_parent_child("^.*Loopback")
|
|
|
112
122
|
|
|
113
123
|
|
|
114
124
|
```ruby
|
|
115
|
-
|
|
125
|
+
|
|
126
|
+
>>> nxos_parser = ConfigParserOld(method="file", content=file1)
|
|
116
127
|
>>> vlan_info = nxos_parser.nxos_get_vlan_info()
|
|
117
128
|
>>> vlan_info.vlan = "2626"
|
|
118
129
|
>>> print(vlan_info.vlan)
|
|
@@ -149,11 +160,11 @@ evpn
|
|
|
149
160
|
|
|
150
161
|
```ruby
|
|
151
162
|
|
|
152
|
-
from cisco_config_parser import
|
|
163
|
+
from cisco_config_parser import ConfigParserOld
|
|
153
164
|
|
|
154
165
|
my_file = "running-config.txt"
|
|
155
166
|
|
|
156
|
-
parser =
|
|
167
|
+
parser = ConfigParserOld(method="file", content=my_file)
|
|
157
168
|
|
|
158
169
|
obj = parser.ios_get_routed_port()
|
|
159
170
|
|
|
@@ -191,11 +202,11 @@ there are two different mode on switchport, `access` and `trunk`. you should spe
|
|
|
191
202
|
|
|
192
203
|
```ruby
|
|
193
204
|
|
|
194
|
-
from cisco_config_parser import
|
|
205
|
+
from cisco_config_parser import ConfigParserOld
|
|
195
206
|
|
|
196
207
|
my_file = "switch01_run_config.txt"
|
|
197
208
|
|
|
198
|
-
parser =
|
|
209
|
+
parser = ConfigParserOld(method="file", content=my_file)
|
|
199
210
|
|
|
200
211
|
obj = parser.ios_get_switchport(mode="access")
|
|
201
212
|
|
|
@@ -229,11 +240,11 @@ Voice vlan 700
|
|
|
229
240
|
|
|
230
241
|
* Finding Routing Protocol
|
|
231
242
|
```ruby
|
|
232
|
-
from cisco_config_parser import
|
|
243
|
+
from cisco_config_parser import ConfigParserOld
|
|
233
244
|
|
|
234
245
|
|
|
235
246
|
my_file = "switch01_running_config.txt"
|
|
236
|
-
parse =
|
|
247
|
+
parse = ConfigParserOld(method="file", content=my_file)
|
|
237
248
|
|
|
238
249
|
|
|
239
250
|
obj_list = parse.find_parent_child("^router")
|
|
@@ -271,11 +282,11 @@ Voice vlan 700
|
|
|
271
282
|
* Finding Interface and Helper address Example
|
|
272
283
|
|
|
273
284
|
```ruby
|
|
274
|
-
from cisco_config_parser import
|
|
285
|
+
from cisco_config_parser import ConfigParserOld
|
|
275
286
|
|
|
276
287
|
|
|
277
288
|
my_file = "switch01_running_config.txt"
|
|
278
|
-
parse =
|
|
289
|
+
parse = ConfigParserOld(method="file", content=my_file)
|
|
279
290
|
obj_list = parse.find_parent_child("^interface")
|
|
280
291
|
|
|
281
292
|
for i in obj_list:
|
|
@@ -298,12 +309,12 @@ interface Vlan200
|
|
|
298
309
|
|
|
299
310
|
```ruby
|
|
300
311
|
|
|
301
|
-
from cisco_config_parser import
|
|
312
|
+
from cisco_config_parser import ConfigParserOld
|
|
302
313
|
|
|
303
314
|
|
|
304
315
|
|
|
305
316
|
my_file = "switch_01-run_config.txt"
|
|
306
|
-
parser =
|
|
317
|
+
parser = ConfigParserOld(method="file", content=my_file)
|
|
307
318
|
|
|
308
319
|
res = parser.ios_get_svi_objects()
|
|
309
320
|
|
|
File without changes
|
{cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/global_search/__init__.py
RENAMED
|
File without changes
|
{cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/global_search/global_obj.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/layer2_interface/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/layer3_interface/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/old_version/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/old_version/old_parse.py
RENAMED
|
File without changes
|
|
File without changes
|
{cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/parent_child/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/parser_regex/__init__.py
RENAMED
|
File without changes
|
{cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/parser_regex/regex.py
RENAMED
|
File without changes
|
{cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/separator/__init__.py
RENAMED
|
File without changes
|
{cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser/separator/separator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{cisco_config_parser-2.0 → cisco_config_parser-2.1}/cisco_config_parser.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|