annet 0.2__py3-none-any.whl → 0.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of annet might be problematic. Click here for more details.

@@ -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)
annet/gen.py CHANGED
@@ -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
@@ -8,7 +8,7 @@ annet/deploy.py,sha256=KYbq_EbO6-dwJT6r3Ou6JhJmZIiwFWHrlJt6AlCtc0I,15319
8
8
  annet/diff.py,sha256=0QG_3Ur5k7ajRuWUrM089yt_Fxss06OTBSUE3h54Nxw,3460
9
9
  annet/executor.py,sha256=bw7COJNtssuxIqbQehlHYJnkdUeYvvL8WO5B-c67XE0,19040
10
10
  annet/filtering.py,sha256=F4ZKUCU3Yb1RlL2zKdyHtVUaWPzjWF4vWyMcdygKNYk,852
11
- annet/gen.py,sha256=bqrz1Ef8Z61ezqPCotRyZgZPCPTnM7v2mesNFScws04,31370
11
+ annet/gen.py,sha256=Dfh8pGyLoGl9eN5MKP0YolFpE4grTSA9SnHIhFoQQrY,31419
12
12
  annet/hardware.py,sha256=HYPDfji_GdRn5S0_0fl4rvM7byOY9aHxG6VMAtsLaxE,1090
13
13
  annet/implicit.py,sha256=QigK4uoxvrFho2h9yFjOq1d9rLsC5xFlAU4bKkCuMWk,5139
14
14
  annet/lib.py,sha256=zQIfNBg7fAAk2BHbHAqy_McAiXhz0RqpBAcfdU-6pAA,3742
@@ -34,7 +34,7 @@ annet/annlib/tabparser.py,sha256=bhYbuGJIg6VP5CLiq09UZjgrenP9DegKvw_kYy-Hus0,229
34
34
  annet/annlib/types.py,sha256=VHU0CBADfYmO0xzB_c5f-mcuU3dUumuJczQnqGlib9M,852
35
35
  annet/annlib/netdev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
36
  annet/annlib/netdev/db.py,sha256=fI_u5aya4l61mbYSjj4JwlVfi3s7obt2jqERSuXGRUI,1634
37
- annet/annlib/netdev/devdb/__init__.py,sha256=x0LlxU6kkF6WoIg-Uctthdeg2uMGEJyWoeP6mwe1zFI,863
37
+ annet/annlib/netdev/devdb/__init__.py,sha256=aKYjjLbJebdKBjnGDpVLQdSqrV2JL24spGm58tmMWVU,892
38
38
  annet/annlib/netdev/devdb/data/devdb.json,sha256=DJ0IsXqEvnuf27nL3qaQ6VseX_deSfROkOPijQjF86U,4733
39
39
  annet/annlib/netdev/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  annet/annlib/netdev/views/dump.py,sha256=XJ6UO6sYSO5pIoe5R4eTQmKwx0_JJ71_h8QSYAURtyk,4184
@@ -50,7 +50,7 @@ annet/annlib/rulebook/common.py,sha256=9kCZwZpsH5UliF2OzaN9nLs2eLlz_d__4L7_oZ3Sr
50
50
  annet/api/__init__.py,sha256=mvrGvcZDPvPvhreJa_fTFCwf7zo9R7NX4nWduBm5lB4,33212
51
51
  annet/configs/context.yml,sha256=nt4QnzYzrG2hqmaWOUsab2wgFl-CXmFSzbto6rqqFt4,291
52
52
  annet/configs/logging.yaml,sha256=Hu42lRK248dssp9TgkbHCaZNl0E6f4IChGb0XaQnTVo,970
53
- annet/generators/__init__.py,sha256=ZIfbOODbPY1vycwh5nXVuErqAEESLpGd_V9Q9CdbiB8,34040
53
+ annet/generators/__init__.py,sha256=7yp4OxluAMSozXRaDPabDqfyGJDh4YJXKcAb4KYEzyM,34049
54
54
  annet/generators/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
55
  annet/generators/common/initial.py,sha256=XI7uWLMuLrHC-uXm38oRbM1YVuELAvMHLZFHM9x5IF8,1229
56
56
  annet/rulebook/__init__.py,sha256=14IpOfTbeJtre7JKrfXVYiH0qAXsUSOL7AatUFmSQs0,3847
@@ -104,10 +104,10 @@ annet_generators/example/__init__.py,sha256=zVd8_DrXuOASrNzg2Ab94rPyvJff83L-_Hpp
104
104
  annet_generators/example/lldp.py,sha256=4zcI8QnB8KDd8NTJeVVUUpzf317VA1bznOEN-02VpeY,1145
105
105
  annet_nbexport/__init__.py,sha256=-repcOrdwQQWzzJ2yCngdiNHSw5qJWis7vogRBX9cRI,6380
106
106
  annet_nbexport/main.py,sha256=f65WKdS2xvbttllCe5IYkoenPEy8C4SzvNydhh4ZEVM,1216
107
- annet-0.2.dist-info/AUTHORS,sha256=rh3w5P6gEgqmuC-bw-HB68vBCr-yIBFhVL0PG4hguLs,878
108
- annet-0.2.dist-info/LICENSE,sha256=yPxl7dno02Pw7gAcFPIFONzx_gapwDoPXsIsh6Y7lC0,1079
109
- annet-0.2.dist-info/METADATA,sha256=Jc61sYYT5rccjP2Q0YznZs0GxXtM5_lnGaT1zzD-2pA,622
110
- annet-0.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
111
- annet-0.2.dist-info/entry_points.txt,sha256=g_pJ55300jUXfafHl7izmDJ6RVSo6iW9IaNfysM3Y0w,151
112
- annet-0.2.dist-info/top_level.txt,sha256=uL47QByRwuZV5yWC58gd4IkHM8sVSAJ1pZb-6W-gMfY,38
113
- annet-0.2.dist-info/RECORD,,
107
+ annet-0.4.dist-info/AUTHORS,sha256=rh3w5P6gEgqmuC-bw-HB68vBCr-yIBFhVL0PG4hguLs,878
108
+ annet-0.4.dist-info/LICENSE,sha256=yPxl7dno02Pw7gAcFPIFONzx_gapwDoPXsIsh6Y7lC0,1079
109
+ annet-0.4.dist-info/METADATA,sha256=UZc-0RdANw3-KdBDv71AuIHIp2drehmIM7uDP2gkUZM,622
110
+ annet-0.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
111
+ annet-0.4.dist-info/entry_points.txt,sha256=g_pJ55300jUXfafHl7izmDJ6RVSo6iW9IaNfysM3Y0w,151
112
+ annet-0.4.dist-info/top_level.txt,sha256=uL47QByRwuZV5yWC58gd4IkHM8sVSAJ1pZb-6W-gMfY,38
113
+ annet-0.4.dist-info/RECORD,,
File without changes
File without changes
File without changes