nbforager 0.8.5__tar.gz → 0.8.7__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.
- {nbforager-0.8.5 → nbforager-0.8.7}/PKG-INFO +2 -2
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/ipv4.py +20 -9
- {nbforager-0.8.5 → nbforager-0.8.7}/pyproject.toml +2 -2
- {nbforager-0.8.5 → nbforager-0.8.7}/LICENSE.txt +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/README.rst +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/__init__.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/__init__.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/base_ac.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/base_c.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/circuits.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/connector.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/core.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/dcim.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/extended_get.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/extras.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/ip_addresses.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/ipam.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/plugins_ca.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/status.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/tenancy.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/users.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/virtualization.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/api/wireless.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/constants.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/exceptions.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/__init__.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/base_fa.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/circuits.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/core.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/dcim.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/extras.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/forager.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/ipam.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/joiner.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/tenancy.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/users.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/virtualization.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/foragers/wireless.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/helpers.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/log.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/messages.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/nb_api.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/nb_cache.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/nb_forager.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/nb_tree.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/parser/__init__.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/parser/nb_custom.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/parser/nb_parser.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/parser/nb_value.py +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/py.typed +0 -0
- {nbforager-0.8.5 → nbforager-0.8.7}/nbforager/types_.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: nbforager
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.7
|
4
4
|
Summary: Python package designed to assist in working with the Netbox REST API. The filter parameters are identical to those in the Web UI filter form. It replaces brief data with full information, and Netbox objects are represented as a recursive multidimensional dictionary.
|
5
5
|
License: Apache-2.0
|
6
6
|
Keywords: netbox
|
@@ -22,7 +22,7 @@ Requires-Dist: requests (>=2,<3)
|
|
22
22
|
Requires-Dist: tabulate (>=0.9,<0.10)
|
23
23
|
Requires-Dist: vhelpers (>=0.3)
|
24
24
|
Project-URL: Bug Tracker, https://github.com/vladimirs-git/nbforager/issues
|
25
|
-
Project-URL: Download URL, https://github.com/vladimirs-git/nbforager/archive/refs/tags/0.8.
|
25
|
+
Project-URL: Download URL, https://github.com/vladimirs-git/nbforager/archive/refs/tags/0.8.7.tar.gz
|
26
26
|
Project-URL: homepage, https://github.com/vladimirs-git/nbforager
|
27
27
|
Project-URL: repository, https://github.com/vladimirs-git/nbforager
|
28
28
|
Description-Content-Type: text/x-rst
|
@@ -19,7 +19,7 @@ class IPv4:
|
|
19
19
|
"""
|
20
20
|
if strict:
|
21
21
|
IPv4Network(cidr, strict=strict)
|
22
|
-
self.
|
22
|
+
self.interface = IPv4Interface(cidr)
|
23
23
|
|
24
24
|
def __repr__(self):
|
25
25
|
"""Representation of the object."""
|
@@ -34,7 +34,7 @@ class IPv4:
|
|
34
34
|
|
35
35
|
def __hash__(self) -> int:
|
36
36
|
"""Hash value of the object."""
|
37
|
-
return hash(self.
|
37
|
+
return hash(self.interface.network)
|
38
38
|
|
39
39
|
def __eq__(self, other: IPv4, /) -> bool:
|
40
40
|
"""Check if two objects are equal.
|
@@ -44,7 +44,7 @@ class IPv4:
|
|
44
44
|
"""
|
45
45
|
if not isinstance(other, IPv4):
|
46
46
|
return False
|
47
|
-
return self.
|
47
|
+
return self.interface == other.interface
|
48
48
|
|
49
49
|
def __lt__(self, other: IPv4, /) -> bool:
|
50
50
|
"""Compare two objects.
|
@@ -53,28 +53,39 @@ class IPv4:
|
|
53
53
|
"""
|
54
54
|
if not isinstance(other, IPv4):
|
55
55
|
return False
|
56
|
-
return self.
|
56
|
+
return self.interface < other.interface
|
57
57
|
|
58
58
|
def __contains__(self, other: IPv4, /) -> bool:
|
59
59
|
"""Check if all IPs in the other subnet are part of this network."""
|
60
|
-
return other.
|
60
|
+
return other.interface.network.subnet_of(self.interface.network)
|
61
61
|
|
62
62
|
@property
|
63
63
|
def ip(self) -> str:
|
64
64
|
"""IPv4 address without prefixlen, A.B.C.D."""
|
65
|
-
return str(self.
|
65
|
+
return str(self.interface.ip)
|
66
66
|
|
67
67
|
@property
|
68
68
|
def ipv4(self) -> str:
|
69
69
|
"""IPv4 address with prefixlen, A.B.C.D/LEN."""
|
70
|
-
return str(self.
|
70
|
+
return str(self.interface.with_prefixlen)
|
71
|
+
|
72
|
+
@property
|
73
|
+
def is_private(self) -> bool:
|
74
|
+
"""IPv4 address is private."""
|
75
|
+
return bool(self.interface.ip.is_private)
|
76
|
+
|
77
|
+
@property
|
78
|
+
def prefixlen(self) -> int:
|
79
|
+
"""IPv4 network with prefixlen, A.B.C.D/LEN."""
|
80
|
+
return self.interface.network.prefixlen
|
81
|
+
|
71
82
|
|
72
83
|
@property
|
73
84
|
def net(self) -> str:
|
74
85
|
"""IPv4 network with prefixlen, A.B.C.D/LEN."""
|
75
|
-
return str(self.
|
86
|
+
return str(self.interface.network)
|
76
87
|
|
77
88
|
@property
|
78
89
|
def prefixlen(self) -> int:
|
79
90
|
"""IPv4 network with prefixlen, A.B.C.D/LEN."""
|
80
|
-
return self.
|
91
|
+
return self.interface.network.prefixlen
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "nbforager"
|
3
|
-
version = "0.8.
|
3
|
+
version = "0.8.7"
|
4
4
|
description = "Python package designed to assist in working with the Netbox REST API. The filter parameters are identical to those in the Web UI filter form. It replaces brief data with full information, and Netbox objects are represented as a recursive multidimensional dictionary."
|
5
5
|
authors = ["Vladimirs Prusakovs <vladimir.prusakovs@gmail.com>"]
|
6
6
|
readme = "README.rst"
|
@@ -19,7 +19,7 @@ classifiers = [
|
|
19
19
|
homepage = "https://github.com/vladimirs-git/nbforager"
|
20
20
|
repository = "https://github.com/vladimirs-git/nbforager"
|
21
21
|
"Bug Tracker" = "https://github.com/vladimirs-git/nbforager/issues"
|
22
|
-
"Download URL" = "https://github.com/vladimirs-git/nbforager/archive/refs/tags/0.8.
|
22
|
+
"Download URL" = "https://github.com/vladimirs-git/nbforager/archive/refs/tags/0.8.7.tar.gz"
|
23
23
|
|
24
24
|
[tool.poetry.dependencies]
|
25
25
|
python = "^3.11"
|
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
|