annet 3.18.0__tar.gz → 3.19.0__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 (236) hide show
  1. {annet-3.18.0/annet.egg-info → annet-3.19.0}/PKG-INFO +3 -2
  2. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/common/storage_base.py +31 -2
  3. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/common/storage_opts.py +21 -0
  4. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/provider.py +2 -1
  5. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/v37/storage.py +7 -2
  6. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/v41/storage.py +8 -2
  7. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/v42/storage.py +7 -3
  8. {annet-3.18.0 → annet-3.19.0}/annet/cli_args.py +7 -0
  9. {annet-3.18.0 → annet-3.19.0/annet.egg-info}/PKG-INFO +3 -2
  10. {annet-3.18.0 → annet-3.19.0}/annet.egg-info/requires.txt +2 -1
  11. {annet-3.18.0 → annet-3.19.0}/setup.py +4 -1
  12. {annet-3.18.0 → annet-3.19.0}/AUTHORS +0 -0
  13. {annet-3.18.0 → annet-3.19.0}/LICENSE +0 -0
  14. {annet-3.18.0 → annet-3.19.0}/MANIFEST.in +0 -0
  15. {annet-3.18.0 → annet-3.19.0}/README.md +0 -0
  16. {annet-3.18.0 → annet-3.19.0}/annet/__init__.py +0 -0
  17. {annet-3.18.0 → annet-3.19.0}/annet/adapters/__init__.py +0 -0
  18. {annet-3.18.0 → annet-3.19.0}/annet/adapters/fetchers/__init__.py +0 -0
  19. {annet-3.18.0 → annet-3.19.0}/annet/adapters/fetchers/stub/__init__.py +0 -0
  20. {annet-3.18.0 → annet-3.19.0}/annet/adapters/fetchers/stub/fetcher.py +0 -0
  21. {annet-3.18.0 → annet-3.19.0}/annet/adapters/file/__init__.py +0 -0
  22. {annet-3.18.0 → annet-3.19.0}/annet/adapters/file/provider.py +0 -0
  23. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/__init__.py +0 -0
  24. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/common/__init__.py +0 -0
  25. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/common/adapter.py +0 -0
  26. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/common/client.py +0 -0
  27. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/common/manufacturer.py +0 -0
  28. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/common/models.py +0 -0
  29. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/common/query.py +0 -0
  30. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/common/status_client.py +0 -0
  31. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/v24/__init__.py +0 -0
  32. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/v24/models.py +0 -0
  33. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/v24/storage.py +0 -0
  34. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/v37/__init__.py +0 -0
  35. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/v37/models.py +0 -0
  36. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/v41/__init__.py +0 -0
  37. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/v41/models.py +0 -0
  38. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/v42/__init__.py +0 -0
  39. {annet-3.18.0 → annet-3.19.0}/annet/adapters/netbox/v42/models.py +0 -0
  40. {annet-3.18.0 → annet-3.19.0}/annet/annet.py +0 -0
  41. {annet-3.18.0 → annet-3.19.0}/annet/annlib/__init__.py +0 -0
  42. {annet-3.18.0 → annet-3.19.0}/annet/annlib/command.py +0 -0
  43. {annet-3.18.0 → annet-3.19.0}/annet/annlib/diff.py +0 -0
  44. {annet-3.18.0 → annet-3.19.0}/annet/annlib/errors.py +0 -0
  45. {annet-3.18.0 → annet-3.19.0}/annet/annlib/filter_acl.py +0 -0
  46. {annet-3.18.0 → annet-3.19.0}/annet/annlib/jsontools.py +0 -0
  47. {annet-3.18.0 → annet-3.19.0}/annet/annlib/lib.py +0 -0
  48. {annet-3.18.0 → annet-3.19.0}/annet/annlib/netdev/__init__.py +0 -0
  49. {annet-3.18.0 → annet-3.19.0}/annet/annlib/netdev/db.py +0 -0
  50. {annet-3.18.0 → annet-3.19.0}/annet/annlib/netdev/devdb/__init__.py +0 -0
  51. {annet-3.18.0 → annet-3.19.0}/annet/annlib/netdev/devdb/data/devdb.json +0 -0
  52. {annet-3.18.0 → annet-3.19.0}/annet/annlib/netdev/views/__init__.py +0 -0
  53. {annet-3.18.0 → annet-3.19.0}/annet/annlib/netdev/views/dump.py +0 -0
  54. {annet-3.18.0 → annet-3.19.0}/annet/annlib/netdev/views/hardware.py +0 -0
  55. {annet-3.18.0 → annet-3.19.0}/annet/annlib/output.py +0 -0
  56. {annet-3.18.0 → annet-3.19.0}/annet/annlib/patching.py +0 -0
  57. {annet-3.18.0 → annet-3.19.0}/annet/annlib/rbparser/__init__.py +0 -0
  58. {annet-3.18.0 → annet-3.19.0}/annet/annlib/rbparser/acl.py +0 -0
  59. {annet-3.18.0 → annet-3.19.0}/annet/annlib/rbparser/deploying.py +0 -0
  60. {annet-3.18.0 → annet-3.19.0}/annet/annlib/rbparser/ordering.py +0 -0
  61. {annet-3.18.0 → annet-3.19.0}/annet/annlib/rbparser/platform.py +0 -0
  62. {annet-3.18.0 → annet-3.19.0}/annet/annlib/rbparser/syntax.py +0 -0
  63. {annet-3.18.0 → annet-3.19.0}/annet/annlib/rulebook/__init__.py +0 -0
  64. {annet-3.18.0 → annet-3.19.0}/annet/annlib/rulebook/common.py +0 -0
  65. {annet-3.18.0 → annet-3.19.0}/annet/annlib/types.py +0 -0
  66. {annet-3.18.0 → annet-3.19.0}/annet/api/__init__.py +0 -0
  67. {annet-3.18.0 → annet-3.19.0}/annet/argparse.py +0 -0
  68. {annet-3.18.0 → annet-3.19.0}/annet/bgp_models.py +0 -0
  69. {annet-3.18.0 → annet-3.19.0}/annet/cli.py +0 -0
  70. {annet-3.18.0 → annet-3.19.0}/annet/configs/context.yml +0 -0
  71. {annet-3.18.0 → annet-3.19.0}/annet/configs/logging.yaml +0 -0
  72. {annet-3.18.0 → annet-3.19.0}/annet/connectors.py +0 -0
  73. {annet-3.18.0 → annet-3.19.0}/annet/deploy.py +0 -0
  74. {annet-3.18.0 → annet-3.19.0}/annet/deploy_ui.py +0 -0
  75. {annet-3.18.0 → annet-3.19.0}/annet/diff.py +0 -0
  76. {annet-3.18.0 → annet-3.19.0}/annet/filtering.py +0 -0
  77. {annet-3.18.0 → annet-3.19.0}/annet/gen.py +0 -0
  78. {annet-3.18.0 → annet-3.19.0}/annet/generators/__init__.py +0 -0
  79. {annet-3.18.0 → annet-3.19.0}/annet/generators/base.py +0 -0
  80. {annet-3.18.0 → annet-3.19.0}/annet/generators/common/__init__.py +0 -0
  81. {annet-3.18.0 → annet-3.19.0}/annet/generators/common/initial.py +0 -0
  82. {annet-3.18.0 → annet-3.19.0}/annet/generators/entire.py +0 -0
  83. {annet-3.18.0 → annet-3.19.0}/annet/generators/exceptions.py +0 -0
  84. {annet-3.18.0 → annet-3.19.0}/annet/generators/jsonfragment.py +0 -0
  85. {annet-3.18.0 → annet-3.19.0}/annet/generators/partial.py +0 -0
  86. {annet-3.18.0 → annet-3.19.0}/annet/generators/perf.py +0 -0
  87. {annet-3.18.0 → annet-3.19.0}/annet/generators/ref.py +0 -0
  88. {annet-3.18.0 → annet-3.19.0}/annet/generators/result.py +0 -0
  89. {annet-3.18.0 → annet-3.19.0}/annet/hardware.py +0 -0
  90. {annet-3.18.0 → annet-3.19.0}/annet/implicit.py +0 -0
  91. {annet-3.18.0 → annet-3.19.0}/annet/lib.py +0 -0
  92. {annet-3.18.0 → annet-3.19.0}/annet/mesh/__init__.py +0 -0
  93. {annet-3.18.0 → annet-3.19.0}/annet/mesh/basemodel.py +0 -0
  94. {annet-3.18.0 → annet-3.19.0}/annet/mesh/device_models.py +0 -0
  95. {annet-3.18.0 → annet-3.19.0}/annet/mesh/executor.py +0 -0
  96. {annet-3.18.0 → annet-3.19.0}/annet/mesh/match_args.py +0 -0
  97. {annet-3.18.0 → annet-3.19.0}/annet/mesh/models_converter.py +0 -0
  98. {annet-3.18.0 → annet-3.19.0}/annet/mesh/peer_models.py +0 -0
  99. {annet-3.18.0 → annet-3.19.0}/annet/mesh/port_processor.py +0 -0
  100. {annet-3.18.0 → annet-3.19.0}/annet/mesh/registry.py +0 -0
  101. {annet-3.18.0 → annet-3.19.0}/annet/output.py +0 -0
  102. {annet-3.18.0 → annet-3.19.0}/annet/parallel.py +0 -0
  103. {annet-3.18.0 → annet-3.19.0}/annet/patching.py +0 -0
  104. {annet-3.18.0 → annet-3.19.0}/annet/reference.py +0 -0
  105. {annet-3.18.0 → annet-3.19.0}/annet/rpl/__init__.py +0 -0
  106. {annet-3.18.0 → annet-3.19.0}/annet/rpl/action.py +0 -0
  107. {annet-3.18.0 → annet-3.19.0}/annet/rpl/condition.py +0 -0
  108. {annet-3.18.0 → annet-3.19.0}/annet/rpl/match_builder.py +0 -0
  109. {annet-3.18.0 → annet-3.19.0}/annet/rpl/policy.py +0 -0
  110. {annet-3.18.0 → annet-3.19.0}/annet/rpl/result.py +0 -0
  111. {annet-3.18.0 → annet-3.19.0}/annet/rpl/routemap.py +0 -0
  112. {annet-3.18.0 → annet-3.19.0}/annet/rpl/statement_builder.py +0 -0
  113. {annet-3.18.0 → annet-3.19.0}/annet/rpl_generators/__init__.py +0 -0
  114. {annet-3.18.0 → annet-3.19.0}/annet/rpl_generators/aspath.py +0 -0
  115. {annet-3.18.0 → annet-3.19.0}/annet/rpl_generators/community.py +0 -0
  116. {annet-3.18.0 → annet-3.19.0}/annet/rpl_generators/cumulus_frr.py +0 -0
  117. {annet-3.18.0 → annet-3.19.0}/annet/rpl_generators/entities.py +0 -0
  118. {annet-3.18.0 → annet-3.19.0}/annet/rpl_generators/execute.py +0 -0
  119. {annet-3.18.0 → annet-3.19.0}/annet/rpl_generators/policy.py +0 -0
  120. {annet-3.18.0 → annet-3.19.0}/annet/rpl_generators/prefix_lists.py +0 -0
  121. {annet-3.18.0 → annet-3.19.0}/annet/rpl_generators/rd.py +0 -0
  122. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/__init__.py +0 -0
  123. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/arista/__init__.py +0 -0
  124. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/arista/aaa.py +0 -0
  125. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/arista/iface.py +0 -0
  126. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/aruba/__init__.py +0 -0
  127. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/aruba/ap_env.py +0 -0
  128. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/aruba/misc.py +0 -0
  129. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/b4com/__init__.py +0 -0
  130. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/b4com/file.py +0 -0
  131. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/b4com/iface.py +0 -0
  132. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/cisco/__init__.py +0 -0
  133. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/cisco/iface.py +0 -0
  134. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/cisco/misc.py +0 -0
  135. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/cisco/vlandb.py +0 -0
  136. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/common.py +0 -0
  137. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/deploying.py +0 -0
  138. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/generic/__init__.py +0 -0
  139. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/generic/misc.py +0 -0
  140. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/h3c/__init__.py +0 -0
  141. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/h3c/aaa.py +0 -0
  142. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/h3c/bgp.py +0 -0
  143. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/h3c/iface.py +0 -0
  144. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/h3c/misc.py +0 -0
  145. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/h3c/vlandb.py +0 -0
  146. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/huawei/__init__.py +0 -0
  147. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/huawei/aaa.py +0 -0
  148. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/huawei/bgp.py +0 -0
  149. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/huawei/iface.py +0 -0
  150. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/huawei/misc.py +0 -0
  151. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/huawei/vlandb.py +0 -0
  152. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/juniper/__init__.py +0 -0
  153. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/juniper/iface.py +0 -0
  154. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/nexus/__init__.py +0 -0
  155. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/nexus/iface.py +0 -0
  156. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/patching.py +0 -0
  157. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/routeros/__init__.py +0 -0
  158. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/routeros/file.py +0 -0
  159. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/arista.deploy +0 -0
  160. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/arista.order +0 -0
  161. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/arista.rul +0 -0
  162. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/aruba.deploy +0 -0
  163. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/aruba.order +0 -0
  164. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/aruba.rul +0 -0
  165. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/b4com.deploy +0 -0
  166. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/b4com.order +0 -0
  167. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/b4com.rul +0 -0
  168. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/cisco.deploy +0 -0
  169. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/cisco.order +0 -0
  170. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/cisco.rul +0 -0
  171. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/h3c.deploy +0 -0
  172. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/h3c.order +0 -0
  173. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/h3c.rul +0 -0
  174. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/huawei.deploy +0 -0
  175. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/huawei.order +0 -0
  176. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/huawei.rul +0 -0
  177. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/iosxr.deploy +0 -0
  178. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/iosxr.order +0 -0
  179. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/iosxr.rul +0 -0
  180. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/juniper.order +0 -0
  181. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/juniper.rul +0 -0
  182. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/nexus.deploy +0 -0
  183. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/nexus.order +0 -0
  184. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/nexus.rul +0 -0
  185. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/nokia.rul +0 -0
  186. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/optixtrans.deploy +0 -0
  187. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/optixtrans.order +0 -0
  188. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/optixtrans.rul +0 -0
  189. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/pc.deploy +0 -0
  190. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/pc.order +0 -0
  191. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/pc.rul +0 -0
  192. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/ribbon.deploy +0 -0
  193. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/ribbon.rul +0 -0
  194. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/routeros.order +0 -0
  195. {annet-3.18.0 → annet-3.19.0}/annet/rulebook/texts/routeros.rul +0 -0
  196. {annet-3.18.0 → annet-3.19.0}/annet/storage.py +0 -0
  197. {annet-3.18.0 → annet-3.19.0}/annet/text_term_format.py +0 -0
  198. {annet-3.18.0 → annet-3.19.0}/annet/tracing.py +0 -0
  199. {annet-3.18.0 → annet-3.19.0}/annet/types.py +0 -0
  200. {annet-3.18.0 → annet-3.19.0}/annet/vendors/__init__.py +0 -0
  201. {annet-3.18.0 → annet-3.19.0}/annet/vendors/base.py +0 -0
  202. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/__init__.py +0 -0
  203. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/arista.py +0 -0
  204. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/aruba.py +0 -0
  205. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/b4com.py +0 -0
  206. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/cisco.py +0 -0
  207. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/h3c.py +0 -0
  208. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/huawei.py +0 -0
  209. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/iosxr.py +0 -0
  210. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/juniper.py +0 -0
  211. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/nexus.py +0 -0
  212. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/nokia.py +0 -0
  213. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/optixtrans.py +0 -0
  214. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/pc.py +0 -0
  215. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/ribbon.py +0 -0
  216. {annet-3.18.0 → annet-3.19.0}/annet/vendors/library/routeros.py +0 -0
  217. {annet-3.18.0 → annet-3.19.0}/annet/vendors/registry.py +0 -0
  218. {annet-3.18.0 → annet-3.19.0}/annet/vendors/tabparser.py +0 -0
  219. {annet-3.18.0 → annet-3.19.0}/annet.egg-info/SOURCES.txt +0 -0
  220. {annet-3.18.0 → annet-3.19.0}/annet.egg-info/dependency_links.txt +0 -0
  221. {annet-3.18.0 → annet-3.19.0}/annet.egg-info/entry_points.txt +0 -0
  222. {annet-3.18.0 → annet-3.19.0}/annet.egg-info/top_level.txt +0 -0
  223. {annet-3.18.0 → annet-3.19.0}/annet_generators/__init__.py +0 -0
  224. {annet-3.18.0 → annet-3.19.0}/annet_generators/example/__init__.py +0 -0
  225. {annet-3.18.0 → annet-3.19.0}/annet_generators/example/hostname.py +0 -0
  226. {annet-3.18.0 → annet-3.19.0}/annet_generators/example/lldp.py +0 -0
  227. {annet-3.18.0 → annet-3.19.0}/annet_generators/mesh_example/__init__.py +0 -0
  228. {annet-3.18.0 → annet-3.19.0}/annet_generators/mesh_example/bgp.py +0 -0
  229. {annet-3.18.0 → annet-3.19.0}/annet_generators/mesh_example/mesh_logic.py +0 -0
  230. {annet-3.18.0 → annet-3.19.0}/annet_generators/rpl_example/__init__.py +0 -0
  231. {annet-3.18.0 → annet-3.19.0}/annet_generators/rpl_example/generator.py +0 -0
  232. {annet-3.18.0 → annet-3.19.0}/annet_generators/rpl_example/items.py +0 -0
  233. {annet-3.18.0 → annet-3.19.0}/annet_generators/rpl_example/mesh.py +0 -0
  234. {annet-3.18.0 → annet-3.19.0}/annet_generators/rpl_example/route_policy.py +0 -0
  235. {annet-3.18.0 → annet-3.19.0}/requirements.txt +0 -0
  236. {annet-3.18.0 → annet-3.19.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: annet
3
- Version: 3.18.0
3
+ Version: 3.19.0
4
4
  Summary: annet
5
5
  Home-page: https://github.com/annetutil/annet
6
6
  License: MIT
@@ -22,7 +22,8 @@ Requires-Dist: adaptix==3.0.0b7
22
22
  Requires-Dist: dataclass-rest==0.4
23
23
  Requires-Dist: ordered-set>=4.1.0
24
24
  Provides-Extra: netbox
25
- Requires-Dist: annetbox[sync]>=0.8.0; extra == "netbox"
25
+ Requires-Dist: annetbox[sync]>=0.9.0; extra == "netbox"
26
+ Requires-Dist: requests-cache>=1.2.1; extra == "netbox"
26
27
  Dynamic: home-page
27
28
  Dynamic: license
28
29
  Dynamic: license-file
@@ -1,7 +1,11 @@
1
1
  import ssl
2
2
  from ipaddress import ip_interface
3
3
  from logging import getLogger
4
- from typing import Any, Optional, List, Union, Dict, cast, Generic, TypeVar
4
+ from typing import Any, Callable, Optional, List, Union, Dict, cast, Generic, TypeVar
5
+
6
+ from requests import Session
7
+
8
+ from requests_cache import CachedSession, SQLiteCache
5
9
 
6
10
  from annetbox.v37 import models as api_models
7
11
 
@@ -45,6 +49,7 @@ class BaseNetboxStorage(
45
49
  token = ""
46
50
  self.exact_host_filter = False
47
51
  threads = 1
52
+ session_factory = None
48
53
  if opts:
49
54
  if opts.insecure:
50
55
  ctx = ssl.create_default_context()
@@ -55,7 +60,17 @@ class BaseNetboxStorage(
55
60
  threads = opts.threads
56
61
  self.exact_host_filter = opts.exact_host_filter
57
62
  self.all_hosts_filter = opts.all_hosts_filter
58
- self.netbox = self._init_adapter(url=url, token=token, ssl_context=ctx, threads=threads)
63
+
64
+ if opts.cache_path:
65
+ session_factory = cached_requests_session(opts)
66
+
67
+ self.netbox = self._init_adapter(
68
+ url=url,
69
+ token=token,
70
+ ssl_context=ctx,
71
+ threads=threads,
72
+ session_factory=session_factory,
73
+ )
59
74
  self._all_fqdns: Optional[list[str]] = None
60
75
  self._id_devices: dict[int, NetboxDeviceT] = {}
61
76
  self._name_devices: dict[str, NetboxDeviceT] = {}
@@ -67,6 +82,7 @@ class BaseNetboxStorage(
67
82
  token: str,
68
83
  ssl_context: Optional[ssl.SSLContext],
69
84
  threads: int,
85
+ session_factory: Callable[[Session], Session] | None = None,
70
86
  ) -> NetboxAdapter[NetboxDeviceT, InterfaceT, IpAddressT, PrefixT, FHRPGroupT, FHRPGroupAssignmentT]:
71
87
  raise NotImplementedError()
72
88
 
@@ -259,3 +275,16 @@ def parse_glob(exact_host_filter: bool, query: NetboxQuery) -> dict[str, list[st
259
275
  else:
260
276
  query_groups["name__ic"] = [_hostname_dot_hack(name) for name in names]
261
277
  return query_groups
278
+
279
+
280
+ def cached_requests_session(opts: NetboxStorageOpts) -> Callable[[Session], Session]:
281
+ def session_factory(session: Session) -> Session:
282
+ backend = SQLiteCache(db_path=opts.cache_path)
283
+ if opts.recache:
284
+ backend.clear()
285
+ return CachedSession.wrap(
286
+ session,
287
+ backend=backend,
288
+ expire_after=opts.cache_ttl,
289
+ )
290
+ return session_factory
@@ -1,5 +1,6 @@
1
1
  import os
2
2
  from typing import Any, Optional
3
+ from datetime import timedelta
3
4
  from .query import parse_query
4
5
 
5
6
  DEFAULT_URL = "http://localhost"
@@ -14,6 +15,9 @@ class NetboxStorageOpts:
14
15
  exact_host_filter: bool = False,
15
16
  threads: int = 1,
16
17
  all_hosts_filter: dict[str, list[str]] | None = None,
18
+ cache_path: str = "",
19
+ cache_ttl: timedelta = timedelta(0),
20
+ recache: bool = False,
17
21
  ):
18
22
  self.url = url
19
23
  self.token = token
@@ -21,6 +25,9 @@ class NetboxStorageOpts:
21
25
  self.exact_host_filter = exact_host_filter
22
26
  self.threads = threads
23
27
  self.all_hosts_filter: dict[str, list[str]] = all_hosts_filter or {}
28
+ self.cache_path = cache_path
29
+ self.cache_ttl = cache_ttl
30
+ self.recache = recache
24
31
 
25
32
  @classmethod
26
33
  def parse_params(cls, conf_params: Optional[dict[str, str]], cli_opts: Any):
@@ -41,6 +48,17 @@ class NetboxStorageOpts:
41
48
  exact_host_filter = exact_host_filter_env in ("true", "1", "t")
42
49
  else:
43
50
  exact_host_filter = bool(conf_params.get("exact_host_filter") or False)
51
+
52
+ if cache_path := os.getenv("NETBOX_CACHE_PATH"):
53
+ cache_path = cache_path
54
+ else:
55
+ cache_path = str(conf_params.get("cache_path", ""))
56
+
57
+ if cache_ttl := os.getenv("NETBOX_CACHE_TTL"):
58
+ cache_ttl = timedelta(seconds=int(cache_ttl))
59
+ else:
60
+ cache_ttl = timedelta(seconds=conf_params.get("cache_ttl", 0))
61
+
44
62
  return cls(
45
63
  url=url,
46
64
  token=token,
@@ -48,4 +66,7 @@ class NetboxStorageOpts:
48
66
  exact_host_filter=exact_host_filter,
49
67
  threads=int(threads),
50
68
  all_hosts_filter=all_hosts_filter,
69
+ cache_path=cache_path,
70
+ cache_ttl=cache_ttl,
71
+ recache=cli_opts.recache,
51
72
  )
@@ -46,7 +46,8 @@ def storage_factory(opts: NetboxStorageOpts) -> Storage:
46
46
 
47
47
  class NetboxProvider(StorageProvider, AdapterWithName, AdapterWithConfig):
48
48
  def __init__(self, url: Optional[str] = None, token: Optional[str] = None, insecure: bool = False,
49
- exact_host_filter: bool = False, threads: int = 1, all_hosts_filter: dict[str, list[str]] | None = None):
49
+ exact_host_filter: bool = False, threads: int = 1, all_hosts_filter: dict[str, list[str]] | None = None,
50
+ cache_path: str = "", cache_ttl: int = 0):
50
51
  self.url = url
51
52
  self.token = token
52
53
  self.insecure = insecure
@@ -1,4 +1,7 @@
1
1
  import ssl
2
+ from typing import Callable
3
+
4
+ from requests import Session
2
5
 
3
6
  from adaptix import P
4
7
  from adaptix.conversion import get_converter, link_function, link_constant, link
@@ -23,8 +26,9 @@ class NetboxV37Adapter(NetboxAdapter[
23
26
  token: str,
24
27
  ssl_context: ssl.SSLContext | None,
25
28
  threads: int,
29
+ session_factory: Callable[[Session], Session] | None,
26
30
  ):
27
- self.netbox = client_sync.NetboxV37(url=url, token=token, ssl_context=ssl_context, threads=threads)
31
+ self.netbox = client_sync.NetboxV37(url=url, token=token, ssl_context=ssl_context, threads=threads, session_factory=session_factory)
28
32
  self.convert_device = get_converter(
29
33
  api_models.Device,
30
34
  NetboxDeviceV37,
@@ -120,5 +124,6 @@ class NetboxStorageV37(BaseNetboxStorage[
120
124
  token: str,
121
125
  ssl_context: ssl.SSLContext | None,
122
126
  threads: int,
127
+ session_factory: Callable[[Session], Session] | None = None,
123
128
  ) -> NetboxAdapter[NetboxDeviceV37, InterfaceV37, IpAddressV37, PrefixV37, FHRPGroupV37, FHRPGroupAssignmentV37]:
124
- return NetboxV37Adapter(self, url, token, ssl_context, threads)
129
+ return NetboxV37Adapter(self, url, token, ssl_context, threads, session_factory)
@@ -1,4 +1,8 @@
1
1
  import ssl
2
+ from typing import Callable
3
+
4
+ from requests import Session
5
+
2
6
  from adaptix import P
3
7
  from adaptix.conversion import get_converter, link, link_constant, link_function
4
8
  from annetbox.v41 import client_sync
@@ -24,8 +28,9 @@ class NetboxV41Adapter(NetboxAdapter[
24
28
  token: str,
25
29
  ssl_context: ssl.SSLContext | None,
26
30
  threads: int,
31
+ session_factory: Callable[[Session], Session] | None,
27
32
  ):
28
- self.netbox = client_sync.NetboxV41(url=url, token=token, ssl_context=ssl_context, threads=threads)
33
+ self.netbox = client_sync.NetboxV41(url=url, token=token, ssl_context=ssl_context, threads=threads, session_factory=session_factory)
29
34
  self.convert_device = get_converter(
30
35
  api_models.Device,
31
36
  NetboxDeviceV41,
@@ -122,5 +127,6 @@ class NetboxStorageV41(BaseNetboxStorage[
122
127
  token: str,
123
128
  ssl_context: ssl.SSLContext | None,
124
129
  threads: int,
130
+ session_factory: Callable[[Session], Session] | None = None,
125
131
  ) -> NetboxAdapter[NetboxDeviceV41, InterfaceV41, IpAddressV41, PrefixV41, FHRPGroupV41, FHRPGroupAssignmentV41]:
126
- return NetboxV41Adapter(self, url, token, ssl_context, threads)
132
+ return NetboxV41Adapter(self, url, token, ssl_context, threads, session_factory)
@@ -1,5 +1,7 @@
1
1
  import ssl
2
- from typing import Optional
2
+ from typing import Callable, Optional
3
+
4
+ from requests import Session
3
5
 
4
6
  from adaptix import P
5
7
  from adaptix.conversion import get_converter, link, link_constant, link_function
@@ -25,8 +27,9 @@ class NetboxV42Adapter(NetboxAdapter[
25
27
  token: str,
26
28
  ssl_context: ssl.SSLContext | None,
27
29
  threads: int,
30
+ session_factory: Callable[[Session], Session] | None,
28
31
  ):
29
- self.netbox = client_sync.NetboxV42(url=url, token=token, ssl_context=ssl_context, threads=threads)
32
+ self.netbox = client_sync.NetboxV42(url=url, token=token, ssl_context=ssl_context, threads=threads, session_factory=session_factory)
30
33
  self.convert_device = get_converter(
31
34
  api_models.Device,
32
35
  NetboxDeviceV42,
@@ -136,11 +139,12 @@ class NetboxStorageV42(BaseNetboxStorage[
136
139
  token: str,
137
140
  ssl_context: ssl.SSLContext | None,
138
141
  threads: int,
142
+ session_factory: Callable[[Session], Session] | None = None,
139
143
  ) -> NetboxAdapter[
140
144
  NetboxDeviceV42, InterfaceV42, IpAddressV42, PrefixV42,
141
145
  FHRPGroupV41, FHRPGroupAssignmentV41,
142
146
  ]:
143
- return NetboxV42Adapter(self, url, token, ssl_context, threads)
147
+ return NetboxV42Adapter(self, url, token, ssl_context, threads, session_factory)
144
148
 
145
149
  def resolve_all_vlans(self) -> list[Vlan]:
146
150
  if self._all_vlans is None:
@@ -140,6 +140,12 @@ opt_tolerate_fails = Arg(
140
140
  help="Show errors without interrupting the generation"
141
141
  )
142
142
 
143
+ opt_recache = Arg(
144
+ "--recache", default=False,
145
+ help="Force expiration of storage's local cache if it is supported"
146
+ )
147
+
148
+
143
149
  # При параллельном запуске и включённом --tolerate-fails код возврата
144
150
  # всегда нулевой. Это не позволяет нам легко понять, прошла ли генерация
145
151
  # успешно для всех устройств. С этим флажком код будет ненулевой, если
@@ -353,6 +359,7 @@ opt_selected_context_name = Arg(
353
359
 
354
360
  # ====
355
361
  class CacheOptions(ArgGroup):
362
+ recache = opt_recache
356
363
  no_mesh = False
357
364
 
358
365
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: annet
3
- Version: 3.18.0
3
+ Version: 3.19.0
4
4
  Summary: annet
5
5
  Home-page: https://github.com/annetutil/annet
6
6
  License: MIT
@@ -22,7 +22,8 @@ Requires-Dist: adaptix==3.0.0b7
22
22
  Requires-Dist: dataclass-rest==0.4
23
23
  Requires-Dist: ordered-set>=4.1.0
24
24
  Provides-Extra: netbox
25
- Requires-Dist: annetbox[sync]>=0.8.0; extra == "netbox"
25
+ Requires-Dist: annetbox[sync]>=0.9.0; extra == "netbox"
26
+ Requires-Dist: requests-cache>=1.2.1; extra == "netbox"
26
27
  Dynamic: home-page
27
28
  Dynamic: license
28
29
  Dynamic: license-file
@@ -14,4 +14,5 @@ dataclass-rest==0.4
14
14
  ordered-set>=4.1.0
15
15
 
16
16
  [netbox]
17
- annetbox[sync]>=0.8.0
17
+ annetbox[sync]>=0.9.0
18
+ requests-cache>=1.2.1
@@ -44,7 +44,10 @@ if __name__ == "__main__":
44
44
  ],
45
45
  },
46
46
  extras_require={
47
- "netbox": ["annetbox[sync]>=0.8.0"],
47
+ "netbox": [
48
+ "annetbox[sync]>=0.9.0",
49
+ "requests-cache>=1.2.1",
50
+ ],
48
51
  },
49
52
  python_requires=">=3.10",
50
53
  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