annet 0.16.6__py3-none-any.whl → 0.16.8__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/executor.py +4 -5
- annet/implicit.py +5 -0
- annet/rulebook/texts/cisco.order +5 -2
- annet/rulebook/texts/cisco.rul +6 -0
- {annet-0.16.6.dist-info → annet-0.16.8.dist-info}/METADATA +1 -1
- {annet-0.16.6.dist-info → annet-0.16.8.dist-info}/RECORD +11 -11
- {annet-0.16.6.dist-info → annet-0.16.8.dist-info}/WHEEL +1 -1
- {annet-0.16.6.dist-info → annet-0.16.8.dist-info}/AUTHORS +0 -0
- {annet-0.16.6.dist-info → annet-0.16.8.dist-info}/LICENSE +0 -0
- {annet-0.16.6.dist-info → annet-0.16.8.dist-info}/entry_points.txt +0 -0
- {annet-0.16.6.dist-info → annet-0.16.8.dist-info}/top_level.txt +0 -0
annet/executor.py
CHANGED
|
@@ -15,6 +15,8 @@ from typing import Any, Callable, Dict, List, Optional, Tuple, Union
|
|
|
15
15
|
|
|
16
16
|
import colorama
|
|
17
17
|
import psutil
|
|
18
|
+
|
|
19
|
+
import annet.lib
|
|
18
20
|
from annet.annlib.command import Command, CommandList, Question # noqa: F401
|
|
19
21
|
from annet.storage import Device
|
|
20
22
|
|
|
@@ -146,7 +148,7 @@ def async_bulk(
|
|
|
146
148
|
kwargs["policy"] = policy
|
|
147
149
|
|
|
148
150
|
if processes == 1:
|
|
149
|
-
host_res, host_duration =
|
|
151
|
+
host_res, host_duration = annet.lib.do_async(bulk(executor, devices, coro_gen, *args, **kwargs))
|
|
150
152
|
res.update(host_res)
|
|
151
153
|
deploy_durations.update(host_duration)
|
|
152
154
|
else:
|
|
@@ -313,10 +315,7 @@ def _print_failed(host, res):
|
|
|
313
315
|
|
|
314
316
|
|
|
315
317
|
def _mp_async_bulk(res_q: multiprocessing.Queue, *args, **kwargs):
|
|
316
|
-
|
|
317
|
-
loop = asyncio.new_event_loop()
|
|
318
|
-
asyncio.set_event_loop(loop)
|
|
319
|
-
res = loop.run_until_complete(bulk(*args, **kwargs))
|
|
318
|
+
res = annet.lib.do_async(bulk(*args, **kwargs))
|
|
320
319
|
res_q.put(res)
|
|
321
320
|
res_q.close()
|
|
322
321
|
|
annet/implicit.py
CHANGED
|
@@ -133,6 +133,11 @@ def _implicit_tree(device):
|
|
|
133
133
|
no shutdown
|
|
134
134
|
"""
|
|
135
135
|
elif device.hw.Cisco:
|
|
136
|
+
text += r"""
|
|
137
|
+
!interface
|
|
138
|
+
no shutdown
|
|
139
|
+
no ip address
|
|
140
|
+
"""
|
|
136
141
|
if device.hw.Cisco.Catalyst:
|
|
137
142
|
# this configuration is not visible in running-config when enabled
|
|
138
143
|
text += r"""
|
annet/rulebook/texts/cisco.order
CHANGED
|
@@ -52,8 +52,6 @@ spanning-tree
|
|
|
52
52
|
no system jumbomtu %order_reverse
|
|
53
53
|
system jumbomtu
|
|
54
54
|
|
|
55
|
-
route-map
|
|
56
|
-
|
|
57
55
|
service dhcp
|
|
58
56
|
ip dhcp relay
|
|
59
57
|
ipv6 dhcp relay
|
|
@@ -74,9 +72,14 @@ interface *
|
|
|
74
72
|
|
|
75
73
|
interface */\S+\.\d+/
|
|
76
74
|
|
|
75
|
+
route-map
|
|
76
|
+
|
|
77
77
|
# удалять eth-trunk можно только после того, как вычистим member interfaces
|
|
78
78
|
undo interface */port-channel\d+/ %order_reverse
|
|
79
79
|
|
|
80
|
+
# remote as of neighbors should be assigned before peer-group, the rule is applied to neighbors, not peer-groups
|
|
80
81
|
router bgp
|
|
82
|
+
neighbor */[\da-f\.\:]+/ remote-as
|
|
83
|
+
neighbor */[\da-f\.\:]+/ peer-group
|
|
81
84
|
|
|
82
85
|
line
|
annet/rulebook/texts/cisco.rul
CHANGED
|
@@ -42,12 +42,17 @@ no snmp-server sysobjectid type stack-oid
|
|
|
42
42
|
|
|
43
43
|
!interface */(mgmt|ipmi|Vlan1$)/
|
|
44
44
|
|
|
45
|
+
interface Loopback
|
|
46
|
+
ipv6 address *
|
|
47
|
+
ip address ~
|
|
48
|
+
|
|
45
49
|
# SVI/Subifs/Lagg
|
|
46
50
|
interface */(Vlan|Ethernet.*\.|port-channel.*\.?)\d+$/ %diff_logic=cisco.iface.diff
|
|
47
51
|
vrf member
|
|
48
52
|
ipv6 link-local
|
|
49
53
|
ipv6 address *
|
|
50
54
|
ipv6 nd ~ %logic=cisco.misc.no_ipv6_nd_suppress_ra
|
|
55
|
+
ip address ~
|
|
51
56
|
mtu
|
|
52
57
|
|
|
53
58
|
# Physical
|
|
@@ -59,6 +64,7 @@ interface */\w*Ethernet[0-9\/]+$/ %logic=common.permanent %diff_logic=cisco.
|
|
|
59
64
|
vrf member
|
|
60
65
|
ipv6 link-local
|
|
61
66
|
ipv6 address *
|
|
67
|
+
ip address ~
|
|
62
68
|
channel-group
|
|
63
69
|
mtu
|
|
64
70
|
storm-control * level
|
|
@@ -6,11 +6,11 @@ annet/cli_args.py,sha256=KQlihxSl-Phhq1-9oJDdNSbIllEX55LlPfH6viEKOuw,13483
|
|
|
6
6
|
annet/connectors.py,sha256=-Lghz3PtWCBU8Ohrp0KKQcmm1AUZtN0EnOaZ6IQgCQI,5105
|
|
7
7
|
annet/deploy.py,sha256=pM7r8ipk7y-b4OIenc8FMqZpy5F6TmKdo8DDUJNRBlY,18956
|
|
8
8
|
annet/diff.py,sha256=zLcaCnb4lZRUb7frpH1CstQ3kacRcCblZs1uLG8J5lk,3391
|
|
9
|
-
annet/executor.py,sha256=
|
|
9
|
+
annet/executor.py,sha256=Jny-hm0otZA1naPpFWR-R16SbaZioSQ8pkx-Yd2PYlM,19004
|
|
10
10
|
annet/filtering.py,sha256=ZtqxPsKdV9reZoRxtQyBg22BqyMqd-2SotYcxZ-68AQ,903
|
|
11
11
|
annet/gen.py,sha256=rOAveprvBaEXbLyaQUhQ0QtOvcDfndlIOpchNhu8M1U,33499
|
|
12
12
|
annet/hardware.py,sha256=_iR28dWiPtt6ZYdk-qg1sxazkSRJE3ukqKB-fFFfQak,1141
|
|
13
|
-
annet/implicit.py,sha256=
|
|
13
|
+
annet/implicit.py,sha256=pX1FCZobkx-b5Y9otJDcr2eJQ1BUk_pG-ElKIMUSXWE,5553
|
|
14
14
|
annet/lib.py,sha256=lOdz3UJFYkO0wnuzIRRq3FpULQliqBtfmGmKOGVFO4Q,4238
|
|
15
15
|
annet/output.py,sha256=BNPzjuhMa7gSJ8ze_1O-Ey0tTxSyhAiwfztZMQwhMzk,7176
|
|
16
16
|
annet/parallel.py,sha256=hLkzEht0KhzmzUWDdO4QFYQHzhxs3wPlTA8DxbB2ziw,17160
|
|
@@ -110,8 +110,8 @@ annet/rulebook/texts/b4com.deploy,sha256=SVX8-yLHM90tJC4M-ekpGuGM1aQZW3euSGyg67l
|
|
|
110
110
|
annet/rulebook/texts/b4com.order,sha256=G3aToAIHHzKzDCM3q7_lyr9wJvuVOXVbVvF3wm5PiTE,707
|
|
111
111
|
annet/rulebook/texts/b4com.rul,sha256=5mqyUg_oLRSny2iH6QdhfDWVu6kzgDURtlSATD7DFno,1056
|
|
112
112
|
annet/rulebook/texts/cisco.deploy,sha256=XvXWeOMahE8Uc9RF0xkJj8jGknD4vit8H_f24ubPX7w,1226
|
|
113
|
-
annet/rulebook/texts/cisco.order,sha256=
|
|
114
|
-
annet/rulebook/texts/cisco.rul,sha256=
|
|
113
|
+
annet/rulebook/texts/cisco.order,sha256=OvNHMNqkCc-DN2dEjLCTKv_7ZhiaHt4q2X4Y4Z8dvR4,1901
|
|
114
|
+
annet/rulebook/texts/cisco.rul,sha256=7st2vuEMuq18rt0aDbZav24F8Sqj4h8IRoHOlNr7kuM,2959
|
|
115
115
|
annet/rulebook/texts/huawei.deploy,sha256=azEC6_jQRzwnTSrNgag0hHh6L7hezS_eMk6ZDZfWyXI,10444
|
|
116
116
|
annet/rulebook/texts/huawei.order,sha256=ENllPX4kO6xNw2mUQcx11yhxo3tKStZ5mUyc0C6s3d0,10657
|
|
117
117
|
annet/rulebook/texts/huawei.rul,sha256=02Fi1RG4YYea2clHCluBuJDKNbT0hS9jtsk6_h6GK8k,12958
|
|
@@ -133,10 +133,10 @@ annet/rulebook/texts/routeros.rul,sha256=ipfxjj0mjFef6IsUlupqx4BY_Je_OUb8u_U1019
|
|
|
133
133
|
annet_generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
134
134
|
annet_generators/example/__init__.py,sha256=zVd8_DrXuOASrNzg2Ab94rPyvJff83L-_HppDFxnUjM,228
|
|
135
135
|
annet_generators/example/lldp.py,sha256=24bGvShxbio-JxUdaehyPRu31LhH9YwSwFDrWVRn6yo,2100
|
|
136
|
-
annet-0.16.
|
|
137
|
-
annet-0.16.
|
|
138
|
-
annet-0.16.
|
|
139
|
-
annet-0.16.
|
|
140
|
-
annet-0.16.
|
|
141
|
-
annet-0.16.
|
|
142
|
-
annet-0.16.
|
|
136
|
+
annet-0.16.8.dist-info/AUTHORS,sha256=rh3w5P6gEgqmuC-bw-HB68vBCr-yIBFhVL0PG4hguLs,878
|
|
137
|
+
annet-0.16.8.dist-info/LICENSE,sha256=yPxl7dno02Pw7gAcFPIFONzx_gapwDoPXsIsh6Y7lC0,1079
|
|
138
|
+
annet-0.16.8.dist-info/METADATA,sha256=L55WvsDQ5-LzYasLfs0viQIqM1NgV7qFzUQk5veY-Xc,694
|
|
139
|
+
annet-0.16.8.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
140
|
+
annet-0.16.8.dist-info/entry_points.txt,sha256=5lIaDGlGi3l6QQ2ry2jZaqViP5Lvt8AmsegdD0Uznck,192
|
|
141
|
+
annet-0.16.8.dist-info/top_level.txt,sha256=QsoTZBsUtwp_FEcmRwuN8QITBmLOZFqjssRfKilGbP8,23
|
|
142
|
+
annet-0.16.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|