annet 0.16.20__py3-none-any.whl → 0.16.22__py3-none-any.whl
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.
Potentially problematic release.
This version of annet might be problematic. Click here for more details.
- annet/annlib/tabparser.py +39 -4
- annet/tabparser.py +13 -1
- {annet-0.16.20.dist-info → annet-0.16.22.dist-info}/METADATA +1 -1
- {annet-0.16.20.dist-info → annet-0.16.22.dist-info}/RECORD +9 -9
- {annet-0.16.20.dist-info → annet-0.16.22.dist-info}/AUTHORS +0 -0
- {annet-0.16.20.dist-info → annet-0.16.22.dist-info}/LICENSE +0 -0
- {annet-0.16.20.dist-info → annet-0.16.22.dist-info}/WHEEL +0 -0
- {annet-0.16.20.dist-info → annet-0.16.22.dist-info}/entry_points.txt +0 -0
- {annet-0.16.20.dist-info → annet-0.16.22.dist-info}/top_level.txt +0 -0
annet/annlib/tabparser.py
CHANGED
|
@@ -330,6 +330,41 @@ class CiscoFormatter(BlockExitFormatter):
|
|
|
330
330
|
yield from super().block_exit(context)
|
|
331
331
|
|
|
332
332
|
|
|
333
|
+
class NexusFormatter(BlockExitFormatter):
|
|
334
|
+
def __init__(self, indent=" "):
|
|
335
|
+
super().__init__("exit", indent)
|
|
336
|
+
|
|
337
|
+
def split(self, text):
|
|
338
|
+
return self.split_remove_spaces(text)
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
class B4comFormatter(BlockExitFormatter):
|
|
342
|
+
def __init__(self, indent=" "):
|
|
343
|
+
super().__init__("exit", indent)
|
|
344
|
+
|
|
345
|
+
def split(self, text):
|
|
346
|
+
return self.split_remove_spaces(text)
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
class ArubaFormatter(BlockExitFormatter):
|
|
350
|
+
def __init__(self, indent=" "):
|
|
351
|
+
super().__init__("exit", indent)
|
|
352
|
+
|
|
353
|
+
def split(self, text):
|
|
354
|
+
return self.split_remove_spaces(text)
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
class AristaFormatter(CiscoFormatter):
|
|
358
|
+
|
|
359
|
+
def block_exit(self, context: Optional[FormatterContext]) -> str:
|
|
360
|
+
current = context and context.row or ""
|
|
361
|
+
|
|
362
|
+
if current.startswith(("address-family")):
|
|
363
|
+
yield from block_wrapper("exit")
|
|
364
|
+
else:
|
|
365
|
+
yield from super().block_exit(context)
|
|
366
|
+
|
|
367
|
+
|
|
333
368
|
class AsrFormatter(BlockExitFormatter):
|
|
334
369
|
def __init__(self, indent=" "):
|
|
335
370
|
super().__init__("exit", indent)
|
|
@@ -702,16 +737,16 @@ def make_formatter(vendor, **kwargs):
|
|
|
702
737
|
formatters = {
|
|
703
738
|
"juniper": JuniperFormatter,
|
|
704
739
|
"cisco": CiscoFormatter,
|
|
705
|
-
"nexus":
|
|
740
|
+
"nexus": NexusFormatter,
|
|
706
741
|
"huawei": HuaweiFormatter,
|
|
707
742
|
"optixtrans": OptixtransFormatter,
|
|
708
|
-
"arista":
|
|
743
|
+
"arista": AristaFormatter,
|
|
709
744
|
"nokia": NokiaFormatter,
|
|
710
745
|
"routeros": RosFormatter,
|
|
711
|
-
"aruba":
|
|
746
|
+
"aruba": ArubaFormatter,
|
|
712
747
|
"pc": CommonFormatter,
|
|
713
748
|
"ribbon": RibbonFormatter,
|
|
714
|
-
"b4com":
|
|
749
|
+
"b4com": B4comFormatter,
|
|
715
750
|
}
|
|
716
751
|
return formatters[vendor](**kwargs)
|
|
717
752
|
|
annet/tabparser.py
CHANGED
|
@@ -11,6 +11,10 @@ from annet.annlib.tabparser import ( # pylint: disable=unused-import
|
|
|
11
11
|
RibbonFormatter,
|
|
12
12
|
RosFormatter,
|
|
13
13
|
parse_to_tree,
|
|
14
|
+
AristaFormatter,
|
|
15
|
+
NexusFormatter,
|
|
16
|
+
B4comFormatter,
|
|
17
|
+
ArubaFormatter,
|
|
14
18
|
)
|
|
15
19
|
|
|
16
20
|
|
|
@@ -21,8 +25,14 @@ def make_formatter(hw, **kwargs):
|
|
|
21
25
|
cls = HuaweiFormatter
|
|
22
26
|
elif hw.Cisco.ASR or hw.Cisco.XRV:
|
|
23
27
|
cls = AsrFormatter
|
|
24
|
-
elif hw.Nexus
|
|
28
|
+
elif hw.Nexus:
|
|
29
|
+
cls = NexusFormatter
|
|
30
|
+
elif hw.Cisco:
|
|
25
31
|
cls = CiscoFormatter
|
|
32
|
+
elif hw.B4com:
|
|
33
|
+
cls = B4comFormatter
|
|
34
|
+
elif hw.Aruba:
|
|
35
|
+
cls = ArubaFormatter
|
|
26
36
|
elif hw.Juniper:
|
|
27
37
|
cls = JuniperFormatter
|
|
28
38
|
elif hw.Nokia:
|
|
@@ -35,6 +45,8 @@ def make_formatter(hw, **kwargs):
|
|
|
35
45
|
cls = RibbonFormatter
|
|
36
46
|
elif hw.H3C:
|
|
37
47
|
cls = HuaweiFormatter
|
|
48
|
+
elif hw.Arista:
|
|
49
|
+
cls = AristaFormatter
|
|
38
50
|
else:
|
|
39
51
|
raise NotImplementedError("Unknown formatter for hw '%s'" % hw)
|
|
40
52
|
|
|
@@ -18,7 +18,7 @@ annet/parallel.py,sha256=hLkzEht0KhzmzUWDdO4QFYQHzhxs3wPlTA8DxbB2ziw,17160
|
|
|
18
18
|
annet/patching.py,sha256=nILbY5oJajN0b1j3f0HEJm05H3HVThnWvB7vDVh7UQw,559
|
|
19
19
|
annet/reference.py,sha256=B8mH8VUMcecPnzULiTVb_kTQ7jQrCL7zp4pfIZQa5fk,4035
|
|
20
20
|
annet/storage.py,sha256=eAHEvPbRuKDUJdnkzSrHmW_lBJS3Y0g93Y2VJ4qzifQ,3941
|
|
21
|
-
annet/tabparser.py,sha256=
|
|
21
|
+
annet/tabparser.py,sha256=rRzfZSurR5P1eSdVWXMjABvV4PX83NRRQY0CzwabExw,1242
|
|
22
22
|
annet/text_term_format.py,sha256=CHb6viv45vmYl-SK1A1vyPHGhaEni6jVybBusaQnct8,2813
|
|
23
23
|
annet/tracing.py,sha256=ndpM-au1c88uBBpOuH_z52qWZL773edYozNyys_wA68,4044
|
|
24
24
|
annet/types.py,sha256=f2HwqoKa6AucwFwDMszoouB6m1B8n6VmdjHMktO30Kc,7175
|
|
@@ -50,7 +50,7 @@ annet/annlib/jsontools.py,sha256=DVmA6kmKGSCsKrFnag4EMR1WKe39Owlvzpfdo726ufk,547
|
|
|
50
50
|
annet/annlib/lib.py,sha256=eJ4hcVuQ6pdYBzLs4YKCHFtq45idOfZCYp92XfF7_QI,15317
|
|
51
51
|
annet/annlib/output.py,sha256=_SjJ6G6bejvnTKqNHw6xeio0FT9oO3OIkLaOC3cEga4,7569
|
|
52
52
|
annet/annlib/patching.py,sha256=2CpAT3T43IUFJR57qTYSwjQ0smg0uHWN43df4n1WArs,19937
|
|
53
|
-
annet/annlib/tabparser.py,sha256=
|
|
53
|
+
annet/annlib/tabparser.py,sha256=tyTGtad90EfiQq9oNdCx8mEJ5edGcmKMXgoGwPLKrw4,29086
|
|
54
54
|
annet/annlib/types.py,sha256=VHU0CBADfYmO0xzB_c5f-mcuU3dUumuJczQnqGlib9M,852
|
|
55
55
|
annet/annlib/netdev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
56
|
annet/annlib/netdev/db.py,sha256=fI_u5aya4l61mbYSjj4JwlVfi3s7obt2jqERSuXGRUI,1634
|
|
@@ -164,10 +164,10 @@ annet_generators/rpl_example/__init__.py,sha256=z4-gsDv06BBpgTwRohc50VBQYFD26QVu
|
|
|
164
164
|
annet_generators/rpl_example/items.py,sha256=6x7b0wZ7Vjn6yCaJ-aGbpTHm7fyqO77b-LRqzzhEbh4,615
|
|
165
165
|
annet_generators/rpl_example/policy_generator.py,sha256=KFCqn347CIPcnllOHfINYeKgNSr6Wl-bdM5Xj_YKhYM,11183
|
|
166
166
|
annet_generators/rpl_example/route_policy.py,sha256=QjxFjkePHfTo2CpMeRVaDqZXNXLM-gGlE8EocHuOR4Y,1189
|
|
167
|
-
annet-0.16.
|
|
168
|
-
annet-0.16.
|
|
169
|
-
annet-0.16.
|
|
170
|
-
annet-0.16.
|
|
171
|
-
annet-0.16.
|
|
172
|
-
annet-0.16.
|
|
173
|
-
annet-0.16.
|
|
167
|
+
annet-0.16.22.dist-info/AUTHORS,sha256=rh3w5P6gEgqmuC-bw-HB68vBCr-yIBFhVL0PG4hguLs,878
|
|
168
|
+
annet-0.16.22.dist-info/LICENSE,sha256=yPxl7dno02Pw7gAcFPIFONzx_gapwDoPXsIsh6Y7lC0,1079
|
|
169
|
+
annet-0.16.22.dist-info/METADATA,sha256=frHIxkxuAjOtU1YOrES7-G9ENwzZeGgD2MNLc3TrW6g,728
|
|
170
|
+
annet-0.16.22.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
171
|
+
annet-0.16.22.dist-info/entry_points.txt,sha256=5lIaDGlGi3l6QQ2ry2jZaqViP5Lvt8AmsegdD0Uznck,192
|
|
172
|
+
annet-0.16.22.dist-info/top_level.txt,sha256=QsoTZBsUtwp_FEcmRwuN8QITBmLOZFqjssRfKilGbP8,23
|
|
173
|
+
annet-0.16.22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|