annet 0.2__tar.gz → 0.4__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 (120) hide show
  1. {annet-0.2/annet.egg-info → annet-0.4}/PKG-INFO +1 -1
  2. {annet-0.2 → annet-0.4}/README.md +3 -3
  3. {annet-0.2 → annet-0.4}/annet/annlib/netdev/devdb/__init__.py +1 -1
  4. {annet-0.2 → annet-0.4}/annet/gen.py +3 -1
  5. {annet-0.2 → annet-0.4}/annet/generators/__init__.py +1 -1
  6. {annet-0.2 → annet-0.4/annet.egg-info}/PKG-INFO +1 -1
  7. {annet-0.2 → annet-0.4}/setup.py +1 -1
  8. {annet-0.2 → annet-0.4}/AUTHORS +0 -0
  9. {annet-0.2 → annet-0.4}/LICENSE +0 -0
  10. {annet-0.2 → annet-0.4}/MANIFEST.in +0 -0
  11. {annet-0.2 → annet-0.4}/annet/__init__.py +0 -0
  12. {annet-0.2 → annet-0.4}/annet/annet.py +0 -0
  13. {annet-0.2 → annet-0.4}/annet/annlib/__init__.py +0 -0
  14. {annet-0.2 → annet-0.4}/annet/annlib/command.py +0 -0
  15. {annet-0.2 → annet-0.4}/annet/annlib/diff.py +0 -0
  16. {annet-0.2 → annet-0.4}/annet/annlib/errors.py +0 -0
  17. {annet-0.2 → annet-0.4}/annet/annlib/filter_acl.py +0 -0
  18. {annet-0.2 → annet-0.4}/annet/annlib/jsontools.py +0 -0
  19. {annet-0.2 → annet-0.4}/annet/annlib/lib.py +0 -0
  20. {annet-0.2 → annet-0.4}/annet/annlib/netdev/__init__.py +0 -0
  21. {annet-0.2 → annet-0.4}/annet/annlib/netdev/db.py +0 -0
  22. {annet-0.2 → annet-0.4}/annet/annlib/netdev/devdb/data/devdb.json +0 -0
  23. {annet-0.2 → annet-0.4}/annet/annlib/netdev/views/__init__.py +0 -0
  24. {annet-0.2 → annet-0.4}/annet/annlib/netdev/views/dump.py +0 -0
  25. {annet-0.2 → annet-0.4}/annet/annlib/netdev/views/hardware.py +0 -0
  26. {annet-0.2 → annet-0.4}/annet/annlib/output.py +0 -0
  27. {annet-0.2 → annet-0.4}/annet/annlib/patching.py +0 -0
  28. {annet-0.2 → annet-0.4}/annet/annlib/rbparser/__init__.py +0 -0
  29. {annet-0.2 → annet-0.4}/annet/annlib/rbparser/acl.py +0 -0
  30. {annet-0.2 → annet-0.4}/annet/annlib/rbparser/deploying.py +0 -0
  31. {annet-0.2 → annet-0.4}/annet/annlib/rbparser/ordering.py +0 -0
  32. {annet-0.2 → annet-0.4}/annet/annlib/rbparser/platform.py +0 -0
  33. {annet-0.2 → annet-0.4}/annet/annlib/rbparser/syntax.py +0 -0
  34. {annet-0.2 → annet-0.4}/annet/annlib/rulebook/__init__.py +0 -0
  35. {annet-0.2 → annet-0.4}/annet/annlib/rulebook/common.py +0 -0
  36. {annet-0.2 → annet-0.4}/annet/annlib/tabparser.py +0 -0
  37. {annet-0.2 → annet-0.4}/annet/annlib/types.py +0 -0
  38. {annet-0.2 → annet-0.4}/annet/api/__init__.py +0 -0
  39. {annet-0.2 → annet-0.4}/annet/argparse.py +0 -0
  40. {annet-0.2 → annet-0.4}/annet/cli.py +0 -0
  41. {annet-0.2 → annet-0.4}/annet/cli_args.py +0 -0
  42. {annet-0.2 → annet-0.4}/annet/configs/context.yml +0 -0
  43. {annet-0.2 → annet-0.4}/annet/configs/logging.yaml +0 -0
  44. {annet-0.2 → annet-0.4}/annet/connectors.py +0 -0
  45. {annet-0.2 → annet-0.4}/annet/deploy.py +0 -0
  46. {annet-0.2 → annet-0.4}/annet/diff.py +0 -0
  47. {annet-0.2 → annet-0.4}/annet/executor.py +0 -0
  48. {annet-0.2 → annet-0.4}/annet/filtering.py +0 -0
  49. {annet-0.2 → annet-0.4}/annet/generators/common/__init__.py +0 -0
  50. {annet-0.2 → annet-0.4}/annet/generators/common/initial.py +0 -0
  51. {annet-0.2 → annet-0.4}/annet/hardware.py +0 -0
  52. {annet-0.2 → annet-0.4}/annet/implicit.py +0 -0
  53. {annet-0.2 → annet-0.4}/annet/lib.py +0 -0
  54. {annet-0.2 → annet-0.4}/annet/output.py +0 -0
  55. {annet-0.2 → annet-0.4}/annet/parallel.py +0 -0
  56. {annet-0.2 → annet-0.4}/annet/patching.py +0 -0
  57. {annet-0.2 → annet-0.4}/annet/reference.py +0 -0
  58. {annet-0.2 → annet-0.4}/annet/rulebook/__init__.py +0 -0
  59. {annet-0.2 → annet-0.4}/annet/rulebook/arista/__init__.py +0 -0
  60. {annet-0.2 → annet-0.4}/annet/rulebook/arista/iface.py +0 -0
  61. {annet-0.2 → annet-0.4}/annet/rulebook/aruba/__init__.py +0 -0
  62. {annet-0.2 → annet-0.4}/annet/rulebook/aruba/ap_env.py +0 -0
  63. {annet-0.2 → annet-0.4}/annet/rulebook/aruba/misc.py +0 -0
  64. {annet-0.2 → annet-0.4}/annet/rulebook/cisco/__init__.py +0 -0
  65. {annet-0.2 → annet-0.4}/annet/rulebook/cisco/iface.py +0 -0
  66. {annet-0.2 → annet-0.4}/annet/rulebook/cisco/misc.py +0 -0
  67. {annet-0.2 → annet-0.4}/annet/rulebook/cisco/vlandb.py +0 -0
  68. {annet-0.2 → annet-0.4}/annet/rulebook/common.py +0 -0
  69. {annet-0.2 → annet-0.4}/annet/rulebook/deploying.py +0 -0
  70. {annet-0.2 → annet-0.4}/annet/rulebook/huawei/__init__.py +0 -0
  71. {annet-0.2 → annet-0.4}/annet/rulebook/huawei/aaa.py +0 -0
  72. {annet-0.2 → annet-0.4}/annet/rulebook/huawei/bgp.py +0 -0
  73. {annet-0.2 → annet-0.4}/annet/rulebook/huawei/iface.py +0 -0
  74. {annet-0.2 → annet-0.4}/annet/rulebook/huawei/misc.py +0 -0
  75. {annet-0.2 → annet-0.4}/annet/rulebook/huawei/vlandb.py +0 -0
  76. {annet-0.2 → annet-0.4}/annet/rulebook/juniper/__init__.py +0 -0
  77. {annet-0.2 → annet-0.4}/annet/rulebook/nexus/__init__.py +0 -0
  78. {annet-0.2 → annet-0.4}/annet/rulebook/nexus/iface.py +0 -0
  79. {annet-0.2 → annet-0.4}/annet/rulebook/patching.py +0 -0
  80. {annet-0.2 → annet-0.4}/annet/rulebook/ribbon/__init__.py +0 -0
  81. {annet-0.2 → annet-0.4}/annet/rulebook/texts/arista.deploy +0 -0
  82. {annet-0.2 → annet-0.4}/annet/rulebook/texts/arista.order +0 -0
  83. {annet-0.2 → annet-0.4}/annet/rulebook/texts/arista.rul +0 -0
  84. {annet-0.2 → annet-0.4}/annet/rulebook/texts/aruba.deploy +0 -0
  85. {annet-0.2 → annet-0.4}/annet/rulebook/texts/aruba.order +0 -0
  86. {annet-0.2 → annet-0.4}/annet/rulebook/texts/aruba.rul +0 -0
  87. {annet-0.2 → annet-0.4}/annet/rulebook/texts/cisco.deploy +0 -0
  88. {annet-0.2 → annet-0.4}/annet/rulebook/texts/cisco.order +0 -0
  89. {annet-0.2 → annet-0.4}/annet/rulebook/texts/cisco.rul +0 -0
  90. {annet-0.2 → annet-0.4}/annet/rulebook/texts/huawei.deploy +0 -0
  91. {annet-0.2 → annet-0.4}/annet/rulebook/texts/huawei.order +0 -0
  92. {annet-0.2 → annet-0.4}/annet/rulebook/texts/huawei.rul +0 -0
  93. {annet-0.2 → annet-0.4}/annet/rulebook/texts/juniper.rul +0 -0
  94. {annet-0.2 → annet-0.4}/annet/rulebook/texts/nexus.deploy +0 -0
  95. {annet-0.2 → annet-0.4}/annet/rulebook/texts/nexus.order +0 -0
  96. {annet-0.2 → annet-0.4}/annet/rulebook/texts/nexus.rul +0 -0
  97. {annet-0.2 → annet-0.4}/annet/rulebook/texts/nokia.rul +0 -0
  98. {annet-0.2 → annet-0.4}/annet/rulebook/texts/pc.order +0 -0
  99. {annet-0.2 → annet-0.4}/annet/rulebook/texts/pc.rul +0 -0
  100. {annet-0.2 → annet-0.4}/annet/rulebook/texts/ribbon.deploy +0 -0
  101. {annet-0.2 → annet-0.4}/annet/rulebook/texts/ribbon.rul +0 -0
  102. {annet-0.2 → annet-0.4}/annet/rulebook/texts/routeros.order +0 -0
  103. {annet-0.2 → annet-0.4}/annet/rulebook/texts/routeros.rul +0 -0
  104. {annet-0.2 → annet-0.4}/annet/storage.py +0 -0
  105. {annet-0.2 → annet-0.4}/annet/tabparser.py +0 -0
  106. {annet-0.2 → annet-0.4}/annet/text_term_format.py +0 -0
  107. {annet-0.2 → annet-0.4}/annet/tracing.py +0 -0
  108. {annet-0.2 → annet-0.4}/annet/types.py +0 -0
  109. {annet-0.2 → annet-0.4}/annet.egg-info/SOURCES.txt +0 -0
  110. {annet-0.2 → annet-0.4}/annet.egg-info/dependency_links.txt +0 -0
  111. {annet-0.2 → annet-0.4}/annet.egg-info/entry_points.txt +0 -0
  112. {annet-0.2 → annet-0.4}/annet.egg-info/requires.txt +0 -0
  113. {annet-0.2 → annet-0.4}/annet.egg-info/top_level.txt +0 -0
  114. {annet-0.2 → annet-0.4}/annet_generators/__init__.py +0 -0
  115. {annet-0.2 → annet-0.4}/annet_generators/example/__init__.py +0 -0
  116. {annet-0.2 → annet-0.4}/annet_generators/example/lldp.py +0 -0
  117. {annet-0.2 → annet-0.4}/annet_nbexport/__init__.py +0 -0
  118. {annet-0.2 → annet-0.4}/annet_nbexport/main.py +0 -0
  119. {annet-0.2 → annet-0.4}/requirements.txt +0 -0
  120. {annet-0.2 → annet-0.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: annet
3
- Version: 0.2
3
+ Version: 0.4
4
4
  Summary: annet
5
5
  Home-page: https://github.com/annetutil/annet
6
6
  License: MIT
@@ -5,9 +5,9 @@ Huawei, Cisco IOS, Cisco NX-OS, Cisco IOS-XR, Juniper, as well as devices config
5
5
 
6
6
  annet has a number of modes (subcommands):
7
7
 
8
- - ```annet gen`` - generates the entire config for the specified devices or specified parts of it
9
- - ```annet diff`` - first does gen and then builds diff with current config version
10
- - ```annet patch`` - first does diff and then generates a list of commands to apply diff on the device
8
+ - ```annet gen``` - generates the entire config for the specified devices or specified parts of it
9
+ - ```annet diff``` - first does gen and then builds diff with current config version
10
+ - ```annet patch``` - first does diff and then generates a list of commands to apply diff on the device
11
11
 
12
12
  Usage help can be obtained by calling ```annet -h``` or for a specific command, such as ```annet gen -h```.
13
13
 
@@ -21,7 +21,7 @@ def parse_hw_model(hw_model):
21
21
  def _prepare_db() -> Dict[str, Any]:
22
22
  try:
23
23
  from library.python import resource
24
- raw = json.loads(resource.find("resfs/file/netdev/devdb/data/devdb.json").decode("utf-8"))
24
+ raw = json.loads(resource.resfs_read("contrib/python/annet/annet/annlib/netdev/devdb/data/devdb.json").decode("utf-8"))
25
25
  except ImportError:
26
26
  with open(path.join(path.dirname(__file__), "data", "devdb.json"), "r") as f:
27
27
  raw = json.load(f)
@@ -704,7 +704,9 @@ def _old_new_get_config_files(ctx: OldNewDeviceContext, device: Device) -> Devic
704
704
  return old_files
705
705
  if ctx.config == "running":
706
706
  old_files_running = ctx.downloaded_files.get(device)
707
- if old_files_running and old_files_running.is_empty():
707
+ if not old_files_running:
708
+ return old_files
709
+ if old_files_running.is_empty():
708
710
  exc = (ctx.failed_files.get(device) or
709
711
  Exception("I can't get device files and I don't know why"))
710
712
  get_logger(host=device.hostname).error(str(exc))
@@ -801,7 +801,7 @@ class Entire(BaseGenerator):
801
801
  def get_reload_cmds(self, device) -> str:
802
802
  ret = self.reload(device) or ""
803
803
  path = self.path(device)
804
- if path and device.hw.PC and device.hw.soft.startswith(("Cumulus", "SwitchDev")):
804
+ if path and device.hw.PC and device.hw.soft.startswith(("Cumulus", "SwitchDev", "SONiC")):
805
805
  parts = []
806
806
  if ret:
807
807
  parts.append(ret)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: annet
3
- Version: 0.2
3
+ Version: 0.4
4
4
  Summary: annet
5
5
  Home-page: https://github.com/annetutil/annet
6
6
  License: MIT
@@ -17,7 +17,7 @@ def requirements() -> str:
17
17
  if __name__ == "__main__":
18
18
  setuptools.setup(
19
19
  name="annet",
20
- version="0.2",
20
+ version="0.4",
21
21
  description="annet",
22
22
  license="MIT",
23
23
  url="https://github.com/annetutil/annet",
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes