ipfabric_netbox 3.2.1__py3-none-any.whl → 3.2.2__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 ipfabric_netbox might be problematic. Click here for more details.
- ipfabric_netbox/__init__.py +1 -1
- ipfabric_netbox/exceptions.py +2 -2
- ipfabric_netbox/utilities/ipfutils.py +10 -6
- {ipfabric_netbox-3.2.1.dist-info → ipfabric_netbox-3.2.2.dist-info}/METADATA +10 -11
- {ipfabric_netbox-3.2.1.dist-info → ipfabric_netbox-3.2.2.dist-info}/RECORD +6 -6
- {ipfabric_netbox-3.2.1.dist-info → ipfabric_netbox-3.2.2.dist-info}/WHEEL +0 -0
ipfabric_netbox/__init__.py
CHANGED
ipfabric_netbox/exceptions.py
CHANGED
|
@@ -14,11 +14,11 @@ class ErrorMixin(Exception):
|
|
|
14
14
|
self.coalesce_fields = context
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
class SearchError(
|
|
17
|
+
class SearchError(ErrorMixin, LookupError):
|
|
18
18
|
def __str__(self):
|
|
19
19
|
return f"{self.model} with these keys not found: {self.coalesce_fields}."
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
class SyncDataError(
|
|
22
|
+
class SyncDataError(ErrorMixin, SyncError):
|
|
23
23
|
def __str__(self):
|
|
24
24
|
return f"Sync failed for {self.model}: coalesce_fields={self.coalesce_fields} defaults={self.defaults}."
|
|
@@ -302,7 +302,6 @@ class IPFabricSyncRunner(object):
|
|
|
302
302
|
query_filter = {
|
|
303
303
|
"and": [{"vendor": ["neq", vendor]} for vendor in excluded_vendors]
|
|
304
304
|
}
|
|
305
|
-
# filter = {"and": [{"vendor": ["neq", "aws"]}, {"vendor": ["neq", "azure"]}]}
|
|
306
305
|
|
|
307
306
|
if ingestion_sites := self.settings.get("sites"):
|
|
308
307
|
site_filter = {
|
|
@@ -311,13 +310,14 @@ class IPFabricSyncRunner(object):
|
|
|
311
310
|
query_filter["and"].append(site_filter)
|
|
312
311
|
|
|
313
312
|
self.logger.log_info(
|
|
314
|
-
f"Creating site filter {json.dumps(site_filter)}",
|
|
313
|
+
f"Creating site filter `{json.dumps(site_filter)}`",
|
|
314
|
+
obj=self.sync,
|
|
315
315
|
)
|
|
316
316
|
else:
|
|
317
317
|
site_filter = {}
|
|
318
318
|
|
|
319
319
|
data["site"] = self.client.inventory.sites.all(
|
|
320
|
-
snapshot_id=self.settings["snapshot_id"]
|
|
320
|
+
snapshot_id=self.settings["snapshot_id"], filters=site_filter
|
|
321
321
|
)
|
|
322
322
|
|
|
323
323
|
data["device"] = self.client.inventory.devices.all(
|
|
@@ -331,13 +331,17 @@ class IPFabricSyncRunner(object):
|
|
|
331
331
|
)
|
|
332
332
|
|
|
333
333
|
data["interface"] = self.client.inventory.interfaces.all(
|
|
334
|
-
snapshot_id=self.settings["snapshot_id"]
|
|
334
|
+
snapshot_id=self.settings["snapshot_id"], filters=site_filter
|
|
335
335
|
)
|
|
336
336
|
|
|
337
337
|
data["inventoryitem"] = self.client.inventory.pn.all(
|
|
338
338
|
snapshot_id=self.settings["snapshot_id"],
|
|
339
339
|
filters={
|
|
340
|
-
"and": [
|
|
340
|
+
"and": [
|
|
341
|
+
site_filter,
|
|
342
|
+
{"sn": ["empty", False]},
|
|
343
|
+
{"name": ["empty", False]},
|
|
344
|
+
]
|
|
341
345
|
},
|
|
342
346
|
)
|
|
343
347
|
|
|
@@ -363,7 +367,7 @@ class IPFabricSyncRunner(object):
|
|
|
363
367
|
data[
|
|
364
368
|
"ipaddress"
|
|
365
369
|
] = self.client.technology.addressing.managed_ip_ipv4.all(
|
|
366
|
-
snapshot_id=self.settings["snapshot_id"]
|
|
370
|
+
snapshot_id=self.settings["snapshot_id"], filters=site_filter
|
|
367
371
|
)
|
|
368
372
|
except Exception as e:
|
|
369
373
|
self.logger.log_failure(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: ipfabric_netbox
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.2
|
|
4
4
|
Summary: NetBox plugin to sync IP Fabric data into NetBox
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: netbox,ipfabric,plugin,sync
|
|
@@ -57,19 +57,18 @@ The plugin uses IP Fabric collect network data utilizing the [IP Fabric Python S
|
|
|
57
57
|
- Diff Visualization
|
|
58
58
|
|
|
59
59
|
## NetBox Compatibility
|
|
60
|
-
These are the
|
|
60
|
+
These are the required NetBox versions for corresponding plugin version. Any other versions won't work due to breaking changes in NetBox codebase.
|
|
61
61
|
|
|
62
62
|
| Netbox Version | Plugin Version |
|
|
63
63
|
|----------------|----------------|
|
|
64
|
-
|
|
|
65
|
-
| 3
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
| 4.0
|
|
69
|
-
| 4.0.
|
|
70
|
-
|
|
|
71
|
-
| 4.
|
|
72
|
-
| 4.2.0 | >=3.2.0 |
|
|
64
|
+
| 4.2.4 and up | 3.2.2 and up |
|
|
65
|
+
| 4.2.0 - 4.2.3 | 3.2.0 |
|
|
66
|
+
| 4.1.5 - 4.1.11 | 3.1.1 - 3.1.3 |
|
|
67
|
+
| 4.1.0 - 4.1.4 | 3.1.0 |
|
|
68
|
+
| 4.0.1 | 3.0.1 - 3.0.3 |
|
|
69
|
+
| 4.0.0 | 3.0.0 |
|
|
70
|
+
| 3.7.0 - 3.7.8 | 2.0.0 - 2.0.6 |
|
|
71
|
+
| 3.4.0 - 3.6.9 | 1.0.0 - 1.0.11 |
|
|
73
72
|
|
|
74
73
|
## Screenshots
|
|
75
74
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
ipfabric_netbox/__init__.py,sha256=
|
|
1
|
+
ipfabric_netbox/__init__.py,sha256=Hx79dSbjd4DIMkPCRqBBdEDb9t9MAVvHEk9TZHXAw3c,315
|
|
2
2
|
ipfabric_netbox/api/__init__.py,sha256=DOkvDAI4BoNgdCiNxfseeExEHyOrK8weG-LvjPRyK8A,101
|
|
3
3
|
ipfabric_netbox/api/nested_serializers.py,sha256=JwIlFpOHeiMB7F-sC0gx1f6qdNevS8NsXTUEHlVZeRs,2719
|
|
4
4
|
ipfabric_netbox/api/serializers.py,sha256=bTR3AJ81Q8HZI3iWLPc1tndGqD0erAbAD9hKLI4DTYY,4341
|
|
@@ -6,7 +6,7 @@ ipfabric_netbox/api/urls.py,sha256=BSQ5nqYSx0r-wnbdKGDAb5XH7BBy_0ngV_Q7vDgjMIE,9
|
|
|
6
6
|
ipfabric_netbox/api/views.py,sha256=X02GwpDlq25_3KlxYTWyd4PnT1RCtfp7uN0zZ5Etjp8,4429
|
|
7
7
|
ipfabric_netbox/choices.py,sha256=GqcnLqsFR4gnhWEwkvQbPxXYNi5SwNoIQz-J15LTMc4,4848
|
|
8
8
|
ipfabric_netbox/data/transform_map.json,sha256=Xb5x8dmBPDmrVUezjvkI3Wq60TgdHXocaur3W2xZ_k8,21951
|
|
9
|
-
ipfabric_netbox/exceptions.py,sha256=
|
|
9
|
+
ipfabric_netbox/exceptions.py,sha256=Za-RutEX9ZIi3r0Rpor1vDGwsC5foeyrfSjUKS3Cwdk,744
|
|
10
10
|
ipfabric_netbox/filtersets.py,sha256=P_2VCL892pLplPnsxul27bgGgMpHaZtgn9Vg0UsWErE,3877
|
|
11
11
|
ipfabric_netbox/forms.py,sha256=qtl6htAmyAIwwUoucHsqmXJME2M2SzcA69_BBiuCqs4,42942
|
|
12
12
|
ipfabric_netbox/jobs.py,sha256=jfWWNA42KMyzc-EGit6LJIe-SNob4-4IQRfadQF_GRE,2862
|
|
@@ -55,11 +55,11 @@ ipfabric_netbox/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
|
55
55
|
ipfabric_netbox/tests/test_models.py,sha256=syndh1M3uiZIokn_MJUHfU5jNNMUDPQ5sm8iK-gu1Is,15192
|
|
56
56
|
ipfabric_netbox/urls.py,sha256=V98K_JxHaJAgDbo-DiMj-5FQIIposLMLJCPw3dtREWU,4430
|
|
57
57
|
ipfabric_netbox/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
|
-
ipfabric_netbox/utilities/ipfutils.py,sha256=
|
|
58
|
+
ipfabric_netbox/utilities/ipfutils.py,sha256=c9a_3mQ_GVksYqsCIGJSBnzOVKX1V21Jb9lrU2ASadE,27306
|
|
59
59
|
ipfabric_netbox/utilities/logging.py,sha256=GYknjocMN6LQ2873_az3y0RKm29TCXaWviUIIneH-x0,3445
|
|
60
60
|
ipfabric_netbox/utilities/nbutils.py,sha256=kFBEiJOGvr_49hJWCS2duXojx2-A9kVk0Xp_vj0ohfs,2641
|
|
61
61
|
ipfabric_netbox/utilities/transform_map.py,sha256=g0elxtwSRJvu0ZRZHyMf4Y9R4wiQ-h2o9Er8gxUQ-Bs,2108
|
|
62
62
|
ipfabric_netbox/views.py,sha256=K2iKh6i8kv88c7gVh6wW7d8Adcso24ZE8m6gVUiNZSw,28285
|
|
63
|
-
ipfabric_netbox-3.2.
|
|
64
|
-
ipfabric_netbox-3.2.
|
|
65
|
-
ipfabric_netbox-3.2.
|
|
63
|
+
ipfabric_netbox-3.2.2.dist-info/METADATA,sha256=sFnkbdFcINTc3j0ZYZdTWqQVPzFdfnPXyGEvVhf5-3Y,4947
|
|
64
|
+
ipfabric_netbox-3.2.2.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
65
|
+
ipfabric_netbox-3.2.2.dist-info/RECORD,,
|
|
File without changes
|