annet 3.14.0__py3-none-any.whl → 3.14.1__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/vendors/tabparser.py +15 -26
- {annet-3.14.0.dist-info → annet-3.14.1.dist-info}/METADATA +1 -1
- {annet-3.14.0.dist-info → annet-3.14.1.dist-info}/RECORD +8 -8
- {annet-3.14.0.dist-info → annet-3.14.1.dist-info}/WHEEL +0 -0
- {annet-3.14.0.dist-info → annet-3.14.1.dist-info}/entry_points.txt +0 -0
- {annet-3.14.0.dist-info → annet-3.14.1.dist-info}/licenses/AUTHORS +0 -0
- {annet-3.14.0.dist-info → annet-3.14.1.dist-info}/licenses/LICENSE +0 -0
- {annet-3.14.0.dist-info → annet-3.14.1.dist-info}/top_level.txt +0 -0
annet/vendors/tabparser.py
CHANGED
|
@@ -694,46 +694,35 @@ class RosFormatter(CommonFormatter):
|
|
|
694
694
|
is_patch: bool,
|
|
695
695
|
context: Optional[FormatterContext] = None
|
|
696
696
|
):
|
|
697
|
-
rows = []
|
|
698
|
-
|
|
699
697
|
if is_patch:
|
|
700
|
-
|
|
701
|
-
else:
|
|
702
|
-
items = ((row, child, {}) for row, child in tree.items())
|
|
698
|
+
raise RuntimeError("Ros not supported blocks in patch")
|
|
703
699
|
|
|
700
|
+
rows = []
|
|
701
|
+
|
|
702
|
+
items = ((row, child, {}) for row, child in tree.items())
|
|
704
703
|
for row, sub_config, row_context in items:
|
|
705
|
-
|
|
706
|
-
rows.append((row, sub_config, row_context))
|
|
707
|
-
else:
|
|
708
|
-
rows.append((row, None, row_context))
|
|
704
|
+
rows.append((row, sub_config if sub_config else None, row_context))
|
|
709
705
|
|
|
710
|
-
prev_prow = None
|
|
711
|
-
prev_prow_context = {}
|
|
712
706
|
for sub_config, row_group in itertools.groupby(rows, lambda x: x[1]):
|
|
713
707
|
if sub_config is None:
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
708
|
+
blocks, leaf = [], context
|
|
709
|
+
while leaf:
|
|
710
|
+
if leaf.current:
|
|
711
|
+
blocks.append(leaf.current[0])
|
|
712
|
+
leaf = leaf.parent
|
|
713
|
+
|
|
714
|
+
yield " ".join(reversed(blocks)), None
|
|
715
|
+
yield BlockBegin, None
|
|
717
716
|
for row, _, row_context in row_group:
|
|
718
717
|
yield row, row_context
|
|
719
|
-
|
|
720
|
-
yield BlockEnd, None
|
|
718
|
+
yield BlockEnd, None
|
|
721
719
|
else:
|
|
722
720
|
for row, _, row_context in row_group:
|
|
723
|
-
if context and context.parent and context.parent.row:
|
|
724
|
-
prev_prow, prev_prow_context = context.parent.current
|
|
725
|
-
prow = f"{context.parent.row} {row}"
|
|
726
|
-
else:
|
|
727
|
-
prow = row
|
|
728
|
-
yield prow, row_context
|
|
729
|
-
|
|
730
|
-
yield BlockBegin, None
|
|
731
721
|
yield from self.blocks_and_context(
|
|
732
722
|
sub_config,
|
|
733
723
|
is_patch,
|
|
734
|
-
context=FormatterContext(parent=context, current=(
|
|
724
|
+
context=FormatterContext(parent=context, current=(row, row_context))
|
|
735
725
|
)
|
|
736
|
-
yield BlockEnd, None
|
|
737
726
|
|
|
738
727
|
def _formatted_blocks(self, blocks):
|
|
739
728
|
line = None
|
|
@@ -183,7 +183,7 @@ annet/rulebook/texts/routeros.rul,sha256=ipfxjj0mjFef6IsUlupqx4BY_Je_OUb8u_U1019
|
|
|
183
183
|
annet/vendors/__init__.py,sha256=gQcDFlKeWDZB6vxJ_MdPWEoE-C5dg-YgXvgGkuV9YLw,569
|
|
184
184
|
annet/vendors/base.py,sha256=AmM3--gqC-Rpw5Xu_-hqthWZ9EoZRL8x6eOHwadZGbo,1145
|
|
185
185
|
annet/vendors/registry.py,sha256=LgPg4oxWrgxsfpLpJ6OWEGFmUzlVlHzziSXsZTi82uc,2540
|
|
186
|
-
annet/vendors/tabparser.py,sha256
|
|
186
|
+
annet/vendors/tabparser.py,sha256=-wu5ErbTKtAl4SWGhXG0R1EkDbZkJcCC_7_ZkDpBEuk,31701
|
|
187
187
|
annet/vendors/library/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
188
188
|
annet/vendors/library/arista.py,sha256=J4ltZ7sS_TgIECg2U7fizvxwfS4-s35Of0tNDNWWYbE,1302
|
|
189
189
|
annet/vendors/library/aruba.py,sha256=tvrSFSA43n0uelCv-NLQnqxO01d0y2mrfhncpOX7zoQ,1257
|
|
@@ -199,8 +199,8 @@ annet/vendors/library/optixtrans.py,sha256=VdME69Ca4HAEgoaKN21fZxnmmsqqaxOe_HZja
|
|
|
199
199
|
annet/vendors/library/pc.py,sha256=vfv31_NPi7M-4AUDL89UcpawK2E6xvCpELA209cd1ho,1086
|
|
200
200
|
annet/vendors/library/ribbon.py,sha256=DDOBq-_-FL9dCxqXs2inEWZ-pvw-dJ-A-prA7cKMhec,1216
|
|
201
201
|
annet/vendors/library/routeros.py,sha256=iQa7m_4wjuvcgBOI9gyZwlw1BvzJfOkvUbyoEk-NI9I,1254
|
|
202
|
-
annet-3.14.
|
|
203
|
-
annet-3.14.
|
|
202
|
+
annet-3.14.1.dist-info/licenses/AUTHORS,sha256=rh3w5P6gEgqmuC-bw-HB68vBCr-yIBFhVL0PG4hguLs,878
|
|
203
|
+
annet-3.14.1.dist-info/licenses/LICENSE,sha256=yPxl7dno02Pw7gAcFPIFONzx_gapwDoPXsIsh6Y7lC0,1079
|
|
204
204
|
annet_generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
205
205
|
annet_generators/example/__init__.py,sha256=OJ77uj8axc-FIyIu_Xdcnzmde3oQW5mk5qbODkhuVc8,355
|
|
206
206
|
annet_generators/example/hostname.py,sha256=RloLzNVetEoWPLITzfJ13Nk3CC0yi-cZB1RTd6dnuhI,2541
|
|
@@ -213,8 +213,8 @@ annet_generators/rpl_example/generator.py,sha256=EWah19gOH8G-QyNyWqxCqdRi0BK7GbM
|
|
|
213
213
|
annet_generators/rpl_example/items.py,sha256=HPgxScDvSqJPdz0c2SppDrH82DZYC4zUaniQwcWmh4A,1176
|
|
214
214
|
annet_generators/rpl_example/mesh.py,sha256=z_WgfDZZ4xnyh3cSf75igyH09hGvtexEVwy1gCD_DzA,288
|
|
215
215
|
annet_generators/rpl_example/route_policy.py,sha256=z6nPb0VDeQtKD1NIg9sFvmUxBD5tVs2frfNIuKdM-5c,2318
|
|
216
|
-
annet-3.14.
|
|
217
|
-
annet-3.14.
|
|
218
|
-
annet-3.14.
|
|
219
|
-
annet-3.14.
|
|
220
|
-
annet-3.14.
|
|
216
|
+
annet-3.14.1.dist-info/METADATA,sha256=BKLGnMeB4wRe5P-wSYsu3zPFBxoTIS6_y75rZJ6lz04,816
|
|
217
|
+
annet-3.14.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
218
|
+
annet-3.14.1.dist-info/entry_points.txt,sha256=5lIaDGlGi3l6QQ2ry2jZaqViP5Lvt8AmsegdD0Uznck,192
|
|
219
|
+
annet-3.14.1.dist-info/top_level.txt,sha256=QsoTZBsUtwp_FEcmRwuN8QITBmLOZFqjssRfKilGbP8,23
|
|
220
|
+
annet-3.14.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|