annet 2.5.3__py3-none-any.whl → 2.6.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.

@@ -8,6 +8,7 @@ _VENDORS = {
8
8
  "cisco": "Cisco",
9
9
  "catalyst": "Cisco Catalyst",
10
10
  "nexus": "Cisco Nexus",
11
+ "iosxr": "Cisco XR",
11
12
  "huawei": "Huawei",
12
13
  "optixtrans": "Huawei OptiXtrans",
13
14
  "juniper": "Juniper",
@@ -19,6 +19,11 @@ class Entity(DumpableView):
19
19
  return self.name
20
20
 
21
21
 
22
+ @dataclass
23
+ class EntityWithSlug(Entity):
24
+ slug: str
25
+
26
+
22
27
  @dataclass
23
28
  class Label:
24
29
  value: str
@@ -82,7 +87,7 @@ class IpAddress(DumpableView, Generic[_PrefixT]):
82
87
  family: IpFamily
83
88
  address: str
84
89
  status: Label
85
- tags: List[Entity]
90
+ tags: List[EntityWithSlug]
86
91
  created: datetime
87
92
  last_updated: datetime
88
93
  prefix: Optional[_PrefixT] = None
@@ -135,12 +140,14 @@ class Interface(Entity, Generic[_IpAddressT]):
135
140
  mode: Optional[InterfaceMode]
136
141
  untagged_vlan: Optional[InterfaceVlan]
137
142
  tagged_vlans: Optional[List[InterfaceVlan]]
143
+ tags: List[EntityWithSlug] = field(default_factory=list)
138
144
  display: str = ""
139
145
  ip_addresses: List[_IpAddressT] = field(default_factory=list)
140
146
  vrf: Optional[Entity] = None
141
147
  mtu: int | None = None
142
148
  lag: Entity | None = None
143
149
  lag_min_links: int | None = None
150
+ speed: int | None = None
144
151
 
145
152
  def add_addr(self, address_mask: str, vrf: str | None) -> None:
146
153
  for existing_addr in self.ip_addresses:
@@ -186,10 +193,11 @@ class NetboxDevice(Entity, Generic[_InterfaceT]):
186
193
  primary_ip: Optional[DeviceIp]
187
194
  primary_ip4: Optional[DeviceIp]
188
195
  primary_ip6: Optional[DeviceIp]
189
- tags: List[Entity]
196
+ tags: List[EntityWithSlug]
190
197
  custom_fields: Dict[str, Any]
191
198
  created: datetime
192
199
  last_updated: datetime
200
+ cluster: Optional[Entity]
193
201
 
194
202
  fqdn: str
195
203
  hostname: str
@@ -161,6 +161,7 @@ class BaseNetboxStorage(
161
161
  return self._id_devices[obj_id]
162
162
 
163
163
  device = self.netbox.get_device(obj_id)
164
+ self._fill_device_interfaces([device])
164
165
  self._record_device(device)
165
166
  return device
166
167
 
annet/annet.py CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env python3
2
+ import logging
2
3
  import sys
3
4
 
4
5
  import annet
@@ -18,8 +19,14 @@ def main():
18
19
  parser.add_commands(parser.find_subcommands(cli.list_subcommands()))
19
20
  try:
20
21
  return parser.dispatch(pre_call=annet.init, add_help_command=True)
21
- except (generators.GeneratorError, annet.ExecError):
22
+ except (generators.GeneratorError, annet.ExecError) as e:
23
+ logging.error(e)
22
24
  return 1
25
+ except BaseException as e:
26
+ if formatted_output := getattr(e, "formatted_output", None):
27
+ logging.error(formatted_output)
28
+ return 1
29
+ raise e
23
30
 
24
31
 
25
32
  if __name__ == "__main__":
@@ -6,6 +6,7 @@
6
6
  "Cisco.ASR": " ASR",
7
7
  "Cisco.ASR.ASR9000": " 9\\d{3}",
8
8
  "Cisco.XRV": "XRv",
9
+ "Cisco.XR": " 8[\\d\\d\\d]",
9
10
  "Cisco.Catalyst": " (Catalyst |WS-C)",
10
11
  "Cisco.Catalyst.C2900": "29\\d\\d",
11
12
  "Cisco.Catalyst.C2900.C2950": "2950",
@@ -75,6 +75,8 @@ class HardwareView(HardwareLeaf):
75
75
  def hw_to_vendor(hw: HardwareView) -> Optional[str]:
76
76
  if hw.Nexus:
77
77
  return "nexus"
78
+ elif hw.Cisco.XR or hw.Cisco.ASR or hw.Cisco.XRV:
79
+ return "iosxr"
78
80
  elif hw.Cisco:
79
81
  return "cisco"
80
82
  elif hw.OptiXtrans:
@@ -108,6 +110,7 @@ def vendor_to_hw(vendor):
108
110
  "cisco": "Cisco",
109
111
  "catalyst": "Cisco Catalyst",
110
112
  "nexus": "Cisco Nexus",
113
+ "iosxr": "Cisco XR",
111
114
  "huawei": "Huawei",
112
115
  "optixtrans": "Huawei OptiXtrans",
113
116
  "juniper": "Juniper",
@@ -3,6 +3,7 @@ VENDOR_REVERSES = {
3
3
  "h3c": "undo",
4
4
  "optixtrans": "undo",
5
5
  "cisco": "no",
6
+ "iosxr": "no",
6
7
  "nexus": "no",
7
8
  "juniper": "delete",
8
9
  "arista": "no",
@@ -18,6 +19,7 @@ VENDOR_DIFF = {
18
19
  "huawei": "common.default_diff",
19
20
  "optixtrans": "common.default_diff",
20
21
  "cisco": "common.default_diff",
22
+ "iosxr": "common.default_diff",
21
23
  "nexus": "common.default_diff",
22
24
  "juniper": "juniper.default_diff",
23
25
  "arista": "common.default_diff",
@@ -33,6 +35,7 @@ VENDOR_DIFF_ORDERED = {
33
35
  "huawei": "common.ordered_diff",
34
36
  "optixtrans": "common.ordered_diff",
35
37
  "cisco": "common.ordered_diff",
38
+ "iosxr": "common.ordered_diff",
36
39
  "nexus": "common.ordered_diff",
37
40
  "juniper": "juniper.ordered_diff",
38
41
  "arista": "common.ordered_diff",
@@ -49,6 +52,7 @@ VENDOR_EXIT = {
49
52
  "h3c": "quit",
50
53
  "optixtrans": "quit",
51
54
  "cisco": "exit",
55
+ "iosxr": "exit",
52
56
  "nexus": "exit",
53
57
  "arista": "exit",
54
58
  "juniper": "",
@@ -297,7 +297,7 @@ def apply(hw, do_commit, do_finalize, **_):
297
297
  after.add_cmd(Command("abort")) # просто exit оставит висеть configure session
298
298
  if do_finalize:
299
299
  after.add_cmd(Command("write memory"))
300
- elif hw.ASR or hw.XRV:
300
+ elif hw.ASR or hw.XRV or hw.XR:
301
301
  # коммит сам сохраняет изменения в стартап do_finalize не применим
302
302
  before.add_cmd(Command("configure exclusive"))
303
303
  if do_commit:
@@ -197,7 +197,7 @@ def _run_partial_generator(gen: "PartialGenerator", run_args: GeneratorPartialRu
197
197
  raise
198
198
  except Exception as err:
199
199
  filename, lineno = gen.get_running_line()
200
- logger.exception("Generator error in file '%s:%i'", filename, lineno)
200
+ logger.error("Generator error in file '%s:%i'", filename, lineno)
201
201
  raise GeneratorError(f"{gen} on {device}") from err
202
202
 
203
203
  fmtr = tabparser.make_formatter(device.hw)
annet/parallel.py CHANGED
@@ -15,13 +15,14 @@ import tempfile
15
15
  import time
16
16
  import traceback
17
17
  import warnings
18
- from typing import Any, List, Optional, Type
18
+ from typing import Any, List, Optional, Type, Callable
19
19
  from uuid import uuid4
20
20
 
21
21
  from contextlog import get_logger
22
22
 
23
23
  import annet
24
24
  from annet import tracing
25
+ from annet.connectors import Connector
25
26
  from annet.lib import catch_ctrl_c, find_exc_in_stack
26
27
  from annet.output import capture_output
27
28
  from annet.tracing import tracing_connector
@@ -38,6 +39,20 @@ class PoolWorkerTask:
38
39
  payload: Optional[Any] = None
39
40
 
40
41
 
42
+ class _PickleSafeTracebackFormatterConnector(Connector[Callable[[BaseException], str]]):
43
+ name = "PickleSafeTraceBackFormatter"
44
+ ep_name = "pickle_safe_traceback_formatter"
45
+
46
+ def _get_default(self) -> Callable[[], Callable[[BaseException], str]]:
47
+ def wrapper():
48
+ return lambda x: "".join(traceback.format_exception(x))
49
+
50
+ return wrapper
51
+
52
+
53
+ pickle_safe_traceback_formatter_connector = _PickleSafeTracebackFormatterConnector()
54
+
55
+
41
56
  class PickleSafeException(Exception):
42
57
  """An exception that can be safely pickled and passed between processes."""
43
58
 
@@ -59,9 +74,14 @@ class PickleSafeException(Exception):
59
74
  pretty_lines.append(self.formatted_output)
60
75
  return "\n".join(pretty_lines)
61
76
 
62
- @staticmethod
63
- def from_exc(orig_exc: Exception, device_id: str, formatted_output: str) -> "PickleSafeException":
64
- return PickleSafeException(orig_exc.__class__, str(orig_exc), device_id, formatted_output)
77
+ @classmethod
78
+ def from_exc(cls, orig_exc: Exception, device_id: str) -> "PickleSafeException":
79
+ return PickleSafeException(
80
+ orig_exc.__class__,
81
+ str(orig_exc),
82
+ device_id,
83
+ pickle_safe_traceback_formatter_connector.get()(orig_exc)
84
+ )
65
85
 
66
86
 
67
87
  @catch_ctrl_c
@@ -164,7 +184,7 @@ def _pool_worker(pool, index, task_queue, done_queue):
164
184
  except KeyboardInterrupt: # pylint: disable=try-except-raise
165
185
  raise
166
186
  except Exception as exc:
167
- safe_exc = PickleSafeException.from_exc(exc, task.payload, traceback.format_exc())
187
+ safe_exc = PickleSafeException.from_exc(exc, task.payload)
168
188
  ret_exc = safe_exc
169
189
  task_result.exc = safe_exc
170
190
  task_result.result = None
@@ -301,11 +321,10 @@ class Parallel:
301
321
  **self.kwargs
302
322
  )
303
323
  except Exception as exc:
324
+ safe_exc = PickleSafeException.from_exc(exc, device_id)
304
325
  if not tolerate_fails:
305
- raise
306
- exc.device_id = device_id
307
- exc.formatted_output = traceback.format_exc()
308
- task_result.exc = exc
326
+ raise safe_exc
327
+ task_result.exc = safe_exc
309
328
  if self.capture_output:
310
329
  task_result.extra["cap_stdout"] = cap_stdout.read()
311
330
  task_result.extra["cap_stderr"] = cap_stderr.read()
@@ -29,13 +29,35 @@ interface * %logic=arista.iface.permanent
29
29
 
30
30
 
31
31
  ip access-list standard *
32
- * %logic=huawei.misc.undo_redo
32
+ * %logic=common.undo_redo
33
33
 
34
34
  ipv6 access-list standard *
35
- * %logic=huawei.misc.undo_redo
35
+ * %logic=common.undo_redo
36
36
 
37
37
  ipv6 access-list *
38
- * %logic=huawei.misc.undo_redo
38
+ * %logic=common.undo_redo
39
+
40
+
41
+ # ios-like way of configuring prefix lists
42
+ # should be kept above a eos-native one in arista.rul
43
+ # since beginnig of commands are the same
44
+ # if you use it keep all prefix lists in this format
45
+
46
+ ip prefix-list * seq * %logic=common.undo_redo
47
+ ipv6 prefix-list * seq * %logic=common.undo_redo
48
+
49
+
50
+ # arista eos native way of configuring prefix lists
51
+ # should be below to not collide with ios-like one
52
+ # only one format is supported at the time for one family
53
+ # prefer this one over the ios-like one
54
+
55
+ ip prefix-list *
56
+ seq * %logic=common.undo_redo
57
+
58
+ ipv6 prefix-list *
59
+ seq * %logic=common.undo_redo
60
+
39
61
 
40
62
  route-map * * *
41
63
  ~ %global
@@ -0,0 +1,27 @@
1
+ # Рулбук деплоя на устройства
2
+ #
3
+ # Операторы:
4
+ # * Один аргумент
5
+ # ~ Несколько аргументов (минимум один)
6
+ #
7
+ # Параметры:
8
+ # %timeout=... Таймаут выполнения команды (в секундах, по умолчанию 30)
9
+ #
10
+ # Ответы на вопросы
11
+ #
12
+ # <команда>
13
+ # dialog: <вопрос> ::: <ответ> <параметры>
14
+ #
15
+ # Если <вопрос> заключён в слеши (//), то воспринимается как регулярка, иначе - точное совпадение.
16
+ # Параметы:
17
+ # %send_nl=... Посылать ли перевод строки после ответа (bool, по умолчанию true)
18
+ # -----
19
+
20
+ crypto key generate rsa %timeout=60
21
+ dialog: Do you really want to replace them? [yes/no]: ::: no
22
+ dialog: How many bits in the modulus [512]: ::: 2048
23
+ no username * privilege * secret * *
24
+ dialog: This operation will remove all username related configurations with same name.Do you want to continue? [confirm] ::: Y %send_nl=0
25
+
26
+ copy running-config startup-config
27
+ dialog: Destination filename [startup-config]? ::: startup-config
@@ -0,0 +1,85 @@
1
+ # В этом файле определяется порядок команд, в котором их следует подавать на устройство.
2
+ # - Если порядок команды не важен - ее можно не писать сюда совсем.
3
+ # - Если команда начинается с undo и прописан параметр %order_reverse - команда считается
4
+ # обратной, но занимает место между прямыми там, где указано.
5
+
6
+ banner login %order_reverse
7
+
8
+ # Фичи должны быть включены прежде всего
9
+ feature
10
+ # За ним сервисы
11
+ service
12
+
13
+ aaa new-model
14
+ aaa ~
15
+
16
+ no password strength-check
17
+ username
18
+ tacacs-server
19
+
20
+ radius
21
+ radius-server
22
+ dot1x
23
+
24
+ privilege
25
+ file
26
+
27
+ ip access-list
28
+ ipv6 access-list
29
+ class-map
30
+ policy-map
31
+ system qos
32
+ control-plane
33
+
34
+ snmp-server source-interface
35
+ snmp-server user
36
+ snmp-server host
37
+ snmp-server enable
38
+ snmp-server context
39
+ snmp-server community
40
+ snmp-server mib
41
+
42
+ ntp distribute
43
+ ntp server
44
+ ntp commit
45
+
46
+ vlan
47
+ vlan group
48
+
49
+ spanning-tree
50
+
51
+ # перед тем, как менять mtu на интерфейсах, надо выставить максимальный
52
+ no system jumbomtu %order_reverse
53
+ system jumbomtu
54
+
55
+ service dhcp
56
+ ip dhcp relay
57
+ ipv6 dhcp relay
58
+
59
+ vrf context
60
+
61
+ interface */Vlan\d+/
62
+ interface *
63
+ no switchport
64
+ encapsulation
65
+ vrf member
66
+ ip
67
+ ipv6
68
+ no ipv6 nd %order_reverse
69
+ ipv6 nd
70
+ ~
71
+ channel-group
72
+
73
+ interface */\S+\.\d+/
74
+
75
+ route-map
76
+
77
+ # удалять eth-trunk можно только после того, как вычистим member interfaces
78
+ undo interface */port-channel\d+/ %order_reverse
79
+
80
+ # remote as of neighbors should be assigned before peer-group, the rule is applied to neighbors, not peer-groups
81
+ router bgp
82
+ neighbor */[\da-f\.\:]+/ remote-as
83
+ neighbor */[\da-f\.\:]+/ peer-group
84
+
85
+ line
@@ -0,0 +1,110 @@
1
+ # Операторы:
2
+ # * Один аргумент в undo
3
+ # ~ Несколько аргументов (минимум один) в undo
4
+ #
5
+ # Параметры:
6
+ # %global Команда действует на любом уровне ниже
7
+ # %logic=... Кастомная функция обработки правила
8
+ # %diff_logic=... Кастомная функция построения диффа.
9
+ # данная функция работает для подблоков (в отличие от %logic)
10
+ # %comment=... Добавить коммент после строки который будет видно с опцией patch --add-comments
11
+ # Сделано в основном для того чтобы генерировать специальные команды для наливки
12
+ # -----
13
+
14
+ ip domain-name *
15
+ hostname *
16
+
17
+ banner login * %logic=cisco.misc.banner_login
18
+
19
+ ip community-list standard ~
20
+
21
+ !vrf context management
22
+ vrf context *
23
+
24
+ vlan group * vlan-list %logic=cisco.vlandb.simple
25
+ vlan */[^\d].*/
26
+ vlan %logic=cisco.vlandb.simple
27
+ name
28
+
29
+ ip ssh version 2 %logic=cisco.misc.ssh_key
30
+
31
+ # ordering of SNMP blocks
32
+ ip access-list ~
33
+ snmp-server view ~
34
+ snmp-server community ~
35
+ snmp-server host ~
36
+ # Deleting a user using either SNMP or the CLI results in the user being deleted for both SNMP and the CLI.
37
+ # User-role mapping changes are synchronized in SNMP and the CLI.
38
+ !snmp-server user admin ~
39
+ !snmp-server user *
40
+ # Disabling this SNMP option throws WARNING which stops mpdaemon set-up process
41
+ no snmp-server sysobjectid type stack-oid
42
+
43
+ !interface */(mgmt|ipmi|Vlan1$)/
44
+
45
+ interface Loopback
46
+ ipv6 address *
47
+ ip address ~
48
+ ! no ip address
49
+
50
+ # SVI/Subifs/Lagg
51
+ interface */(Vlan|Ethernet.*\.|port-channel.*\.?)\d+$/ %diff_logic=cisco.iface.diff
52
+ vrf member
53
+ ipv6 link-local
54
+ ipv6 address *
55
+ ipv6 nd ~ %logic=cisco.misc.no_ipv6_nd_suppress_ra
56
+ ip address ~
57
+ ! no ip address
58
+ mtu
59
+
60
+ # Physical
61
+ interface */\w*Ethernet[0-9\/]+$/ %logic=common.permanent %diff_logic=cisco.iface.diff
62
+ switchport mode
63
+ switchport trunk native vlan
64
+ switchport access vlan
65
+ switchport trunk allowed vlan %logic=cisco.vlandb.swtrunk
66
+ vrf member
67
+ ipv6 link-local
68
+ ipv6 address *
69
+ ip address ~
70
+ ! no ip address
71
+ channel-group
72
+ mtu
73
+ storm-control * level
74
+ spanning-tree portfast
75
+
76
+ router bgp
77
+ router-id
78
+ vrf *
79
+ router-id
80
+ address-family ~
81
+ maximum-paths
82
+ neighbor ~
83
+ update-source
84
+
85
+ policy-map type qos *
86
+ class * %ordered
87
+ ~
88
+
89
+ prefix-set *
90
+ ~ %rewrite %global
91
+
92
+ as-path-set *
93
+ ~ %rewrite %global
94
+
95
+ community-set *
96
+ ~ %rewrite %global
97
+
98
+ route-policy *
99
+ ~ %rewrite %global
100
+
101
+ line ~
102
+ exec-timeout
103
+ transport input
104
+
105
+ description %global
106
+
107
+ no ~ %global
108
+ ~ %global
109
+
110
+ # vim: set syntax=annrulebook:
annet/tabparser.py CHANGED
@@ -23,7 +23,7 @@ def make_formatter(hw, **kwargs):
23
23
  cls = OptixtransFormatter
24
24
  elif hw.Huawei:
25
25
  cls = HuaweiFormatter
26
- elif hw.Cisco.ASR or hw.Cisco.XRV:
26
+ elif hw.Cisco.ASR or hw.Cisco.XRV or hw.Cisco.XR:
27
27
  cls = AsrFormatter
28
28
  elif hw.Nexus:
29
29
  cls = NexusFormatter
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: annet
3
- Version: 2.5.3
3
+ Version: 2.6.0
4
4
  Summary: annet
5
5
  Home-page: https://github.com/annetutil/annet
6
6
  License: MIT
@@ -21,7 +21,7 @@ Requires-Dist: yarl>=1.8.2
21
21
  Requires-Dist: adaptix==3.0.0b7
22
22
  Requires-Dist: dataclass-rest==0.4
23
23
  Provides-Extra: netbox
24
- Requires-Dist: annetbox[sync]>=0.2.2; extra == "netbox"
24
+ Requires-Dist: annetbox[sync]>=0.3.0; extra == "netbox"
25
25
  Dynamic: home-page
26
26
  Dynamic: license
27
27
  Dynamic: license-file
@@ -1,5 +1,5 @@
1
1
  annet/__init__.py,sha256=0OKkFkqog8As7B6ApdpKQkrEAcEELUREWp82D8WvGA8,1846
2
- annet/annet.py,sha256=8Hc-n0S6d-YhcMpMiMET_SsYKfHFJeCA_E2gKgzK-2Y,790
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
5
5
  annet/cli.py,sha256=shq3hHzrTxFL3x1_zTOR43QHo0JYs8QSwyOvGtL86Co,12733
@@ -15,11 +15,11 @@ annet/hardware.py,sha256=_iR28dWiPtt6ZYdk-qg1sxazkSRJE3ukqKB-fFFfQak,1141
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
18
- annet/parallel.py,sha256=hLkzEht0KhzmzUWDdO4QFYQHzhxs3wPlTA8DxbB2ziw,17160
18
+ 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=rRzfZSurR5P1eSdVWXMjABvV4PX83NRRQY0CzwabExw,1242
22
+ annet/tabparser.py,sha256=oN0pFeO1GEgMD-ti9rHl5SvaYZPZbrYx_BIVedIC5JQ,1257
23
23
  annet/text_term_format.py,sha256=y0U6VuFEAEil8Ab3HB8DBbVHisu31EHiRV7AOVruCeA,2816
24
24
  annet/tracing.py,sha256=ndpM-au1c88uBBpOuH_z52qWZL773edYozNyys_wA68,4044
25
25
  annet/types.py,sha256=f2HwqoKa6AucwFwDMszoouB6m1B8n6VmdjHMktO30Kc,7175
@@ -34,11 +34,11 @@ annet/adapters/netbox/provider.py,sha256=SrxW_uBLvMTqtRiYXreL6RrZK4MpxVguF2ITnYO
34
34
  annet/adapters/netbox/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  annet/adapters/netbox/common/adapter.py,sha256=-YcO3371D8hupNXKf5f4-FdFSjTto-7VKDvz29Gid38,2016
36
36
  annet/adapters/netbox/common/client.py,sha256=PaxHG4W9H8_uunIwMBNYkLq4eQJYoO6p6gY-ciQs7Nc,2563
37
- annet/adapters/netbox/common/manufacturer.py,sha256=Y9kqU13q6fwYu0_HiotUKAy7OHFZngkC2s3s4IDAbDg,1745
38
- annet/adapters/netbox/common/models.py,sha256=fMqhXTXNgZwAhClZ3XBQN6cesYy3miEXzuF-0v93u3c,7427
37
+ annet/adapters/netbox/common/manufacturer.py,sha256=A3g9RrCpzYQQbdZ3OGYBalDn-OI7LlBnkXvMM757ftI,1770
38
+ annet/adapters/netbox/common/models.py,sha256=b-xAQb1vtCLqafMl4npwNEznPT_QghlOWe3Yc7JkQ5c,7620
39
39
  annet/adapters/netbox/common/query.py,sha256=kbNQSZwkjFeDArHwA8INHUauxCxYElXtNh58pZipWdo,1867
40
40
  annet/adapters/netbox/common/status_client.py,sha256=POaqiQJ0jPcqUQH-X_fWHVnKB7TBYveNriaT0eNTlfI,769
41
- annet/adapters/netbox/common/storage_base.py,sha256=T8mgEH4X87pHM4qet-3kl9UAAhXtZdPrcYK276CzTY0,8721
41
+ annet/adapters/netbox/common/storage_base.py,sha256=3dn42CWTEZVBig4ABhy5BMQQ3YGb28InncWZoGvrgKk,8768
42
42
  annet/adapters/netbox/common/storage_opts.py,sha256=wfv1spElomwgVYMCgGth3SWVF0RsRgtUgq9GpFL9hJs,1520
43
43
  annet/adapters/netbox/v24/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  annet/adapters/netbox/v24/models.py,sha256=TAZUYXf1TlOrzgitWZaaLvW0tB143RgnFb1wA2X9lc8,7549
@@ -66,22 +66,22 @@ annet/annlib/types.py,sha256=VHU0CBADfYmO0xzB_c5f-mcuU3dUumuJczQnqGlib9M,852
66
66
  annet/annlib/netdev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
67
  annet/annlib/netdev/db.py,sha256=fI_u5aya4l61mbYSjj4JwlVfi3s7obt2jqERSuXGRUI,1634
68
68
  annet/annlib/netdev/devdb/__init__.py,sha256=aKYjjLbJebdKBjnGDpVLQdSqrV2JL24spGm58tmMWVU,892
69
- annet/annlib/netdev/devdb/data/devdb.json,sha256=4RTRg9PbRiUfi-kVIalim7Rtdkdu_48MGGtrZ6XmXmg,6677
69
+ annet/annlib/netdev/devdb/data/devdb.json,sha256=t-j7SjEqSWNPhYV3cPQCSpODc3VGcRKJze9fgj4L9Uw,6710
70
70
  annet/annlib/netdev/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
71
  annet/annlib/netdev/views/dump.py,sha256=rIlyvnA3uM8bB_7oq1nS2KDxTp6dQh2hz-FbNhYIpOU,4630
72
- annet/annlib/netdev/views/hardware.py,sha256=R22iXYjGkfLaBbDMEMpcEfqgwLsB1u5VJwF8tyPtJb0,4286
72
+ annet/annlib/netdev/views/hardware.py,sha256=jybt3BjEKbhSIU6A4MvA2X2-i3BqWcllvMAX_EKLGMU,4396
73
73
  annet/annlib/rbparser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
74
  annet/annlib/rbparser/acl.py,sha256=RR8yPt6t96_IiyuKVbeZ-3x32cyhBAT2wC1y99oWBO8,3931
75
75
  annet/annlib/rbparser/deploying.py,sha256=ACT8QNhDAhJx3ZKuGh2nYBOrpdka2qEKuLDxvQAGKLk,1649
76
76
  annet/annlib/rbparser/ordering.py,sha256=SmN_22pIJSIkmyT1-HSjWsqid7UJ0DgkqyQu7IO3bS4,2142
77
- annet/annlib/rbparser/platform.py,sha256=65-r9mboRA3gaz9DRkSwPCdCRQneItqxppdMB6zf7pI,1560
77
+ annet/annlib/rbparser/platform.py,sha256=vNoK25ACNQuDRv5I9uDfmNi8Y8yi10XWSbWIeKEVUgs,1672
78
78
  annet/annlib/rbparser/syntax.py,sha256=iZ7Y-4QQBw4L3UtjEh54qisiRDhobl7HZxFNdP8mi54,3577
79
79
  annet/annlib/rulebook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
- annet/annlib/rulebook/common.py,sha256=hqwmmNofm5q2f-hV2usMY-IPMeiANLth28tZcRBYJTw,16640
80
+ annet/annlib/rulebook/common.py,sha256=-E6ATuFkSjNhyK0hiGd-iap5Ch5up2MNuVCbobWfmeU,16649
81
81
  annet/api/__init__.py,sha256=DU88rY4sQLUoBE9g0WxgqF6GdL7CIUAak01Ejuf63qc,33098
82
82
  annet/configs/context.yml,sha256=RVLrKLIHpCty7AGwOnmqf7Uu0iZQCn-AjYhophDJer8,259
83
83
  annet/configs/logging.yaml,sha256=EUagfir99QqA73Scc3k7sfQccbU3E1SvEQdyhLFtCl4,997
84
- annet/generators/__init__.py,sha256=rVHHDTPKHPZsml1eNEAj3o-8RweFTN8J7LX3tKMXdIY,16402
84
+ annet/generators/__init__.py,sha256=9MmstB59DlHGnY7GP36nyTiAdKtHdsJTyOYc0cxwm5U,16398
85
85
  annet/generators/base.py,sha256=rgQLcQBPZm4ecbKmRhVOpBR-GFJAiVfdb_y5f2-LUR8,3670
86
86
  annet/generators/entire.py,sha256=Oe7d0VuIn2sLcOKuRVQW9uR8Vuirg0edekFMSZCMnI4,2786
87
87
  annet/generators/exceptions.py,sha256=GPXTBgn2xZ3Ev_bdOPlfCLGRC1kQHe_dEq88S-uyi5s,151
@@ -148,7 +148,7 @@ annet/rulebook/routeros/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
148
148
  annet/rulebook/routeros/file.py,sha256=zK7RwBk1YaVoDSFSg1u7Pt8u0Fk3nhhu27aJRngemwc,137
149
149
  annet/rulebook/texts/arista.deploy,sha256=OS9eFyJpEPztcOHkBwajw_RTJfTT7ivaMHfx4_HXaUg,792
150
150
  annet/rulebook/texts/arista.order,sha256=1jbKfF0USYi2b8V5qFlp4LjBAr3QGL9OkmoQqEK3PW8,1385
151
- annet/rulebook/texts/arista.rul,sha256=fGZe1L-x75rKQuRC5oLJMv1gSt1tJ0htOXfKt-tho64,853
151
+ annet/rulebook/texts/arista.rul,sha256=S48RSfJAGwMyS7psl5ABZTzr1HZsvbrkLXRG3FyE13w,1537
152
152
  annet/rulebook/texts/aruba.deploy,sha256=hI432Bq-of_LMXuUflCu7eNSEFpx6qmj0KItEw6sgHI,841
153
153
  annet/rulebook/texts/aruba.order,sha256=ZMakkn0EJ9zomgY6VssoptJImrHrUmYnCqivzLBFTRo,1158
154
154
  annet/rulebook/texts/aruba.rul,sha256=zvGVpoYyJvMoL0fb1NQ8we_GCLZXno8nwWpZIOScLQQ,2584
@@ -161,6 +161,9 @@ annet/rulebook/texts/cisco.rul,sha256=jgL5_xnSwd_H4E8cx4gcneSvJC5W1zz6_BWSb64iux
161
161
  annet/rulebook/texts/huawei.deploy,sha256=uUsZCHUrC5Zyb_MePrR5svnE1QyGQlg7UxcKf00sJyg,10451
162
162
  annet/rulebook/texts/huawei.order,sha256=_X2LmxD9FGcIcb8ziwc13Imy1tBtQJgafrQGmvHPZLM,10649
163
163
  annet/rulebook/texts/huawei.rul,sha256=02Fi1RG4YYea2clHCluBuJDKNbT0hS9jtsk6_h6GK8k,12958
164
+ annet/rulebook/texts/iosxr.deploy,sha256=Hu0NkcGv3f1CWUrnbzI3eQOPXJxtH4NNOPRV68IrW4U,1226
165
+ annet/rulebook/texts/iosxr.order,sha256=OvNHMNqkCc-DN2dEjLCTKv_7ZhiaHt4q2X4Y4Z8dvR4,1901
166
+ annet/rulebook/texts/iosxr.rul,sha256=MhIoIbOrfqisbyprZLy86DvO4rl6LtPESFnDU9nQUY0,2974
164
167
  annet/rulebook/texts/juniper.order,sha256=PpxmcCgeaeP3TyYe3BWvtb24MKYV_BujjCH3HD4lsc8,256
165
168
  annet/rulebook/texts/juniper.rul,sha256=EmtrEJZesnmc2nXjURRD2G0WOq4zLluI_PNupKhSOJs,2654
166
169
  annet/rulebook/texts/nexus.deploy,sha256=9YNAQEw7aQxtYZJbE-dMD6qJrTzs_G92Ifrx3Ft4Wn4,1120
@@ -177,8 +180,8 @@ annet/rulebook/texts/ribbon.deploy,sha256=hCq2XeAcwaYanyQ8lTdnez6Pgq-gRqpNuR8dAl
177
180
  annet/rulebook/texts/ribbon.rul,sha256=609LyLTDCtXPVQNAzqS-VEyCpW3byHP8TCMJLFMn5cc,2108
178
181
  annet/rulebook/texts/routeros.order,sha256=M71uy_hf0KAjLNS3zZY3uih4m2xLUcu26FEoVVjC6k0,905
179
182
  annet/rulebook/texts/routeros.rul,sha256=ipfxjj0mjFef6IsUlupqx4BY_Je_OUb8u_U1019O1DE,1203
180
- annet-2.5.3.dist-info/licenses/AUTHORS,sha256=rh3w5P6gEgqmuC-bw-HB68vBCr-yIBFhVL0PG4hguLs,878
181
- annet-2.5.3.dist-info/licenses/LICENSE,sha256=yPxl7dno02Pw7gAcFPIFONzx_gapwDoPXsIsh6Y7lC0,1079
183
+ annet-2.6.0.dist-info/licenses/AUTHORS,sha256=rh3w5P6gEgqmuC-bw-HB68vBCr-yIBFhVL0PG4hguLs,878
184
+ annet-2.6.0.dist-info/licenses/LICENSE,sha256=yPxl7dno02Pw7gAcFPIFONzx_gapwDoPXsIsh6Y7lC0,1079
182
185
  annet_generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
183
186
  annet_generators/example/__init__.py,sha256=1z030I00c9KeqW0ntkT1IRLYKD5LZAHYjiNHrOLen1Q,221
184
187
  annet_generators/example/lldp.py,sha256=24bGvShxbio-JxUdaehyPRu31LhH9YwSwFDrWVRn6yo,2100
@@ -186,12 +189,12 @@ annet_generators/mesh_example/__init__.py,sha256=NfNWgXn1TNiWI6A5tmU6Y-4QV2i33td
186
189
  annet_generators/mesh_example/bgp.py,sha256=jzyDndSSGYyYBquDnLlR-7P5lzmUKcSyYCml3VsoMC0,1385
187
190
  annet_generators/mesh_example/mesh_logic.py,sha256=DJS5JMCTs0rs0LN__0LulNgo2ekUcWiOMe02BlOeFas,1454
188
191
  annet_generators/rpl_example/__init__.py,sha256=A7DTn-SVSlUpeO7mKT_obqimp29p9zWfVRPBSxmENQY,209
189
- annet_generators/rpl_example/generator.py,sha256=zndIGfV4ZlTxPgAGYs7bMQvTc_tYScODqJz3fuyermY,3871
192
+ annet_generators/rpl_example/generator.py,sha256=EWah19gOH8G-QyNyWqxCqdRi0BK7GbM-l7g6GIg2xDI,3967
190
193
  annet_generators/rpl_example/items.py,sha256=d99HSXDHFjZq511EvGhIqRTWK3F4ZsCWfdUqFYQcyhE,772
191
194
  annet_generators/rpl_example/mesh.py,sha256=z_WgfDZZ4xnyh3cSf75igyH09hGvtexEVwy1gCD_DzA,288
192
195
  annet_generators/rpl_example/route_policy.py,sha256=z6nPb0VDeQtKD1NIg9sFvmUxBD5tVs2frfNIuKdM-5c,2318
193
- annet-2.5.3.dist-info/METADATA,sha256=BdGFeD779806YbIpVm9lyPy5egBoglx5bQjBlZnkH-o,815
194
- annet-2.5.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
195
- annet-2.5.3.dist-info/entry_points.txt,sha256=5lIaDGlGi3l6QQ2ry2jZaqViP5Lvt8AmsegdD0Uznck,192
196
- annet-2.5.3.dist-info/top_level.txt,sha256=QsoTZBsUtwp_FEcmRwuN8QITBmLOZFqjssRfKilGbP8,23
197
- annet-2.5.3.dist-info/RECORD,,
196
+ annet-2.6.0.dist-info/METADATA,sha256=5dAbgYBs9h-co3Rqk177VqRH5wNcEOEh15ZNaaTBS7w,815
197
+ annet-2.6.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
198
+ annet-2.6.0.dist-info/entry_points.txt,sha256=5lIaDGlGi3l6QQ2ry2jZaqViP5Lvt8AmsegdD0Uznck,192
199
+ annet-2.6.0.dist-info/top_level.txt,sha256=QsoTZBsUtwp_FEcmRwuN8QITBmLOZFqjssRfKilGbP8,23
200
+ annet-2.6.0.dist-info/RECORD,,
@@ -30,6 +30,9 @@ class CommunityGenerator(CommunityListGenerator):
30
30
 
31
31
 
32
32
  class PolicyGenerator(RoutingPolicyGenerator):
33
+ def get_prefix_lists(self, device: Any) -> list[IpPrefixList]:
34
+ return PREFIX_LISTS
35
+
33
36
  def get_policies(self, device: Any) -> list[RoutingPolicy]:
34
37
  return get_policies(
35
38
  routemap=routemap,
File without changes