annet 3.14.1__tar.gz → 3.14.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 (227) hide show
  1. {annet-3.14.1/annet.egg-info → annet-3.14.2}/PKG-INFO +1 -1
  2. {annet-3.14.1 → annet-3.14.2}/annet/api/__init__.py +1 -1
  3. {annet-3.14.1 → annet-3.14.2}/annet/bgp_models.py +23 -0
  4. {annet-3.14.1 → annet-3.14.2}/annet/mesh/basemodel.py +69 -8
  5. {annet-3.14.1 → annet-3.14.2}/annet/mesh/device_models.py +1 -0
  6. {annet-3.14.1 → annet-3.14.2}/annet/mesh/models_converter.py +4 -1
  7. {annet-3.14.1 → annet-3.14.2}/annet/mesh/peer_models.py +6 -1
  8. {annet-3.14.1 → annet-3.14.2}/annet/mesh/registry.py +10 -3
  9. {annet-3.14.1 → annet-3.14.2/annet.egg-info}/PKG-INFO +1 -1
  10. {annet-3.14.1 → annet-3.14.2}/AUTHORS +0 -0
  11. {annet-3.14.1 → annet-3.14.2}/LICENSE +0 -0
  12. {annet-3.14.1 → annet-3.14.2}/MANIFEST.in +0 -0
  13. {annet-3.14.1 → annet-3.14.2}/README.md +0 -0
  14. {annet-3.14.1 → annet-3.14.2}/annet/__init__.py +0 -0
  15. {annet-3.14.1 → annet-3.14.2}/annet/adapters/__init__.py +0 -0
  16. {annet-3.14.1 → annet-3.14.2}/annet/adapters/fetchers/__init__.py +0 -0
  17. {annet-3.14.1 → annet-3.14.2}/annet/adapters/fetchers/stub/__init__.py +0 -0
  18. {annet-3.14.1 → annet-3.14.2}/annet/adapters/fetchers/stub/fetcher.py +0 -0
  19. {annet-3.14.1 → annet-3.14.2}/annet/adapters/file/__init__.py +0 -0
  20. {annet-3.14.1 → annet-3.14.2}/annet/adapters/file/provider.py +0 -0
  21. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/__init__.py +0 -0
  22. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/common/__init__.py +0 -0
  23. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/common/adapter.py +0 -0
  24. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/common/client.py +0 -0
  25. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/common/manufacturer.py +0 -0
  26. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/common/models.py +0 -0
  27. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/common/query.py +0 -0
  28. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/common/status_client.py +0 -0
  29. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/common/storage_base.py +0 -0
  30. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/common/storage_opts.py +0 -0
  31. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/provider.py +0 -0
  32. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/v24/__init__.py +0 -0
  33. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/v24/models.py +0 -0
  34. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/v24/storage.py +0 -0
  35. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/v37/__init__.py +0 -0
  36. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/v37/models.py +0 -0
  37. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/v37/storage.py +0 -0
  38. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/v41/__init__.py +0 -0
  39. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/v41/models.py +0 -0
  40. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/v41/storage.py +0 -0
  41. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/v42/__init__.py +0 -0
  42. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/v42/models.py +0 -0
  43. {annet-3.14.1 → annet-3.14.2}/annet/adapters/netbox/v42/storage.py +0 -0
  44. {annet-3.14.1 → annet-3.14.2}/annet/annet.py +0 -0
  45. {annet-3.14.1 → annet-3.14.2}/annet/annlib/__init__.py +0 -0
  46. {annet-3.14.1 → annet-3.14.2}/annet/annlib/command.py +0 -0
  47. {annet-3.14.1 → annet-3.14.2}/annet/annlib/diff.py +0 -0
  48. {annet-3.14.1 → annet-3.14.2}/annet/annlib/errors.py +0 -0
  49. {annet-3.14.1 → annet-3.14.2}/annet/annlib/filter_acl.py +0 -0
  50. {annet-3.14.1 → annet-3.14.2}/annet/annlib/jsontools.py +0 -0
  51. {annet-3.14.1 → annet-3.14.2}/annet/annlib/lib.py +0 -0
  52. {annet-3.14.1 → annet-3.14.2}/annet/annlib/netdev/__init__.py +0 -0
  53. {annet-3.14.1 → annet-3.14.2}/annet/annlib/netdev/db.py +0 -0
  54. {annet-3.14.1 → annet-3.14.2}/annet/annlib/netdev/devdb/__init__.py +0 -0
  55. {annet-3.14.1 → annet-3.14.2}/annet/annlib/netdev/devdb/data/devdb.json +0 -0
  56. {annet-3.14.1 → annet-3.14.2}/annet/annlib/netdev/views/__init__.py +0 -0
  57. {annet-3.14.1 → annet-3.14.2}/annet/annlib/netdev/views/dump.py +0 -0
  58. {annet-3.14.1 → annet-3.14.2}/annet/annlib/netdev/views/hardware.py +0 -0
  59. {annet-3.14.1 → annet-3.14.2}/annet/annlib/output.py +0 -0
  60. {annet-3.14.1 → annet-3.14.2}/annet/annlib/patching.py +0 -0
  61. {annet-3.14.1 → annet-3.14.2}/annet/annlib/rbparser/__init__.py +0 -0
  62. {annet-3.14.1 → annet-3.14.2}/annet/annlib/rbparser/acl.py +0 -0
  63. {annet-3.14.1 → annet-3.14.2}/annet/annlib/rbparser/deploying.py +0 -0
  64. {annet-3.14.1 → annet-3.14.2}/annet/annlib/rbparser/ordering.py +0 -0
  65. {annet-3.14.1 → annet-3.14.2}/annet/annlib/rbparser/platform.py +0 -0
  66. {annet-3.14.1 → annet-3.14.2}/annet/annlib/rbparser/syntax.py +0 -0
  67. {annet-3.14.1 → annet-3.14.2}/annet/annlib/rulebook/__init__.py +0 -0
  68. {annet-3.14.1 → annet-3.14.2}/annet/annlib/rulebook/common.py +0 -0
  69. {annet-3.14.1 → annet-3.14.2}/annet/annlib/types.py +0 -0
  70. {annet-3.14.1 → annet-3.14.2}/annet/argparse.py +0 -0
  71. {annet-3.14.1 → annet-3.14.2}/annet/cli.py +0 -0
  72. {annet-3.14.1 → annet-3.14.2}/annet/cli_args.py +0 -0
  73. {annet-3.14.1 → annet-3.14.2}/annet/configs/context.yml +0 -0
  74. {annet-3.14.1 → annet-3.14.2}/annet/configs/logging.yaml +0 -0
  75. {annet-3.14.1 → annet-3.14.2}/annet/connectors.py +0 -0
  76. {annet-3.14.1 → annet-3.14.2}/annet/deploy.py +0 -0
  77. {annet-3.14.1 → annet-3.14.2}/annet/deploy_ui.py +0 -0
  78. {annet-3.14.1 → annet-3.14.2}/annet/diff.py +0 -0
  79. {annet-3.14.1 → annet-3.14.2}/annet/filtering.py +0 -0
  80. {annet-3.14.1 → annet-3.14.2}/annet/gen.py +0 -0
  81. {annet-3.14.1 → annet-3.14.2}/annet/generators/__init__.py +0 -0
  82. {annet-3.14.1 → annet-3.14.2}/annet/generators/base.py +0 -0
  83. {annet-3.14.1 → annet-3.14.2}/annet/generators/common/__init__.py +0 -0
  84. {annet-3.14.1 → annet-3.14.2}/annet/generators/common/initial.py +0 -0
  85. {annet-3.14.1 → annet-3.14.2}/annet/generators/entire.py +0 -0
  86. {annet-3.14.1 → annet-3.14.2}/annet/generators/exceptions.py +0 -0
  87. {annet-3.14.1 → annet-3.14.2}/annet/generators/jsonfragment.py +0 -0
  88. {annet-3.14.1 → annet-3.14.2}/annet/generators/partial.py +0 -0
  89. {annet-3.14.1 → annet-3.14.2}/annet/generators/perf.py +0 -0
  90. {annet-3.14.1 → annet-3.14.2}/annet/generators/ref.py +0 -0
  91. {annet-3.14.1 → annet-3.14.2}/annet/generators/result.py +0 -0
  92. {annet-3.14.1 → annet-3.14.2}/annet/hardware.py +0 -0
  93. {annet-3.14.1 → annet-3.14.2}/annet/implicit.py +0 -0
  94. {annet-3.14.1 → annet-3.14.2}/annet/lib.py +0 -0
  95. {annet-3.14.1 → annet-3.14.2}/annet/mesh/__init__.py +0 -0
  96. {annet-3.14.1 → annet-3.14.2}/annet/mesh/executor.py +0 -0
  97. {annet-3.14.1 → annet-3.14.2}/annet/mesh/match_args.py +0 -0
  98. {annet-3.14.1 → annet-3.14.2}/annet/mesh/port_processor.py +0 -0
  99. {annet-3.14.1 → annet-3.14.2}/annet/output.py +0 -0
  100. {annet-3.14.1 → annet-3.14.2}/annet/parallel.py +0 -0
  101. {annet-3.14.1 → annet-3.14.2}/annet/patching.py +0 -0
  102. {annet-3.14.1 → annet-3.14.2}/annet/reference.py +0 -0
  103. {annet-3.14.1 → annet-3.14.2}/annet/rpl/__init__.py +0 -0
  104. {annet-3.14.1 → annet-3.14.2}/annet/rpl/action.py +0 -0
  105. {annet-3.14.1 → annet-3.14.2}/annet/rpl/condition.py +0 -0
  106. {annet-3.14.1 → annet-3.14.2}/annet/rpl/match_builder.py +0 -0
  107. {annet-3.14.1 → annet-3.14.2}/annet/rpl/policy.py +0 -0
  108. {annet-3.14.1 → annet-3.14.2}/annet/rpl/result.py +0 -0
  109. {annet-3.14.1 → annet-3.14.2}/annet/rpl/routemap.py +0 -0
  110. {annet-3.14.1 → annet-3.14.2}/annet/rpl/statement_builder.py +0 -0
  111. {annet-3.14.1 → annet-3.14.2}/annet/rpl_generators/__init__.py +0 -0
  112. {annet-3.14.1 → annet-3.14.2}/annet/rpl_generators/aspath.py +0 -0
  113. {annet-3.14.1 → annet-3.14.2}/annet/rpl_generators/community.py +0 -0
  114. {annet-3.14.1 → annet-3.14.2}/annet/rpl_generators/cumulus_frr.py +0 -0
  115. {annet-3.14.1 → annet-3.14.2}/annet/rpl_generators/entities.py +0 -0
  116. {annet-3.14.1 → annet-3.14.2}/annet/rpl_generators/execute.py +0 -0
  117. {annet-3.14.1 → annet-3.14.2}/annet/rpl_generators/policy.py +0 -0
  118. {annet-3.14.1 → annet-3.14.2}/annet/rpl_generators/prefix_lists.py +0 -0
  119. {annet-3.14.1 → annet-3.14.2}/annet/rpl_generators/rd.py +0 -0
  120. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/__init__.py +0 -0
  121. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/arista/__init__.py +0 -0
  122. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/arista/aaa.py +0 -0
  123. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/arista/iface.py +0 -0
  124. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/aruba/__init__.py +0 -0
  125. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/aruba/ap_env.py +0 -0
  126. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/aruba/misc.py +0 -0
  127. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/b4com/__init__.py +0 -0
  128. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/b4com/file.py +0 -0
  129. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/b4com/iface.py +0 -0
  130. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/cisco/__init__.py +0 -0
  131. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/cisco/iface.py +0 -0
  132. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/cisco/misc.py +0 -0
  133. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/cisco/vlandb.py +0 -0
  134. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/common.py +0 -0
  135. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/deploying.py +0 -0
  136. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/generic/__init__.py +0 -0
  137. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/generic/misc.py +0 -0
  138. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/huawei/__init__.py +0 -0
  139. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/huawei/aaa.py +0 -0
  140. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/huawei/bgp.py +0 -0
  141. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/huawei/iface.py +0 -0
  142. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/huawei/misc.py +0 -0
  143. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/huawei/vlandb.py +0 -0
  144. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/juniper/__init__.py +0 -0
  145. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/juniper/iface.py +0 -0
  146. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/nexus/__init__.py +0 -0
  147. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/nexus/iface.py +0 -0
  148. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/patching.py +0 -0
  149. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/routeros/__init__.py +0 -0
  150. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/routeros/file.py +0 -0
  151. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/arista.deploy +0 -0
  152. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/arista.order +0 -0
  153. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/arista.rul +0 -0
  154. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/aruba.deploy +0 -0
  155. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/aruba.order +0 -0
  156. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/aruba.rul +0 -0
  157. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/b4com.deploy +0 -0
  158. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/b4com.order +0 -0
  159. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/b4com.rul +0 -0
  160. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/cisco.deploy +0 -0
  161. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/cisco.order +0 -0
  162. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/cisco.rul +0 -0
  163. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/huawei.deploy +0 -0
  164. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/huawei.order +0 -0
  165. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/huawei.rul +0 -0
  166. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/iosxr.deploy +0 -0
  167. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/iosxr.order +0 -0
  168. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/iosxr.rul +0 -0
  169. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/juniper.order +0 -0
  170. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/juniper.rul +0 -0
  171. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/nexus.deploy +0 -0
  172. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/nexus.order +0 -0
  173. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/nexus.rul +0 -0
  174. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/nokia.rul +0 -0
  175. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/optixtrans.deploy +0 -0
  176. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/optixtrans.order +0 -0
  177. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/optixtrans.rul +0 -0
  178. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/pc.deploy +0 -0
  179. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/pc.order +0 -0
  180. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/pc.rul +0 -0
  181. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/ribbon.deploy +0 -0
  182. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/ribbon.rul +0 -0
  183. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/routeros.order +0 -0
  184. {annet-3.14.1 → annet-3.14.2}/annet/rulebook/texts/routeros.rul +0 -0
  185. {annet-3.14.1 → annet-3.14.2}/annet/storage.py +0 -0
  186. {annet-3.14.1 → annet-3.14.2}/annet/text_term_format.py +0 -0
  187. {annet-3.14.1 → annet-3.14.2}/annet/tracing.py +0 -0
  188. {annet-3.14.1 → annet-3.14.2}/annet/types.py +0 -0
  189. {annet-3.14.1 → annet-3.14.2}/annet/vendors/__init__.py +0 -0
  190. {annet-3.14.1 → annet-3.14.2}/annet/vendors/base.py +0 -0
  191. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/__init__.py +0 -0
  192. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/arista.py +0 -0
  193. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/aruba.py +0 -0
  194. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/b4com.py +0 -0
  195. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/cisco.py +0 -0
  196. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/h3c.py +0 -0
  197. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/huawei.py +0 -0
  198. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/iosxr.py +0 -0
  199. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/juniper.py +0 -0
  200. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/nexus.py +0 -0
  201. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/nokia.py +0 -0
  202. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/optixtrans.py +0 -0
  203. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/pc.py +0 -0
  204. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/ribbon.py +0 -0
  205. {annet-3.14.1 → annet-3.14.2}/annet/vendors/library/routeros.py +0 -0
  206. {annet-3.14.1 → annet-3.14.2}/annet/vendors/registry.py +0 -0
  207. {annet-3.14.1 → annet-3.14.2}/annet/vendors/tabparser.py +0 -0
  208. {annet-3.14.1 → annet-3.14.2}/annet.egg-info/SOURCES.txt +0 -0
  209. {annet-3.14.1 → annet-3.14.2}/annet.egg-info/dependency_links.txt +0 -0
  210. {annet-3.14.1 → annet-3.14.2}/annet.egg-info/entry_points.txt +0 -0
  211. {annet-3.14.1 → annet-3.14.2}/annet.egg-info/requires.txt +0 -0
  212. {annet-3.14.1 → annet-3.14.2}/annet.egg-info/top_level.txt +0 -0
  213. {annet-3.14.1 → annet-3.14.2}/annet_generators/__init__.py +0 -0
  214. {annet-3.14.1 → annet-3.14.2}/annet_generators/example/__init__.py +0 -0
  215. {annet-3.14.1 → annet-3.14.2}/annet_generators/example/hostname.py +0 -0
  216. {annet-3.14.1 → annet-3.14.2}/annet_generators/example/lldp.py +0 -0
  217. {annet-3.14.1 → annet-3.14.2}/annet_generators/mesh_example/__init__.py +0 -0
  218. {annet-3.14.1 → annet-3.14.2}/annet_generators/mesh_example/bgp.py +0 -0
  219. {annet-3.14.1 → annet-3.14.2}/annet_generators/mesh_example/mesh_logic.py +0 -0
  220. {annet-3.14.1 → annet-3.14.2}/annet_generators/rpl_example/__init__.py +0 -0
  221. {annet-3.14.1 → annet-3.14.2}/annet_generators/rpl_example/generator.py +0 -0
  222. {annet-3.14.1 → annet-3.14.2}/annet_generators/rpl_example/items.py +0 -0
  223. {annet-3.14.1 → annet-3.14.2}/annet_generators/rpl_example/mesh.py +0 -0
  224. {annet-3.14.1 → annet-3.14.2}/annet_generators/rpl_example/route_policy.py +0 -0
  225. {annet-3.14.1 → annet-3.14.2}/requirements.txt +0 -0
  226. {annet-3.14.1 → annet-3.14.2}/setup.cfg +0 -0
  227. {annet-3.14.1 → annet-3.14.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: annet
3
- Version: 3.14.1
3
+ Version: 3.14.2
4
4
  Summary: annet
5
5
  Home-page: https://github.com/annetutil/annet
6
6
  License: MIT
@@ -683,7 +683,7 @@ async def adeploy(
683
683
  ) -> ExitCode:
684
684
  """ Сгенерировать конфиг для устройств и задеплоить его """
685
685
  ret: ExitCode = 0
686
- ann_gen.live_configs = await fetcher.fetch(devices=loader.devices, processes=args.parallel)
686
+ ann_gen.live_configs = await fetcher.fetch(devices=loader.devices, processes=args.parallel, max_slots=args.max_slots)
687
687
 
688
688
  device_ids = [d.id for d in loader.devices]
689
689
  for res in ann_gen.old_new(
@@ -201,6 +201,24 @@ class PeerOptions:
201
201
  not_active: Optional[bool] = None
202
202
  mtu: Optional[int] = None
203
203
  password: Optional[str] = None
204
+ cluster_id: Optional[str] = None
205
+
206
+
207
+ @dataclass
208
+ class PeerFamilyOption:
209
+ af_loops: Optional[int] = None
210
+ import_limit: Optional[int] = None
211
+
212
+
213
+ @dataclass
214
+ class PeerFamilyOptions:
215
+ ipv4_unicast: PeerFamilyOption = field(default_factory=PeerFamilyOption)
216
+ ipv6_unicast: PeerFamilyOption = field(default_factory=PeerFamilyOption)
217
+ ipv4_vpn_unicast: PeerFamilyOption = field(default_factory=PeerFamilyOption)
218
+ ipv6_vpn_unicast: PeerFamilyOption = field(default_factory=PeerFamilyOption)
219
+ ipv4_labeled_unicast: PeerFamilyOption = field(default_factory=PeerFamilyOption)
220
+ ipv6_labeled_unicast: PeerFamilyOption = field(default_factory=PeerFamilyOption)
221
+ l2vpn_evpn: PeerFamilyOption = field(default_factory=PeerFamilyOption)
204
222
 
205
223
 
206
224
  @dataclass
@@ -209,6 +227,7 @@ class Peer:
209
227
  interface: Optional[str]
210
228
  remote_as: ASN
211
229
  families: set[Family] = field(default_factory=set)
230
+ family_options: PeerFamilyOptions = field(default_factory=PeerFamilyOptions)
212
231
  description: str = ""
213
232
  vrf_name: str = ""
214
233
  group_name: str = ""
@@ -264,6 +283,7 @@ class PeerGroup:
264
283
  name: str
265
284
  remote_as: ASN = ASN(None)
266
285
  families: set[Family] = field(default_factory=set)
286
+ family_options: PeerFamilyOptions = field(default_factory=PeerFamilyOptions)
267
287
  internal_name: str = ""
268
288
  description: str = ""
269
289
  update_source: str = ""
@@ -320,6 +340,7 @@ class PeerGroup:
320
340
  not_active: bool = False
321
341
  mtu: int = 0
322
342
  password: Optional[str] = None
343
+ cluster_id: Optional[str] = None
323
344
 
324
345
 
325
346
  @dataclass
@@ -371,6 +392,8 @@ class GlobalOptions:
371
392
  loops: int = 0
372
393
  multipath: int = 0
373
394
  router_id: str = ""
395
+ cluster_id: Optional[str] = None
396
+
374
397
  vrf: dict[str, VrfOptions] = field(default_factory=dict)
375
398
  groups: list[PeerGroup] = field(default_factory=list)
376
399
  l2vpn: dict[str, L2VpnOptions] = field(default_factory=dict)
@@ -1,8 +1,9 @@
1
1
  from abc import ABC
2
2
  from copy import copy
3
3
  from enum import Enum
4
+ from dataclasses import is_dataclass, replace, fields, MISSING
4
5
  from typing import (
5
- TypeVar, Any, Annotated, get_origin, get_type_hints, get_args, Callable, Union, ClassVar, overload,
6
+ TypeVar, Any, Annotated, get_origin, get_type_hints, get_args, Callable, Union, ClassVar, overload, cast,
6
7
  )
7
8
 
8
9
 
@@ -143,13 +144,15 @@ ModelT = TypeVar("ModelT", bound=BaseMeshModel)
143
144
  def _merge(a: ModelT, b: BaseMeshModel) -> ModelT:
144
145
  result = copy(a)
145
146
  for attr_name, merger in a._field_mergers.items():
146
- new_value = merger(
147
- attr_name,
148
- getattr(a, attr_name, Special.NOT_SET),
149
- getattr(b, attr_name, Special.NOT_SET),
150
- )
151
- if new_value is not Special.NOT_SET:
152
- setattr(result, attr_name, new_value)
147
+ aval = getattr(a, attr_name, Special.NOT_SET)
148
+ bval = getattr(b, attr_name, Special.NOT_SET)
149
+ if is_dataclass(aval) and is_dataclass(bval):
150
+ new_dto = merge_dataclass(aval, bval)
151
+ setattr(result, attr_name, new_dto)
152
+ else:
153
+ new_value = merger(attr_name, aval, bval)
154
+ if new_value is not Special.NOT_SET:
155
+ setattr(result, attr_name, new_value)
153
156
  return result
154
157
 
155
158
 
@@ -178,6 +181,64 @@ def merge(first: Any, /, *others: Any) -> Any:
178
181
  return first
179
182
 
180
183
 
184
+ def merge_dataclass(a: Any, b: Any) -> Any:
185
+ if a.__class__ != b.__class__:
186
+ raise MergeForbiddenError(
187
+ f"Dataclasses belonging to different instaces can't be merged:\n"
188
+ f"Old: {a}\n"
189
+ f"New: {b}"
190
+ )
191
+
192
+ if a == b:
193
+ return replace(a)
194
+
195
+ empty = dataclass_default(a.__class__)
196
+ merged = {}
197
+ for f in fields(empty):
198
+ default = getattr(empty, f.name)
199
+ aval = getattr(a, f.name)
200
+ bval = getattr(b, f.name)
201
+ if aval == default:
202
+ merged[f.name] = bval
203
+ elif bval == default:
204
+ merged[f.name] = aval
205
+ elif aval == bval:
206
+ merged[f.name] = aval
207
+ elif is_dataclass(aval) and is_dataclass(bval):
208
+ merged[f.name] = merge_dataclass(aval, bval)
209
+ else:
210
+ raise MergeForbiddenError(
211
+ f"Dataclasses with non-equal field {f.name} can't be merged:\n"
212
+ f"Old: {aval}\n"
213
+ f"New: {bval}"
214
+ )
215
+
216
+ return replace(empty, **merged)
217
+
218
+
219
+ def is_dataclass_empty(a: Any) -> bool:
220
+ try:
221
+ dataclass_default(a.__class__)
222
+ except ValueError:
223
+ return False
224
+ return True
225
+
226
+
227
+ def dataclass_default(dataclass_cls: type[T]) -> T:
228
+ if not is_dataclass(dataclass_cls):
229
+ raise TypeError(f"Class {dataclass_cls} is not a dataclass")
230
+
231
+ non_default_fields = []
232
+ for f in fields(dataclass_cls):
233
+ if f.default == MISSING and f.default_factory == MISSING:
234
+ non_default_fields.append(f.name)
235
+
236
+ if non_default_fields:
237
+ raise ValueError(f"Class {dataclass_cls} has non-default fields: {' '.join(non_default_fields)}")
238
+
239
+ return cast(T, dataclass_cls())
240
+
241
+
181
242
  class KeyDefaultDict(dict):
182
243
  def __init__(self, factory: Callable[[str], Any]):
183
244
  super().__init__()
@@ -108,6 +108,7 @@ class GlobalOptionsDTO(_FamiliesMixin, BaseMeshModel):
108
108
  loops: int
109
109
  multipath: int
110
110
  router_id: str
111
+ cluster_id: Optional[str]
111
112
  vrf: Annotated[dict[str, VrfOptions], DictMerge(Merge())]
112
113
  groups: Annotated[dict[str, MeshPeerGroup], DictMerge(Merge())]
113
114
  l2vpn: Annotated[dict[str, L2VpnOptions], DictMerge(Merge())]
@@ -7,7 +7,7 @@ from adaptix import Retort, loader, Chain, name_mapping, as_is_loader
7
7
  from .peer_models import DirectPeerDTO, IndirectPeerDTO, VirtualPeerDTO, VirtualLocalDTO
8
8
  from ..bgp_models import (
9
9
  Aggregate, GlobalOptions, VrfOptions, FamilyOptions, Peer, PeerGroup, ASN, PeerOptions,
10
- Redistribute, BFDTimers, L2VpnOptions, VidCollection,
10
+ Redistribute, BFDTimers, L2VpnOptions, VidCollection, PeerFamilyOptions, PeerFamilyOption
11
11
  )
12
12
 
13
13
 
@@ -56,6 +56,8 @@ retort = Retort(
56
56
  loader(FamilyOptions, ObjMapping, Chain.FIRST),
57
57
  loader(Aggregate, ObjMapping, Chain.FIRST),
58
58
  loader(PeerOptions, ObjMapping, Chain.FIRST),
59
+ loader(PeerFamilyOptions, ObjMapping, Chain.FIRST),
60
+ loader(PeerFamilyOption, ObjMapping, Chain.FIRST),
59
61
  as_is_loader(Redistribute),
60
62
  as_is_loader(BFDTimers),
61
63
  name_mapping(PeerOptions, map={
@@ -98,4 +100,5 @@ def to_bgp_peer(local: LocalDTO, connected: PeerDTO, connected_hostname: str, in
98
100
  result.import_policy = getattr(local, "import_policy", result.import_policy)
99
101
  result.export_policy = getattr(local, "export_policy", result.export_policy)
100
102
  result.update_source = getattr(local, "update_source", result.update_source)
103
+ result.family_options = getattr(local, "family_options", result.family_options)
101
104
  return result
@@ -1,7 +1,7 @@
1
1
  from typing import Literal, Annotated, Union, Optional
2
2
 
3
3
  from .basemodel import BaseMeshModel, Concat, Unite
4
- from ..bgp_models import BFDTimers
4
+ from ..bgp_models import BFDTimers, PeerFamilyOptions
5
5
 
6
6
  FamilyName = Literal["ipv4_unicast", "ipv6_unicast", "ipv4_labeled_unicast", "ipv6_labeled_unicast", "l2vpn_evpn"]
7
7
 
@@ -39,6 +39,9 @@ class _OptionsDTO(_SharedOptionsDTO):
39
39
  """
40
40
  Options which can be set on group of peers or peer itself
41
41
  """
42
+ def __init__(self, **kwargs):
43
+ kwargs.setdefault("family_options", PeerFamilyOptions())
44
+ super().__init__(**kwargs)
42
45
  unnumbered: bool
43
46
  rr_client: bool
44
47
  next_hop_self: bool
@@ -77,6 +80,8 @@ class _OptionsDTO(_SharedOptionsDTO):
77
80
  soft_reconfiguration_inbound: bool
78
81
  not_active: bool
79
82
  mtu: int
83
+ family_options: PeerFamilyOptions
84
+ cluster_id: Optional[str]
80
85
 
81
86
 
82
87
  class DirectPeerDTO(MeshSession, _OptionsDTO):
@@ -6,6 +6,7 @@ from .match_args import MatchedArgs
6
6
  from .device_models import GlobalOptionsDTO
7
7
  from .peer_models import MeshSession, IndirectPeerDTO, VirtualLocalDTO, VirtualPeerDTO, DirectPeerDTO
8
8
  from .port_processor import PortProcessor, united_ports
9
+ from .basemodel import is_dataclass_empty
9
10
 
10
11
 
11
12
  class DirectPeer(DirectPeerDTO):
@@ -22,7 +23,9 @@ class DirectPeer(DirectPeerDTO):
22
23
  self.all_connected_ports = all_connected_ports
23
24
 
24
25
  def is_empty(self):
25
- return self.__dict__.keys() == {"match", "device", "ports", "all_connected_ports"}
26
+ if not is_dataclass_empty(self.family_options):
27
+ return False
28
+ return self.__dict__.keys() == {"match", "device", "ports", "all_connected_ports", "family_options"}
26
29
 
27
30
 
28
31
  class IndirectPeer(IndirectPeerDTO):
@@ -35,7 +38,9 @@ class IndirectPeer(IndirectPeerDTO):
35
38
  self.device = device
36
39
 
37
40
  def is_empty(self):
38
- return self.__dict__.keys() == {"match", "device"}
41
+ if not is_dataclass_empty(self.family_options):
42
+ return False
43
+ return self.__dict__.keys() == {"match", "device", "family_options"}
39
44
 
40
45
 
41
46
  class VirtualLocal(VirtualLocalDTO):
@@ -48,7 +53,9 @@ class VirtualLocal(VirtualLocalDTO):
48
53
  self.device = device
49
54
 
50
55
  def is_empty(self):
51
- return self.__dict__.keys() == {"match", "device"}
56
+ if not is_dataclass_empty(self.family_options):
57
+ return False
58
+ return self.__dict__.keys() == {"match", "device", "family_options"}
52
59
 
53
60
 
54
61
  class VirtualPeer(VirtualPeerDTO):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: annet
3
- Version: 3.14.1
3
+ Version: 3.14.2
4
4
  Summary: annet
5
5
  Home-page: https://github.com/annetutil/annet
6
6
  License: MIT
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