annet 1.0.0__tar.gz → 1.0.2__tar.gz

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.

Files changed (193) hide show
  1. {annet-1.0.0/annet.egg-info → annet-1.0.2}/PKG-INFO +2 -2
  2. {annet-1.0.0 → annet-1.0.2}/annet/adapters/netbox/common/manufacturer.py +1 -1
  3. {annet-1.0.0 → annet-1.0.2}/annet/adapters/netbox/common/models.py +2 -1
  4. {annet-1.0.0 → annet-1.0.2}/annet/adapters/netbox/common/query.py +2 -1
  5. {annet-1.0.0 → annet-1.0.2}/annet/adapters/netbox/v37/storage.py +2 -0
  6. {annet-1.0.0 → annet-1.0.2}/annet/annlib/netdev/devdb/data/devdb.json +3 -1
  7. {annet-1.0.0 → annet-1.0.2}/annet/bgp_models.py +5 -2
  8. {annet-1.0.0 → annet-1.0.2}/annet/gen.py +1 -1
  9. {annet-1.0.0 → annet-1.0.2}/annet/rpl_generators/prefix_lists.py +14 -15
  10. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/arista.order +1 -0
  11. {annet-1.0.0 → annet-1.0.2/annet.egg-info}/PKG-INFO +2 -2
  12. {annet-1.0.0 → annet-1.0.2}/annet.egg-info/requires.txt +1 -1
  13. {annet-1.0.0 → annet-1.0.2}/setup.py +1 -1
  14. {annet-1.0.0 → annet-1.0.2}/AUTHORS +0 -0
  15. {annet-1.0.0 → annet-1.0.2}/LICENSE +0 -0
  16. {annet-1.0.0 → annet-1.0.2}/MANIFEST.in +0 -0
  17. {annet-1.0.0 → annet-1.0.2}/README.md +0 -0
  18. {annet-1.0.0 → annet-1.0.2}/annet/__init__.py +0 -0
  19. {annet-1.0.0 → annet-1.0.2}/annet/adapters/__init__.py +0 -0
  20. {annet-1.0.0 → annet-1.0.2}/annet/adapters/fetchers/__init__.py +0 -0
  21. {annet-1.0.0 → annet-1.0.2}/annet/adapters/fetchers/stub/__init__.py +0 -0
  22. {annet-1.0.0 → annet-1.0.2}/annet/adapters/fetchers/stub/fetcher.py +0 -0
  23. {annet-1.0.0 → annet-1.0.2}/annet/adapters/file/__init__.py +0 -0
  24. {annet-1.0.0 → annet-1.0.2}/annet/adapters/file/provider.py +0 -0
  25. {annet-1.0.0 → annet-1.0.2}/annet/adapters/netbox/__init__.py +0 -0
  26. {annet-1.0.0 → annet-1.0.2}/annet/adapters/netbox/common/__init__.py +0 -0
  27. {annet-1.0.0 → annet-1.0.2}/annet/adapters/netbox/common/client.py +0 -0
  28. {annet-1.0.0 → annet-1.0.2}/annet/adapters/netbox/common/status_client.py +0 -0
  29. {annet-1.0.0 → annet-1.0.2}/annet/adapters/netbox/common/storage_opts.py +0 -0
  30. {annet-1.0.0 → annet-1.0.2}/annet/adapters/netbox/provider.py +0 -0
  31. {annet-1.0.0 → annet-1.0.2}/annet/adapters/netbox/v24/__init__.py +0 -0
  32. {annet-1.0.0 → annet-1.0.2}/annet/adapters/netbox/v24/storage.py +0 -0
  33. {annet-1.0.0 → annet-1.0.2}/annet/adapters/netbox/v37/__init__.py +0 -0
  34. {annet-1.0.0 → annet-1.0.2}/annet/annet.py +0 -0
  35. {annet-1.0.0 → annet-1.0.2}/annet/annlib/__init__.py +0 -0
  36. {annet-1.0.0 → annet-1.0.2}/annet/annlib/command.py +0 -0
  37. {annet-1.0.0 → annet-1.0.2}/annet/annlib/diff.py +0 -0
  38. {annet-1.0.0 → annet-1.0.2}/annet/annlib/errors.py +0 -0
  39. {annet-1.0.0 → annet-1.0.2}/annet/annlib/filter_acl.py +0 -0
  40. {annet-1.0.0 → annet-1.0.2}/annet/annlib/jsontools.py +0 -0
  41. {annet-1.0.0 → annet-1.0.2}/annet/annlib/lib.py +0 -0
  42. {annet-1.0.0 → annet-1.0.2}/annet/annlib/netdev/__init__.py +0 -0
  43. {annet-1.0.0 → annet-1.0.2}/annet/annlib/netdev/db.py +0 -0
  44. {annet-1.0.0 → annet-1.0.2}/annet/annlib/netdev/devdb/__init__.py +0 -0
  45. {annet-1.0.0 → annet-1.0.2}/annet/annlib/netdev/views/__init__.py +0 -0
  46. {annet-1.0.0 → annet-1.0.2}/annet/annlib/netdev/views/dump.py +0 -0
  47. {annet-1.0.0 → annet-1.0.2}/annet/annlib/netdev/views/hardware.py +0 -0
  48. {annet-1.0.0 → annet-1.0.2}/annet/annlib/output.py +0 -0
  49. {annet-1.0.0 → annet-1.0.2}/annet/annlib/patching.py +0 -0
  50. {annet-1.0.0 → annet-1.0.2}/annet/annlib/rbparser/__init__.py +0 -0
  51. {annet-1.0.0 → annet-1.0.2}/annet/annlib/rbparser/acl.py +0 -0
  52. {annet-1.0.0 → annet-1.0.2}/annet/annlib/rbparser/deploying.py +0 -0
  53. {annet-1.0.0 → annet-1.0.2}/annet/annlib/rbparser/ordering.py +0 -0
  54. {annet-1.0.0 → annet-1.0.2}/annet/annlib/rbparser/platform.py +0 -0
  55. {annet-1.0.0 → annet-1.0.2}/annet/annlib/rbparser/syntax.py +0 -0
  56. {annet-1.0.0 → annet-1.0.2}/annet/annlib/rulebook/__init__.py +0 -0
  57. {annet-1.0.0 → annet-1.0.2}/annet/annlib/rulebook/common.py +0 -0
  58. {annet-1.0.0 → annet-1.0.2}/annet/annlib/tabparser.py +0 -0
  59. {annet-1.0.0 → annet-1.0.2}/annet/annlib/types.py +0 -0
  60. {annet-1.0.0 → annet-1.0.2}/annet/api/__init__.py +0 -0
  61. {annet-1.0.0 → annet-1.0.2}/annet/argparse.py +0 -0
  62. {annet-1.0.0 → annet-1.0.2}/annet/cli.py +0 -0
  63. {annet-1.0.0 → annet-1.0.2}/annet/cli_args.py +0 -0
  64. {annet-1.0.0 → annet-1.0.2}/annet/configs/context.yml +0 -0
  65. {annet-1.0.0 → annet-1.0.2}/annet/configs/logging.yaml +0 -0
  66. {annet-1.0.0 → annet-1.0.2}/annet/connectors.py +0 -0
  67. {annet-1.0.0 → annet-1.0.2}/annet/deploy.py +0 -0
  68. {annet-1.0.0 → annet-1.0.2}/annet/deploy_ui.py +0 -0
  69. {annet-1.0.0 → annet-1.0.2}/annet/diff.py +0 -0
  70. {annet-1.0.0 → annet-1.0.2}/annet/executor.py +0 -0
  71. {annet-1.0.0 → annet-1.0.2}/annet/filtering.py +0 -0
  72. {annet-1.0.0 → annet-1.0.2}/annet/generators/__init__.py +0 -0
  73. {annet-1.0.0 → annet-1.0.2}/annet/generators/base.py +0 -0
  74. {annet-1.0.0 → annet-1.0.2}/annet/generators/common/__init__.py +0 -0
  75. {annet-1.0.0 → annet-1.0.2}/annet/generators/common/initial.py +0 -0
  76. {annet-1.0.0 → annet-1.0.2}/annet/generators/entire.py +0 -0
  77. {annet-1.0.0 → annet-1.0.2}/annet/generators/exceptions.py +0 -0
  78. {annet-1.0.0 → annet-1.0.2}/annet/generators/jsonfragment.py +0 -0
  79. {annet-1.0.0 → annet-1.0.2}/annet/generators/partial.py +0 -0
  80. {annet-1.0.0 → annet-1.0.2}/annet/generators/perf.py +0 -0
  81. {annet-1.0.0 → annet-1.0.2}/annet/generators/ref.py +0 -0
  82. {annet-1.0.0 → annet-1.0.2}/annet/generators/result.py +0 -0
  83. {annet-1.0.0 → annet-1.0.2}/annet/hardware.py +0 -0
  84. {annet-1.0.0 → annet-1.0.2}/annet/implicit.py +0 -0
  85. {annet-1.0.0 → annet-1.0.2}/annet/lib.py +0 -0
  86. {annet-1.0.0 → annet-1.0.2}/annet/mesh/__init__.py +0 -0
  87. {annet-1.0.0 → annet-1.0.2}/annet/mesh/basemodel.py +0 -0
  88. {annet-1.0.0 → annet-1.0.2}/annet/mesh/device_models.py +0 -0
  89. {annet-1.0.0 → annet-1.0.2}/annet/mesh/executor.py +0 -0
  90. {annet-1.0.0 → annet-1.0.2}/annet/mesh/match_args.py +0 -0
  91. {annet-1.0.0 → annet-1.0.2}/annet/mesh/models_converter.py +0 -0
  92. {annet-1.0.0 → annet-1.0.2}/annet/mesh/peer_models.py +0 -0
  93. {annet-1.0.0 → annet-1.0.2}/annet/mesh/port_processor.py +0 -0
  94. {annet-1.0.0 → annet-1.0.2}/annet/mesh/registry.py +0 -0
  95. {annet-1.0.0 → annet-1.0.2}/annet/output.py +0 -0
  96. {annet-1.0.0 → annet-1.0.2}/annet/parallel.py +0 -0
  97. {annet-1.0.0 → annet-1.0.2}/annet/patching.py +0 -0
  98. {annet-1.0.0 → annet-1.0.2}/annet/reference.py +0 -0
  99. {annet-1.0.0 → annet-1.0.2}/annet/rpl/__init__.py +0 -0
  100. {annet-1.0.0 → annet-1.0.2}/annet/rpl/action.py +0 -0
  101. {annet-1.0.0 → annet-1.0.2}/annet/rpl/condition.py +0 -0
  102. {annet-1.0.0 → annet-1.0.2}/annet/rpl/match_builder.py +0 -0
  103. {annet-1.0.0 → annet-1.0.2}/annet/rpl/policy.py +0 -0
  104. {annet-1.0.0 → annet-1.0.2}/annet/rpl/result.py +0 -0
  105. {annet-1.0.0 → annet-1.0.2}/annet/rpl/routemap.py +0 -0
  106. {annet-1.0.0 → annet-1.0.2}/annet/rpl/statement_builder.py +0 -0
  107. {annet-1.0.0 → annet-1.0.2}/annet/rpl_generators/__init__.py +0 -0
  108. {annet-1.0.0 → annet-1.0.2}/annet/rpl_generators/aspath.py +0 -0
  109. {annet-1.0.0 → annet-1.0.2}/annet/rpl_generators/community.py +0 -0
  110. {annet-1.0.0 → annet-1.0.2}/annet/rpl_generators/cumulus_frr.py +0 -0
  111. {annet-1.0.0 → annet-1.0.2}/annet/rpl_generators/entities.py +0 -0
  112. {annet-1.0.0 → annet-1.0.2}/annet/rpl_generators/execute.py +0 -0
  113. {annet-1.0.0 → annet-1.0.2}/annet/rpl_generators/policy.py +0 -0
  114. {annet-1.0.0 → annet-1.0.2}/annet/rpl_generators/rd.py +0 -0
  115. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/__init__.py +0 -0
  116. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/arista/__init__.py +0 -0
  117. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/arista/iface.py +0 -0
  118. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/aruba/__init__.py +0 -0
  119. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/aruba/ap_env.py +0 -0
  120. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/aruba/misc.py +0 -0
  121. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/b4com/__init__.py +0 -0
  122. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/b4com/file.py +0 -0
  123. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/b4com/iface.py +0 -0
  124. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/cisco/__init__.py +0 -0
  125. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/cisco/iface.py +0 -0
  126. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/cisco/misc.py +0 -0
  127. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/cisco/vlandb.py +0 -0
  128. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/common.py +0 -0
  129. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/deploying.py +0 -0
  130. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/huawei/__init__.py +0 -0
  131. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/huawei/aaa.py +0 -0
  132. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/huawei/bgp.py +0 -0
  133. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/huawei/iface.py +0 -0
  134. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/huawei/misc.py +0 -0
  135. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/huawei/vlandb.py +0 -0
  136. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/juniper/__init__.py +0 -0
  137. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/nexus/__init__.py +0 -0
  138. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/nexus/iface.py +0 -0
  139. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/patching.py +0 -0
  140. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/ribbon/__init__.py +0 -0
  141. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/routeros/__init__.py +0 -0
  142. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/routeros/file.py +0 -0
  143. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/arista.deploy +0 -0
  144. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/arista.rul +0 -0
  145. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/aruba.deploy +0 -0
  146. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/aruba.order +0 -0
  147. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/aruba.rul +0 -0
  148. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/b4com.deploy +0 -0
  149. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/b4com.order +0 -0
  150. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/b4com.rul +0 -0
  151. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/cisco.deploy +0 -0
  152. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/cisco.order +0 -0
  153. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/cisco.rul +0 -0
  154. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/huawei.deploy +0 -0
  155. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/huawei.order +0 -0
  156. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/huawei.rul +0 -0
  157. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/juniper.rul +0 -0
  158. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/nexus.deploy +0 -0
  159. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/nexus.order +0 -0
  160. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/nexus.rul +0 -0
  161. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/nokia.rul +0 -0
  162. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/optixtrans.deploy +0 -0
  163. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/optixtrans.order +0 -0
  164. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/optixtrans.rul +0 -0
  165. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/pc.deploy +0 -0
  166. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/pc.order +0 -0
  167. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/pc.rul +0 -0
  168. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/ribbon.deploy +0 -0
  169. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/ribbon.rul +0 -0
  170. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/routeros.order +0 -0
  171. {annet-1.0.0 → annet-1.0.2}/annet/rulebook/texts/routeros.rul +0 -0
  172. {annet-1.0.0 → annet-1.0.2}/annet/storage.py +0 -0
  173. {annet-1.0.0 → annet-1.0.2}/annet/tabparser.py +0 -0
  174. {annet-1.0.0 → annet-1.0.2}/annet/text_term_format.py +0 -0
  175. {annet-1.0.0 → annet-1.0.2}/annet/tracing.py +0 -0
  176. {annet-1.0.0 → annet-1.0.2}/annet/types.py +0 -0
  177. {annet-1.0.0 → annet-1.0.2}/annet.egg-info/SOURCES.txt +0 -0
  178. {annet-1.0.0 → annet-1.0.2}/annet.egg-info/dependency_links.txt +0 -0
  179. {annet-1.0.0 → annet-1.0.2}/annet.egg-info/entry_points.txt +0 -0
  180. {annet-1.0.0 → annet-1.0.2}/annet.egg-info/top_level.txt +0 -0
  181. {annet-1.0.0 → annet-1.0.2}/annet_generators/__init__.py +0 -0
  182. {annet-1.0.0 → annet-1.0.2}/annet_generators/example/__init__.py +0 -0
  183. {annet-1.0.0 → annet-1.0.2}/annet_generators/example/lldp.py +0 -0
  184. {annet-1.0.0 → annet-1.0.2}/annet_generators/mesh_example/__init__.py +0 -0
  185. {annet-1.0.0 → annet-1.0.2}/annet_generators/mesh_example/bgp.py +0 -0
  186. {annet-1.0.0 → annet-1.0.2}/annet_generators/mesh_example/mesh_logic.py +0 -0
  187. {annet-1.0.0 → annet-1.0.2}/annet_generators/rpl_example/__init__.py +0 -0
  188. {annet-1.0.0 → annet-1.0.2}/annet_generators/rpl_example/generator.py +0 -0
  189. {annet-1.0.0 → annet-1.0.2}/annet_generators/rpl_example/items.py +0 -0
  190. {annet-1.0.0 → annet-1.0.2}/annet_generators/rpl_example/mesh.py +0 -0
  191. {annet-1.0.0 → annet-1.0.2}/annet_generators/rpl_example/route_policy.py +0 -0
  192. {annet-1.0.0 → annet-1.0.2}/requirements.txt +0 -0
  193. {annet-1.0.0 → annet-1.0.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: annet
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: annet
5
5
  Home-page: https://github.com/annetutil/annet
6
6
  License: MIT
@@ -23,7 +23,7 @@ Requires-Dist: yarl>=1.8.2
23
23
  Requires-Dist: adaptix==3.0.0b7
24
24
  Requires-Dist: dataclass-rest==0.4
25
25
  Provides-Extra: netbox
26
- Requires-Dist: annetbox[sync]>=0.1.12; extra == "netbox"
26
+ Requires-Dist: annetbox[sync]>=0.1.13; extra == "netbox"
27
27
  Dynamic: home-page
28
28
  Dynamic: license
29
29
  Dynamic: provides-extra
@@ -54,7 +54,7 @@ def get_breed(manufacturer: str, model: str):
54
54
  return "bcom-os"
55
55
  elif manufacturer == "MikroTik":
56
56
  return "routeros"
57
- elif manufacturer == "Moxa":
57
+ elif manufacturer in ("Moxa", "Nebius"):
58
58
  return "moxa"
59
59
  elif manufacturer == "PC":
60
60
  return "pc"
@@ -214,7 +214,8 @@ class NetboxDevice(Entity):
214
214
  return type(self) is type(other) and self.url == other.url
215
215
 
216
216
  def is_pc(self) -> bool:
217
- return self.device_type.manufacturer.name in ("Mellanox", "NVIDIA", "Moxa") or self.breed == "pc"
217
+ custom_breed_pc = ("Mellanox", "NVIDIA", "Moxa", "Nebius")
218
+ return self.device_type.manufacturer.name in custom_breed_pc or self.breed == "pc"
218
219
 
219
220
  def _make_interface(self, name: str, type: InterfaceType) -> Interface:
220
221
  return Interface(
@@ -5,7 +5,7 @@ from typing import cast, List, Union, Iterable, Optional, TypedDict
5
5
  from annet.storage import Query
6
6
 
7
7
  FIELD_VALUE_SEPARATOR = ":"
8
- ALLOWED_GLOB_GROUPS = ["site", "tag", "role"]
8
+ ALLOWED_GLOB_GROUPS = ["site", "tag", "role", "device_type"]
9
9
 
10
10
 
11
11
  class Filter(TypedDict, total=False):
@@ -13,6 +13,7 @@ class Filter(TypedDict, total=False):
13
13
  tag: list[str]
14
14
  role: list[str]
15
15
  name: list[str]
16
+ device_type: list[str]
16
17
 
17
18
 
18
19
  @dataclass
@@ -312,8 +312,10 @@ def _match_query(exact_host_filter: bool, query: NetboxQuery, device_data: api_m
312
312
  hostnames = [subquery.strip() for subquery in query.globs if FIELD_VALUE_SEPARATOR not in subquery]
313
313
  if not hostnames:
314
314
  return True # no hostnames to check
315
+
315
316
  short_name = device_data.name.split(".")[0]
316
317
  for hostname in hostnames:
318
+ hostname = hostname.strip().rstrip(".")
317
319
  if short_name == hostname or device_data.name == hostname:
318
320
  return True
319
321
  return False
@@ -104,7 +104,7 @@
104
104
  "Nokia.NS7750": " 7750",
105
105
  "Nokia.SR_1s": "SR-1s",
106
106
 
107
- "PC": "^(PC|pc|[Mm]ellanox SN|[Ee]dge-?[Cc]ore|[Mm]oxa|NVIDIA|[Aa]sterfusion CX|[Uu]fi[Ss]pace)",
107
+ "PC": "^(PC|pc|[Mm]ellanox SN|[Ee]dge-?[Cc]ore|[Mm]oxa|NVIDIA|Nebius|[Aa]sterfusion CX|[Uu]fi[Ss]pace)",
108
108
 
109
109
  "PC.Whitebox": "([Mm]ellanox SN|[Ee]dge-?[Cc]ore|NVIDIA|[Aa]sterfusion CX|[Uu]fi[Ss]pace)",
110
110
  "PC.Whitebox.Mellanox": "[Mm]ellanox",
@@ -132,6 +132,8 @@
132
132
  "PC.Whitebox.Ufispace.S": " S",
133
133
  "PC.Whitebox.Ufispace.S.S9100": " S91\\d\\d",
134
134
  "PC.Whitebox.Ufispace.S.S9100.S9110_32X": " S9110-32X",
135
+ "PC.Nebius": "^Nebius",
136
+ "PC.Nebius.NB-E-BR-DCU-AST2600": "^Nebius NB-E-BR-DCU-AST2600",
135
137
 
136
138
  "RouterOS": "^([Rr]outer[Oo][Ss]|[Mm]ikro[Tt]ik)",
137
139
 
@@ -245,8 +245,10 @@ class VrfOptions:
245
245
  l2vpn_evpn: FamilyOptions
246
246
 
247
247
  vrf_name_global: Optional[str] = None
248
- l3vni: Optional[int] = None
248
+ import_policy: str = ""
249
+ export_policy: str = ""
249
250
  as_path_relax: bool = False
251
+ l3vni: Optional[int] = None
250
252
  rt_import: list[str] = field(default_factory=list)
251
253
  rt_export: list[str] = field(default_factory=list)
252
254
  rt_import_v4: list[str] = field(default_factory=list)
@@ -281,7 +283,7 @@ class BgpConfig:
281
283
  peers: list[Peer]
282
284
 
283
285
 
284
- def _used_policies(peer: Union[Peer, PeerGroup]) -> Iterable[str]:
286
+ def _used_policies(peer: Union[Peer, PeerGroup, VrfOptions]) -> Iterable[str]:
285
287
  if peer.import_policy:
286
288
  yield peer.import_policy
287
289
  if peer.export_policy:
@@ -309,6 +311,7 @@ def extract_policies(config: BgpConfig) -> Sequence[str]:
309
311
  for group in vrf.groups:
310
312
  result.extend(_used_policies(group))
311
313
  result.extend(_used_redistribute_policies(vrf))
314
+ result.extend(_used_policies(vrf))
312
315
  for group in config.global_options.groups:
313
316
  result.extend(_used_policies(group))
314
317
  for peer in config.peers:
@@ -407,7 +407,7 @@ def old_new(
407
407
  files_to_download = _get_files_to_download(devices, gens)
408
408
  devices_with_files = [device for device in devices if device in files_to_download]
409
409
  fetcher = get_fetcher()
410
- fetched_packages, failed_packages = do_async(fetcher.fetch_packages(devices_with_files))
410
+ fetched_packages, failed_packages = do_async(fetcher.fetch_packages(devices_with_files), new_thread=True)
411
411
 
412
412
  ctx = OldNewDeviceContext(
413
413
  config=config,
@@ -110,7 +110,9 @@ class PrefixListFilterGenerator(PartialGenerator, ABC):
110
110
  def acl_arista(self, _):
111
111
  return r"""
112
112
  ip prefix-list
113
+ seq
113
114
  ipv6 prefix-list
115
+ seq
114
116
  """
115
117
 
116
118
  def _arista_prefix_list(
@@ -120,21 +122,18 @@ class PrefixListFilterGenerator(PartialGenerator, ABC):
120
122
  match: PrefixMatchValue,
121
123
  plist: IpPrefixList,
122
124
  ) -> Iterable[Sequence[str]]:
123
- for i, prefix in enumerate(plist.members):
124
- addr_mask = ip_interface(prefix)
125
- yield (
126
- prefix_type,
127
- "prefix-list",
128
- name,
129
- f"seq {i * 5 + 5}",
130
- "permit",
131
- str(addr_mask.ip).upper(),
132
- str(addr_mask.network.prefixlen),
133
- ) + (
134
- ("ge", str(match.greater_equal)) if match.greater_equal is not None else ()
135
- ) + (
136
- ("le", str(match.less_equal)) if match.less_equal is not None else ()
137
- )
125
+ with self.block(prefix_type, "prefix-list", name):
126
+ for i, prefix in enumerate(plist.members):
127
+ addr_mask = ip_interface(prefix)
128
+ yield (
129
+ f"seq {i * 10 + 10}",
130
+ "permit",
131
+ addr_mask.with_prefixlen,
132
+ ) + (
133
+ ("ge", str(match.greater_equal)) if match.greater_equal is not None else ()
134
+ ) + (
135
+ ("le", str(match.less_equal)) if match.less_equal is not None else ()
136
+ )
138
137
 
139
138
  def run_arista(self, device: Any):
140
139
  policies = self.get_policies(device)
@@ -88,6 +88,7 @@ interface
88
88
 
89
89
  (?:ip|ipv6) routing
90
90
 
91
+ ip prefix-list
91
92
 
92
93
  ip community-list
93
94
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: annet
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: annet
5
5
  Home-page: https://github.com/annetutil/annet
6
6
  License: MIT
@@ -23,7 +23,7 @@ Requires-Dist: yarl>=1.8.2
23
23
  Requires-Dist: adaptix==3.0.0b7
24
24
  Requires-Dist: dataclass-rest==0.4
25
25
  Provides-Extra: netbox
26
- Requires-Dist: annetbox[sync]>=0.1.12; extra == "netbox"
26
+ Requires-Dist: annetbox[sync]>=0.1.13; extra == "netbox"
27
27
  Dynamic: home-page
28
28
  Dynamic: license
29
29
  Dynamic: provides-extra
@@ -15,4 +15,4 @@ adaptix==3.0.0b7
15
15
  dataclass-rest==0.4
16
16
 
17
17
  [netbox]
18
- annetbox[sync]>=0.1.12
18
+ annetbox[sync]>=0.1.13
@@ -44,7 +44,7 @@ if __name__ == "__main__":
44
44
  ],
45
45
  },
46
46
  extras_require={
47
- "netbox": ["annetbox[sync]>=0.1.12"],
47
+ "netbox": ["annetbox[sync]>=0.1.13"],
48
48
  },
49
49
  python_requires=">=3.10",
50
50
  install_requires=requirements(),
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes