annet 0.16.0__py3-none-any.whl → 0.16.1__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.
- annet/adapters/netbox/common/models.py +6 -6
- annet/adapters/netbox/common/storage_opts.py +2 -2
- annet/cli.py +2 -2
- annet/deploy.py +1 -1
- {annet-0.16.0.dist-info → annet-0.16.1.dist-info}/METADATA +1 -1
- {annet-0.16.0.dist-info → annet-0.16.1.dist-info}/RECORD +11 -11
- {annet-0.16.0.dist-info → annet-0.16.1.dist-info}/AUTHORS +0 -0
- {annet-0.16.0.dist-info → annet-0.16.1.dist-info}/LICENSE +0 -0
- {annet-0.16.0.dist-info → annet-0.16.1.dist-info}/WHEEL +0 -0
- {annet-0.16.0.dist-info → annet-0.16.1.dist-info}/entry_points.txt +0 -0
- {annet-0.16.0.dist-info → annet-0.16.1.dist-info}/top_level.txt +0 -0
|
@@ -52,17 +52,17 @@ class DeviceIp(DumpableView):
|
|
|
52
52
|
class Prefix(DumpableView):
|
|
53
53
|
id: int
|
|
54
54
|
prefix: str
|
|
55
|
-
site: Entity
|
|
56
|
-
vrf: Entity
|
|
57
|
-
tenant: Entity
|
|
58
|
-
vlan: Entity
|
|
59
|
-
role: Entity
|
|
55
|
+
site: Optional[Entity]
|
|
56
|
+
vrf: Optional[Entity]
|
|
57
|
+
tenant: Optional[Entity]
|
|
58
|
+
vlan: Optional[Entity]
|
|
59
|
+
role: Optional[Entity]
|
|
60
60
|
status: Label
|
|
61
61
|
is_pool: bool
|
|
62
62
|
custom_fields: dict[str, Any]
|
|
63
63
|
created: datetime
|
|
64
64
|
last_updated: datetime
|
|
65
|
-
description: str
|
|
65
|
+
description: Optional[str] = ""
|
|
66
66
|
|
|
67
67
|
@property
|
|
68
68
|
def _dump__list_key(self):
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import os
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any, Optional
|
|
3
3
|
|
|
4
4
|
DEFAULT_URL = "http://localhost"
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ class NetboxStorageOpts:
|
|
|
10
10
|
self.token = token
|
|
11
11
|
|
|
12
12
|
@classmethod
|
|
13
|
-
def parse_params(cls, conf_params: dict[str, str]
|
|
13
|
+
def parse_params(cls, conf_params: Optional[dict[str, str]], cli_opts: Any):
|
|
14
14
|
url = os.getenv("NETBOX_URL") or conf_params.get("url") or DEFAULT_URL
|
|
15
15
|
token = os.getenv("NETBOX_TOKEN", "").strip() or conf_params.get("token") or ""
|
|
16
16
|
return cls(url=url, token=token)
|
annet/cli.py
CHANGED
|
@@ -8,7 +8,7 @@ import subprocess
|
|
|
8
8
|
import shutil
|
|
9
9
|
import sys
|
|
10
10
|
from contextlib import ExitStack, contextmanager
|
|
11
|
-
from typing import Tuple, Iterable
|
|
11
|
+
from typing import Optional, Tuple, Iterable
|
|
12
12
|
|
|
13
13
|
import tabulate
|
|
14
14
|
import yaml
|
|
@@ -129,7 +129,7 @@ def show_generators(args: cli_args.ShowGeneratorsOptions):
|
|
|
129
129
|
""" List applicable generators (for a device if query is set) """
|
|
130
130
|
arg_gens = cli_args.GenOptions(args)
|
|
131
131
|
with get_loader(arg_gens, args) as loader:
|
|
132
|
-
device: Device
|
|
132
|
+
device: Optional[Device] = None
|
|
133
133
|
devices = loader.devices
|
|
134
134
|
if len(devices) == 1:
|
|
135
135
|
device = devices[0]
|
annet/deploy.py
CHANGED
|
@@ -481,7 +481,7 @@ def make_cmd_params(rule: Dict[str, Any]) -> Dict[str, Any]:
|
|
|
481
481
|
}
|
|
482
482
|
|
|
483
483
|
|
|
484
|
-
def make_apply_commands(rule: dict, hw: HardwareView, do_commit: bool, do_finalize: bool, path: str
|
|
484
|
+
def make_apply_commands(rule: dict, hw: HardwareView, do_commit: bool, do_finalize: bool, path: Optional[str] = None):
|
|
485
485
|
apply_logic = rule["attrs"]["apply_logic"]
|
|
486
486
|
before, after = apply_logic(hw, do_commit=do_commit, do_finalize=do_finalize, path=path)
|
|
487
487
|
return before, after
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
annet/__init__.py,sha256=k2dq8aOYjkjZszKoOlxEmR49uYoKh-8_HC2K8FeqLwA,2139
|
|
2
2
|
annet/annet.py,sha256=TMdEuM7GJQ4TjRVmuK3bCTZN-21lxjQ9sXqEdILUuBk,725
|
|
3
3
|
annet/argparse.py,sha256=v1MfhjR0B8qahza0WinmXClpR8UiDFhmwDDWtNroJPA,12855
|
|
4
|
-
annet/cli.py,sha256=
|
|
4
|
+
annet/cli.py,sha256=hDpjIr3w47lgQ_CvCQS1SXFDK-SJrf5slbT__5u6GIA,12342
|
|
5
5
|
annet/cli_args.py,sha256=KQlihxSl-Phhq1-9oJDdNSbIllEX55LlPfH6viEKOuw,13483
|
|
6
6
|
annet/connectors.py,sha256=_DY5JwR_uU_obOpzo2a_JsexIE-lbNjG1Hq2nOpQm4w,5067
|
|
7
|
-
annet/deploy.py,sha256=
|
|
7
|
+
annet/deploy.py,sha256=pM7r8ipk7y-b4OIenc8FMqZpy5F6TmKdo8DDUJNRBlY,18956
|
|
8
8
|
annet/diff.py,sha256=zLcaCnb4lZRUb7frpH1CstQ3kacRcCblZs1uLG8J5lk,3391
|
|
9
9
|
annet/executor.py,sha256=FrYAUuh2TpSVX42SlTN_PhuSHmXG4Wj1nieY9Wqv9so,19122
|
|
10
10
|
annet/filtering.py,sha256=ZtqxPsKdV9reZoRxtQyBg22BqyMqd-2SotYcxZ-68AQ,903
|
|
@@ -27,10 +27,10 @@ annet/adapters/netbox/provider.py,sha256=mnvxSy3vTwdEHvzfy_Tfji4J4-BDmiKwkcF0s-E
|
|
|
27
27
|
annet/adapters/netbox/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
28
|
annet/adapters/netbox/common/client.py,sha256=-lWZmphD-OPuLIHNKhW_h2bnjrVaiyKYAD_MUPasEbo,2483
|
|
29
29
|
annet/adapters/netbox/common/manufacturer.py,sha256=WZsBfHq6kohbbkszxPARjMdXB5rWGBO4Gz1rA-IlqL8,1555
|
|
30
|
-
annet/adapters/netbox/common/models.py,sha256=
|
|
30
|
+
annet/adapters/netbox/common/models.py,sha256=uAUTzyZk9-B4xdVGCe2nSSBO8PXAiUYvYHOTnQAdQbU,3289
|
|
31
31
|
annet/adapters/netbox/common/query.py,sha256=ziUFM7cUEbEIf3k1szTll4aO-OCUa-2Ogxbebi7Tegs,646
|
|
32
32
|
annet/adapters/netbox/common/status_client.py,sha256=W4nTb2yvBlJ2UkWUmUhKQ2PaSQb1shjhHj5ebb4s2s4,591
|
|
33
|
-
annet/adapters/netbox/common/storage_opts.py,sha256=
|
|
33
|
+
annet/adapters/netbox/common/storage_opts.py,sha256=iadgWGMb-rfSp3SnFAw8SH5bMKjwvcAsJ74v_z0CCXQ,507
|
|
34
34
|
annet/adapters/netbox/v24/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
35
|
annet/adapters/netbox/v24/storage.py,sha256=THI592VLx3ehixsPZQ1Ko3mYIAZQbnDY-toIziqBbL8,6005
|
|
36
36
|
annet/adapters/netbox/v37/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -133,10 +133,10 @@ annet/rulebook/texts/routeros.rul,sha256=ipfxjj0mjFef6IsUlupqx4BY_Je_OUb8u_U1019
|
|
|
133
133
|
annet_generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
134
134
|
annet_generators/example/__init__.py,sha256=zVd8_DrXuOASrNzg2Ab94rPyvJff83L-_HppDFxnUjM,228
|
|
135
135
|
annet_generators/example/lldp.py,sha256=24bGvShxbio-JxUdaehyPRu31LhH9YwSwFDrWVRn6yo,2100
|
|
136
|
-
annet-0.16.
|
|
137
|
-
annet-0.16.
|
|
138
|
-
annet-0.16.
|
|
139
|
-
annet-0.16.
|
|
140
|
-
annet-0.16.
|
|
141
|
-
annet-0.16.
|
|
142
|
-
annet-0.16.
|
|
136
|
+
annet-0.16.1.dist-info/AUTHORS,sha256=rh3w5P6gEgqmuC-bw-HB68vBCr-yIBFhVL0PG4hguLs,878
|
|
137
|
+
annet-0.16.1.dist-info/LICENSE,sha256=yPxl7dno02Pw7gAcFPIFONzx_gapwDoPXsIsh6Y7lC0,1079
|
|
138
|
+
annet-0.16.1.dist-info/METADATA,sha256=fBLYdAEadQVUPbjdikTJS2OOmaMiWWvIgrGgEv4nLY8,694
|
|
139
|
+
annet-0.16.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
140
|
+
annet-0.16.1.dist-info/entry_points.txt,sha256=5lIaDGlGi3l6QQ2ry2jZaqViP5Lvt8AmsegdD0Uznck,192
|
|
141
|
+
annet-0.16.1.dist-info/top_level.txt,sha256=QsoTZBsUtwp_FEcmRwuN8QITBmLOZFqjssRfKilGbP8,23
|
|
142
|
+
annet-0.16.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|