annet 2.6.0__py3-none-any.whl → 3.1.0__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/__init__.py +5 -4
- annet/adapters/file/provider.py +49 -26
- annet/adapters/netbox/common/manufacturer.py +3 -22
- annet/adapters/netbox/common/models.py +3 -2
- annet/adapters/netbox/v24/models.py +4 -3
- annet/annlib/netdev/views/hardware.py +15 -70
- annet/annlib/patching.py +9 -6
- annet/annlib/rbparser/acl.py +3 -2
- annet/annlib/rbparser/ordering.py +3 -2
- annet/annlib/rbparser/platform.py +0 -66
- annet/annlib/rulebook/common.py +21 -14
- annet/annlib/tabparser.py +0 -18
- annet/api/__init__.py +16 -7
- annet/diff.py +3 -3
- annet/gen.py +6 -6
- annet/generators/__init__.py +15 -22
- annet/hardware.py +8 -12
- annet/rulebook/__init__.py +3 -2
- annet/rulebook/deploying.py +3 -2
- annet/rulebook/juniper/__init__.py +2 -2
- annet/rulebook/patching.py +5 -5
- annet/vendors/__init__.py +33 -0
- annet/vendors/base.py +38 -0
- annet/vendors/registry.py +93 -0
- {annet-2.6.0.dist-info → annet-3.1.0.dist-info}/METADATA +1 -1
- {annet-2.6.0.dist-info → annet-3.1.0.dist-info}/RECORD +33 -30
- annet_generators/example/__init__.py +6 -1
- annet_generators/example/hostname.py +113 -0
- annet/tabparser.py +0 -53
- {annet-2.6.0.dist-info → annet-3.1.0.dist-info}/WHEEL +0 -0
- {annet-2.6.0.dist-info → annet-3.1.0.dist-info}/entry_points.txt +0 -0
- {annet-2.6.0.dist-info → annet-3.1.0.dist-info}/licenses/AUTHORS +0 -0
- {annet-2.6.0.dist-info → annet-3.1.0.dist-info}/licenses/LICENSE +0 -0
- {annet-2.6.0.dist-info → annet-3.1.0.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
annet/__init__.py,sha256=
|
|
1
|
+
annet/__init__.py,sha256=mq-nzRTsR4cLd-wy4BL1i1MI57f2iG_5NX0iKViF_9U,1914
|
|
2
2
|
annet/annet.py,sha256=vyQ__n5hkjub3aWO8tksHPoUSbTeK97MyMcR_U8_BSU,1016
|
|
3
3
|
annet/argparse.py,sha256=v1MfhjR0B8qahza0WinmXClpR8UiDFhmwDDWtNroJPA,12855
|
|
4
4
|
annet/bgp_models.py,sha256=oibTSdipNkGL4t8Xn94bhyKHMOtwbPBqmYaAy4FmTxQ,12361
|
|
@@ -7,11 +7,11 @@ annet/cli_args.py,sha256=jzMKRezWe_87k7VBNzgwPjWGMROJksbgrlX-GDd6oQs,13533
|
|
|
7
7
|
annet/connectors.py,sha256=aoiDVLPizx8CW2p8SAwGCzyO_WW8H9xc2aujbGC4bDg,4882
|
|
8
8
|
annet/deploy.py,sha256=JCcJ2hUmUsaOSrcxFuW8SlN0ubXSnHQ7H_nP_tx-PgE,7698
|
|
9
9
|
annet/deploy_ui.py,sha256=KcP1g_c1HSA3n5qFxbGHd8t_arL4_xJV46PFO-7FLg8,28650
|
|
10
|
-
annet/diff.py,sha256=
|
|
10
|
+
annet/diff.py,sha256=rxomgjyewq0VxKqWCqHEjYt6s_Ihv3HXiUr5QVHPlWU,9497
|
|
11
11
|
annet/executor.py,sha256=lcKI-EbYqeCiBNpL729kSltduzxbAzOkQ1L_QK7tNv8,5112
|
|
12
12
|
annet/filtering.py,sha256=ZtqxPsKdV9reZoRxtQyBg22BqyMqd-2SotYcxZ-68AQ,903
|
|
13
|
-
annet/gen.py,sha256=
|
|
14
|
-
annet/hardware.py,sha256=
|
|
13
|
+
annet/gen.py,sha256=3p8HxC17yxTno1Kb4f7csjBTazXnB6FCRmKq000YLmg,31931
|
|
14
|
+
annet/hardware.py,sha256=e7RWc5yPdEDT5hxNqcqWv9g9DRWIgwAieA2iT4FdPqc,1158
|
|
15
15
|
annet/implicit.py,sha256=G6EwZbrtUp089qRAwh96hminp236-1pJbeKAedoEafg,6056
|
|
16
16
|
annet/lib.py,sha256=4N4X6jCCrig5rk7Ua4AofrV9zK9jhzkBq57fLsfBJjw,4812
|
|
17
17
|
annet/output.py,sha256=se8EpyNS9f9kPOlOaAV0ht4DjzDoBr8F2UafiezLPYw,7743
|
|
@@ -19,7 +19,6 @@ annet/parallel.py,sha256=onkE3q3Pe1CjOa3fI20vWUA5VO50sPlPxzfyiVdo8pI,17703
|
|
|
19
19
|
annet/patching.py,sha256=nILbY5oJajN0b1j3f0HEJm05H3HVThnWvB7vDVh7UQw,559
|
|
20
20
|
annet/reference.py,sha256=B8mH8VUMcecPnzULiTVb_kTQ7jQrCL7zp4pfIZQa5fk,4035
|
|
21
21
|
annet/storage.py,sha256=44f2aHNFOsQMSJwFvGxyu26oRcs3QmS24TKivcfPlxU,4064
|
|
22
|
-
annet/tabparser.py,sha256=oN0pFeO1GEgMD-ti9rHl5SvaYZPZbrYx_BIVedIC5JQ,1257
|
|
23
22
|
annet/text_term_format.py,sha256=y0U6VuFEAEil8Ab3HB8DBbVHisu31EHiRV7AOVruCeA,2816
|
|
24
23
|
annet/tracing.py,sha256=ndpM-au1c88uBBpOuH_z52qWZL773edYozNyys_wA68,4044
|
|
25
24
|
annet/types.py,sha256=f2HwqoKa6AucwFwDMszoouB6m1B8n6VmdjHMktO30Kc,7175
|
|
@@ -28,20 +27,20 @@ annet/adapters/fetchers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
|
|
|
28
27
|
annet/adapters/fetchers/stub/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
28
|
annet/adapters/fetchers/stub/fetcher.py,sha256=FzpkIzPJBQVuNNSdXKoGzkALmIGMgo2gmGLXzYWdDYA,891
|
|
30
29
|
annet/adapters/file/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
|
-
annet/adapters/file/provider.py,sha256=
|
|
30
|
+
annet/adapters/file/provider.py,sha256=3hNt0QQg46SVymLQ4Bh9G4VNYyhnB7gV5yu5OiIJpZE,7307
|
|
32
31
|
annet/adapters/netbox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
32
|
annet/adapters/netbox/provider.py,sha256=SrxW_uBLvMTqtRiYXreL6RrZK4MpxVguF2ITnYOnVHU,2226
|
|
34
33
|
annet/adapters/netbox/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
34
|
annet/adapters/netbox/common/adapter.py,sha256=-YcO3371D8hupNXKf5f4-FdFSjTto-7VKDvz29Gid38,2016
|
|
36
35
|
annet/adapters/netbox/common/client.py,sha256=PaxHG4W9H8_uunIwMBNYkLq4eQJYoO6p6gY-ciQs7Nc,2563
|
|
37
|
-
annet/adapters/netbox/common/manufacturer.py,sha256=
|
|
38
|
-
annet/adapters/netbox/common/models.py,sha256=
|
|
36
|
+
annet/adapters/netbox/common/manufacturer.py,sha256=n1RxJSGqXilKcGSqwIc7d2jD1NCaUXG5kQcOO93WTxw,1319
|
|
37
|
+
annet/adapters/netbox/common/models.py,sha256=IS9q5ZhrDhp74sjl5exSQu6lVOrQCX_I_RRtA9uCcdg,7686
|
|
39
38
|
annet/adapters/netbox/common/query.py,sha256=kbNQSZwkjFeDArHwA8INHUauxCxYElXtNh58pZipWdo,1867
|
|
40
39
|
annet/adapters/netbox/common/status_client.py,sha256=POaqiQJ0jPcqUQH-X_fWHVnKB7TBYveNriaT0eNTlfI,769
|
|
41
40
|
annet/adapters/netbox/common/storage_base.py,sha256=3dn42CWTEZVBig4ABhy5BMQQ3YGb28InncWZoGvrgKk,8768
|
|
42
41
|
annet/adapters/netbox/common/storage_opts.py,sha256=wfv1spElomwgVYMCgGth3SWVF0RsRgtUgq9GpFL9hJs,1520
|
|
43
42
|
annet/adapters/netbox/v24/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
|
-
annet/adapters/netbox/v24/models.py,sha256=
|
|
43
|
+
annet/adapters/netbox/v24/models.py,sha256=RH2ooUPHOtHT0q1ZQE7v23FgmcsGenzzSgJyft13o1k,7605
|
|
45
44
|
annet/adapters/netbox/v24/storage.py,sha256=zptzrW4aZUv_exuGw0DqQPm_kXZR3DwL4zRHYL6twTk,6219
|
|
46
45
|
annet/adapters/netbox/v37/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
46
|
annet/adapters/netbox/v37/models.py,sha256=VqI1bT5E5pFIaDJWxWMU6bioNyrXKJuNq-_J8YIJIbw,1613
|
|
@@ -60,8 +59,8 @@ annet/annlib/filter_acl.py,sha256=mxDga-3SXqpPEsdQypTq0ScqUqP625lxX-DmJalEc3s,71
|
|
|
60
59
|
annet/annlib/jsontools.py,sha256=BS7s4rI8R9c_y3zz0zYl1l6con65oQ0MvfsC1dsXZts,5535
|
|
61
60
|
annet/annlib/lib.py,sha256=lxmYrbeablFMhFtvFmADVpVShSFi9TN4gNWaBs_Ygm0,14952
|
|
62
61
|
annet/annlib/output.py,sha256=_SjJ6G6bejvnTKqNHw6xeio0FT9oO3OIkLaOC3cEga4,7569
|
|
63
|
-
annet/annlib/patching.py,sha256=
|
|
64
|
-
annet/annlib/tabparser.py,sha256=
|
|
62
|
+
annet/annlib/patching.py,sha256=eSqhiOv98EOEODbRaYxOY8qaW4Ju58EzGB-uddeCId8,21493
|
|
63
|
+
annet/annlib/tabparser.py,sha256=cDo-tAt0gGAToQwK4j0fLh31M0WEBpQclVshPAmanYc,31496
|
|
65
64
|
annet/annlib/types.py,sha256=VHU0CBADfYmO0xzB_c5f-mcuU3dUumuJczQnqGlib9M,852
|
|
66
65
|
annet/annlib/netdev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
67
66
|
annet/annlib/netdev/db.py,sha256=fI_u5aya4l61mbYSjj4JwlVfi3s7obt2jqERSuXGRUI,1634
|
|
@@ -69,19 +68,19 @@ annet/annlib/netdev/devdb/__init__.py,sha256=aKYjjLbJebdKBjnGDpVLQdSqrV2JL24spGm
|
|
|
69
68
|
annet/annlib/netdev/devdb/data/devdb.json,sha256=t-j7SjEqSWNPhYV3cPQCSpODc3VGcRKJze9fgj4L9Uw,6710
|
|
70
69
|
annet/annlib/netdev/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
71
70
|
annet/annlib/netdev/views/dump.py,sha256=rIlyvnA3uM8bB_7oq1nS2KDxTp6dQh2hz-FbNhYIpOU,4630
|
|
72
|
-
annet/annlib/netdev/views/hardware.py,sha256=
|
|
71
|
+
annet/annlib/netdev/views/hardware.py,sha256=XvHtRn29SROKtxqMyr86oc1ItUKy36N98ppfuJQL8PY,3235
|
|
73
72
|
annet/annlib/rbparser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
|
-
annet/annlib/rbparser/acl.py,sha256=
|
|
73
|
+
annet/annlib/rbparser/acl.py,sha256=I_1VUZQgF-s4dYTxyEDxQ-GkAP2MeXonzzsc2xROpTM,3974
|
|
75
74
|
annet/annlib/rbparser/deploying.py,sha256=ACT8QNhDAhJx3ZKuGh2nYBOrpdka2qEKuLDxvQAGKLk,1649
|
|
76
|
-
annet/annlib/rbparser/ordering.py,sha256=
|
|
77
|
-
annet/annlib/rbparser/platform.py,sha256=
|
|
75
|
+
annet/annlib/rbparser/ordering.py,sha256=XknggB92N4IbhHBZZHL0StwCCITt8mkho4D4Nu5Kb4k,2185
|
|
76
|
+
annet/annlib/rbparser/platform.py,sha256=d1jFH8hGMOf_qiveKE4H-c0OfNnzwmt2VYpSiSOn9qc,42
|
|
78
77
|
annet/annlib/rbparser/syntax.py,sha256=iZ7Y-4QQBw4L3UtjEh54qisiRDhobl7HZxFNdP8mi54,3577
|
|
79
78
|
annet/annlib/rulebook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
80
|
-
annet/annlib/rulebook/common.py,sha256=-
|
|
81
|
-
annet/api/__init__.py,sha256=
|
|
79
|
+
annet/annlib/rulebook/common.py,sha256=-x4dYuKDi1T5lxk1PRWQ91FGRlV4UAJ0sQC9vnbhzWw,17016
|
|
80
|
+
annet/api/__init__.py,sha256=EMGUgt3pTi2MDF8DfXlS8PGX2zT0iGLY01R6QlQHvGg,33305
|
|
82
81
|
annet/configs/context.yml,sha256=RVLrKLIHpCty7AGwOnmqf7Uu0iZQCn-AjYhophDJer8,259
|
|
83
82
|
annet/configs/logging.yaml,sha256=EUagfir99QqA73Scc3k7sfQccbU3E1SvEQdyhLFtCl4,997
|
|
84
|
-
annet/generators/__init__.py,sha256=
|
|
83
|
+
annet/generators/__init__.py,sha256=wJbNLI1bMppE71tnjJrqNGtbtLZ_gdRd-HytdZPzBiY,16451
|
|
85
84
|
annet/generators/base.py,sha256=rgQLcQBPZm4ecbKmRhVOpBR-GFJAiVfdb_y5f2-LUR8,3670
|
|
86
85
|
annet/generators/entire.py,sha256=Oe7d0VuIn2sLcOKuRVQW9uR8Vuirg0edekFMSZCMnI4,2786
|
|
87
86
|
annet/generators/exceptions.py,sha256=GPXTBgn2xZ3Ev_bdOPlfCLGRC1kQHe_dEq88S-uyi5s,151
|
|
@@ -118,10 +117,10 @@ annet/rpl_generators/execute.py,sha256=wS6e6fwcPWywsHB0gBMqZ17eF0s4YOBgDgwPB_cr5
|
|
|
118
117
|
annet/rpl_generators/policy.py,sha256=j_2EtAsaxldhZZT4kRXKZacuAsGnHr3JSc2BMxr_Pow,37174
|
|
119
118
|
annet/rpl_generators/prefix_lists.py,sha256=5jM5Xj0dtx5xF9ap-TgExs0ofRAzm0LN2j3aL5Ub_yc,4778
|
|
120
119
|
annet/rpl_generators/rd.py,sha256=YGXgx1D2D0-pixgspXJzA6NvW8lx3AmHMxIY2l5rraI,1457
|
|
121
|
-
annet/rulebook/__init__.py,sha256=
|
|
120
|
+
annet/rulebook/__init__.py,sha256=Zm2RycKvIa-x-FwvaLSdJEV3t-V1QhsnjjkQ5dB7SzI,3979
|
|
122
121
|
annet/rulebook/common.py,sha256=zK1s2c5lc5HQbIlMUQ4HARQudXSgOYiZ_Sxc2I_tHqg,721
|
|
123
|
-
annet/rulebook/deploying.py,sha256=
|
|
124
|
-
annet/rulebook/patching.py,sha256=
|
|
122
|
+
annet/rulebook/deploying.py,sha256=9CMeOUw5L1OWdrccSRfpJyH9H_jH7xWNU1JldviBNrk,3015
|
|
123
|
+
annet/rulebook/patching.py,sha256=7iZvtjR7T8_bK6mCsGlC5uPmntCDQ9OkkDHRWupnMNA,5045
|
|
125
124
|
annet/rulebook/arista/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
126
125
|
annet/rulebook/arista/aaa.py,sha256=7fBTwBnz9SOqYbwG8GBeEQTJG0e4uC4HkuZJeMG-kAY,2250
|
|
127
126
|
annet/rulebook/arista/iface.py,sha256=bgj6a3r__-OE6VyYbSfnD6ps2QJKyX028W7IFJww-UY,720
|
|
@@ -141,7 +140,7 @@ annet/rulebook/huawei/bgp.py,sha256=dN8T3-44ggGEapt4u4sT3bTn_dsoCbS5qdNeSQ8LSTs,
|
|
|
141
140
|
annet/rulebook/huawei/iface.py,sha256=DvLtQ7tfbDQWFmIYV4lxfih13Tdrt24L4-ZS29mCkuc,1126
|
|
142
141
|
annet/rulebook/huawei/misc.py,sha256=Rpwhtm42IgcueDq4K6VOzN2qORoIDYh42Jb7iWL8AII,14424
|
|
143
142
|
annet/rulebook/huawei/vlandb.py,sha256=B4BEUhZetjsNNhIJOp9cXtJSAYKMOgQucO8oAxSkRI0,4658
|
|
144
|
-
annet/rulebook/juniper/__init__.py,sha256=
|
|
143
|
+
annet/rulebook/juniper/__init__.py,sha256=DZu6Od4Uow0UHE1vNMnBJwCwynOFouHXNs253yStpZ4,5376
|
|
145
144
|
annet/rulebook/nexus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
146
145
|
annet/rulebook/nexus/iface.py,sha256=aeog9iSGT2zZ78tsGlrRcfgfOv7yW3jLwryXqdeplRw,2923
|
|
147
146
|
annet/rulebook/routeros/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -180,10 +179,14 @@ annet/rulebook/texts/ribbon.deploy,sha256=hCq2XeAcwaYanyQ8lTdnez6Pgq-gRqpNuR8dAl
|
|
|
180
179
|
annet/rulebook/texts/ribbon.rul,sha256=609LyLTDCtXPVQNAzqS-VEyCpW3byHP8TCMJLFMn5cc,2108
|
|
181
180
|
annet/rulebook/texts/routeros.order,sha256=M71uy_hf0KAjLNS3zZY3uih4m2xLUcu26FEoVVjC6k0,905
|
|
182
181
|
annet/rulebook/texts/routeros.rul,sha256=ipfxjj0mjFef6IsUlupqx4BY_Je_OUb8u_U1019O1DE,1203
|
|
183
|
-
annet
|
|
184
|
-
annet
|
|
182
|
+
annet/vendors/__init__.py,sha256=gQcDFlKeWDZB6vxJ_MdPWEoE-C5dg-YgXvgGkuV9YLw,569
|
|
183
|
+
annet/vendors/base.py,sha256=KLf_lv-Vm3uPH_Kuovdr1V257EALmAS_gYhKEL196FA,919
|
|
184
|
+
annet/vendors/registry.py,sha256=zJUj5vJ105kD7xvxt84MYNTNYZI08AKCNTCmE0YtMzo,2539
|
|
185
|
+
annet-3.1.0.dist-info/licenses/AUTHORS,sha256=rh3w5P6gEgqmuC-bw-HB68vBCr-yIBFhVL0PG4hguLs,878
|
|
186
|
+
annet-3.1.0.dist-info/licenses/LICENSE,sha256=yPxl7dno02Pw7gAcFPIFONzx_gapwDoPXsIsh6Y7lC0,1079
|
|
185
187
|
annet_generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
186
|
-
annet_generators/example/__init__.py,sha256=
|
|
188
|
+
annet_generators/example/__init__.py,sha256=OJ77uj8axc-FIyIu_Xdcnzmde3oQW5mk5qbODkhuVc8,355
|
|
189
|
+
annet_generators/example/hostname.py,sha256=RloLzNVetEoWPLITzfJ13Nk3CC0yi-cZB1RTd6dnuhI,2541
|
|
187
190
|
annet_generators/example/lldp.py,sha256=24bGvShxbio-JxUdaehyPRu31LhH9YwSwFDrWVRn6yo,2100
|
|
188
191
|
annet_generators/mesh_example/__init__.py,sha256=NfNWgXn1TNiWI6A5tmU6Y-4QV2i33td0Qs3re0MNNMo,218
|
|
189
192
|
annet_generators/mesh_example/bgp.py,sha256=jzyDndSSGYyYBquDnLlR-7P5lzmUKcSyYCml3VsoMC0,1385
|
|
@@ -193,8 +196,8 @@ annet_generators/rpl_example/generator.py,sha256=EWah19gOH8G-QyNyWqxCqdRi0BK7GbM
|
|
|
193
196
|
annet_generators/rpl_example/items.py,sha256=d99HSXDHFjZq511EvGhIqRTWK3F4ZsCWfdUqFYQcyhE,772
|
|
194
197
|
annet_generators/rpl_example/mesh.py,sha256=z_WgfDZZ4xnyh3cSf75igyH09hGvtexEVwy1gCD_DzA,288
|
|
195
198
|
annet_generators/rpl_example/route_policy.py,sha256=z6nPb0VDeQtKD1NIg9sFvmUxBD5tVs2frfNIuKdM-5c,2318
|
|
196
|
-
annet-
|
|
197
|
-
annet-
|
|
198
|
-
annet-
|
|
199
|
-
annet-
|
|
200
|
-
annet-
|
|
199
|
+
annet-3.1.0.dist-info/METADATA,sha256=f3Fl0PUMC6covEz71fAYKY8zPOV3ffBitlfF5XM1KVo,815
|
|
200
|
+
annet-3.1.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
201
|
+
annet-3.1.0.dist-info/entry_points.txt,sha256=5lIaDGlGi3l6QQ2ry2jZaqViP5Lvt8AmsegdD0Uznck,192
|
|
202
|
+
annet-3.1.0.dist-info/top_level.txt,sha256=QsoTZBsUtwp_FEcmRwuN8QITBmLOZFqjssRfKilGbP8,23
|
|
203
|
+
annet-3.1.0.dist-info/RECORD,,
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import itertools
|
|
1
2
|
from typing import List
|
|
2
3
|
|
|
3
4
|
from annet.generators import BaseGenerator
|
|
4
5
|
from annet.storage import Storage
|
|
5
6
|
|
|
6
7
|
from . import lldp
|
|
8
|
+
from . import hostname
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
def get_generators(store: Storage) -> List[BaseGenerator]:
|
|
10
|
-
return
|
|
12
|
+
return list(itertools.chain.from_iterable([
|
|
13
|
+
hostname.get_generators(store),
|
|
14
|
+
lldp.get_generators(store),
|
|
15
|
+
]))
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
|
|
3
|
+
from annet.generators import BaseGenerator, PartialGenerator
|
|
4
|
+
from annet.storage import Storage
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Hostname(PartialGenerator):
|
|
8
|
+
TAGS = ["hostname"]
|
|
9
|
+
|
|
10
|
+
def acl_huawei(self, _):
|
|
11
|
+
return """
|
|
12
|
+
sysname
|
|
13
|
+
header
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
def acl_safe_huawei(self, _):
|
|
17
|
+
return """
|
|
18
|
+
sysname
|
|
19
|
+
header
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
def run_huawei(self, device):
|
|
23
|
+
yield "sysname", device.hostname
|
|
24
|
+
yield 'header login information "%s"' % device.hostname
|
|
25
|
+
|
|
26
|
+
def acl_cisco(self, _):
|
|
27
|
+
return """
|
|
28
|
+
hostname
|
|
29
|
+
banner login
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
def acl_safe_cisco(self, _):
|
|
33
|
+
return """
|
|
34
|
+
hostname
|
|
35
|
+
banner login
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def run_cisco(self, device):
|
|
39
|
+
if device.hw.Cisco.AIR and device.tags["Lightweight WiFi точка"]:
|
|
40
|
+
return
|
|
41
|
+
elif device.hw.Catalyst:
|
|
42
|
+
yield "banner login ^C%s^C" % device.hostname
|
|
43
|
+
yield "hostname", device.hostname
|
|
44
|
+
|
|
45
|
+
def acl_arista(self, _):
|
|
46
|
+
return """
|
|
47
|
+
hostname
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
def acl_safe_arista(self, _):
|
|
51
|
+
return """
|
|
52
|
+
hostname
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
def run_arista(self, device):
|
|
56
|
+
yield "hostname", device.hostname
|
|
57
|
+
|
|
58
|
+
acl_nexus = acl_arista
|
|
59
|
+
run_nexus = run_arista
|
|
60
|
+
|
|
61
|
+
def acl_juniper(self, _):
|
|
62
|
+
return """
|
|
63
|
+
system %cant_delete
|
|
64
|
+
host-name
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
def acl_safe_juniper(self, _):
|
|
68
|
+
return """
|
|
69
|
+
system %cant_delete
|
|
70
|
+
host-name
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
def run_juniper(self, device):
|
|
74
|
+
with self.block("system"):
|
|
75
|
+
yield "host-name", device.hostname
|
|
76
|
+
|
|
77
|
+
acl_ribbon = acl_juniper
|
|
78
|
+
acl_safe_ribbon = acl_safe_juniper
|
|
79
|
+
run_ribbon = run_juniper
|
|
80
|
+
|
|
81
|
+
def acl_nokia(self, _):
|
|
82
|
+
return """
|
|
83
|
+
system
|
|
84
|
+
name
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
def acl_safe_nokia(self, _):
|
|
88
|
+
return """
|
|
89
|
+
system
|
|
90
|
+
name
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
def run_nokia(self, device):
|
|
94
|
+
with self.block("system"):
|
|
95
|
+
yield "name", self.literal(device.hostname)
|
|
96
|
+
|
|
97
|
+
def acl_routeros(self, _):
|
|
98
|
+
return """
|
|
99
|
+
system %cant_delete
|
|
100
|
+
identity %cant_delete
|
|
101
|
+
set ~ %cant_delete
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
def run_routeros(self, device):
|
|
105
|
+
with self.block("system"):
|
|
106
|
+
with self.block("identity"):
|
|
107
|
+
yield f"set name={device.hostname}"
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def get_generators(store: Storage) -> List[BaseGenerator]:
|
|
111
|
+
return [
|
|
112
|
+
Hostname(store),
|
|
113
|
+
]
|
annet/tabparser.py
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
from annet.annlib.tabparser import ( # pylint: disable=unused-import
|
|
2
|
-
AsrFormatter,
|
|
3
|
-
CiscoFormatter,
|
|
4
|
-
CommonFormatter,
|
|
5
|
-
HuaweiFormatter,
|
|
6
|
-
OptixtransFormatter,
|
|
7
|
-
JuniperFormatter,
|
|
8
|
-
JuniperList,
|
|
9
|
-
NokiaFormatter,
|
|
10
|
-
ParserError,
|
|
11
|
-
RibbonFormatter,
|
|
12
|
-
RosFormatter,
|
|
13
|
-
parse_to_tree,
|
|
14
|
-
AristaFormatter,
|
|
15
|
-
NexusFormatter,
|
|
16
|
-
B4comFormatter,
|
|
17
|
-
ArubaFormatter,
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def make_formatter(hw, **kwargs):
|
|
22
|
-
if hw.OptiXtrans:
|
|
23
|
-
cls = OptixtransFormatter
|
|
24
|
-
elif hw.Huawei:
|
|
25
|
-
cls = HuaweiFormatter
|
|
26
|
-
elif hw.Cisco.ASR or hw.Cisco.XRV or hw.Cisco.XR:
|
|
27
|
-
cls = AsrFormatter
|
|
28
|
-
elif hw.Nexus:
|
|
29
|
-
cls = NexusFormatter
|
|
30
|
-
elif hw.Cisco:
|
|
31
|
-
cls = CiscoFormatter
|
|
32
|
-
elif hw.B4com:
|
|
33
|
-
cls = B4comFormatter
|
|
34
|
-
elif hw.Aruba:
|
|
35
|
-
cls = ArubaFormatter
|
|
36
|
-
elif hw.Juniper:
|
|
37
|
-
cls = JuniperFormatter
|
|
38
|
-
elif hw.Nokia:
|
|
39
|
-
cls = NokiaFormatter
|
|
40
|
-
elif hw.RouterOS:
|
|
41
|
-
cls = RosFormatter
|
|
42
|
-
elif hw.PC:
|
|
43
|
-
cls = CommonFormatter
|
|
44
|
-
elif hw.Ribbon:
|
|
45
|
-
cls = RibbonFormatter
|
|
46
|
-
elif hw.H3C:
|
|
47
|
-
cls = HuaweiFormatter
|
|
48
|
-
elif hw.Arista:
|
|
49
|
-
cls = AristaFormatter
|
|
50
|
-
else:
|
|
51
|
-
raise NotImplementedError("Unknown formatter for hw '%s'" % hw)
|
|
52
|
-
|
|
53
|
-
return cls(**kwargs)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|