nornir-collection 0.0.8__py3-none-any.whl → 0.0.9__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.
- nornir_collection/netbox/inventory.py +4 -0
- {nornir_collection-0.0.8.dist-info → nornir_collection-0.0.9.dist-info}/METADATA +1 -1
- {nornir_collection-0.0.8.dist-info → nornir_collection-0.0.9.dist-info}/RECORD +6 -6
- {nornir_collection-0.0.8.dist-info → nornir_collection-0.0.9.dist-info}/LICENSE +0 -0
- {nornir_collection-0.0.8.dist-info → nornir_collection-0.0.9.dist-info}/WHEEL +0 -0
- {nornir_collection-0.0.8.dist-info → nornir_collection-0.0.9.dist-info}/top_level.txt +0 -0
@@ -170,6 +170,7 @@ def _load_vlan_data(task: Task, all_vlans: List[Dict]) -> Result:
|
|
170
170
|
vlans = []
|
171
171
|
for role in roles:
|
172
172
|
# Update the VLANs to match all VLANs that match also the role
|
173
|
+
# The following list comprehensions fails of the 'group' or the 'role' is None
|
173
174
|
data = [x for x in all_vlans if (x["group"]["name"] == group and x["role"]["name"] == role)]
|
174
175
|
vlans.extend(data)
|
175
176
|
# Return if the data list is empty
|
@@ -306,6 +307,9 @@ def load_additional_netbox_data(nr: Nornir, add_netbox_data: dict[str:bool]) ->
|
|
306
307
|
if add_netbox_data.get("load_vlan_data"):
|
307
308
|
# Get all vlans from NetBox
|
308
309
|
all_vlans = get_nb_resources(url=f"{nb_url}/api/ipam/vlans/?limit=1000?")
|
310
|
+
# The task _load_vlan_data can only load VLANs that are part of a group and have a role. All VLANs
|
311
|
+
# in the DSC Azure Tenant are not part of a group and needs to be excluded the the all_vlans list.
|
312
|
+
all_vlans = [x for x in all_vlans if x["role"]["name"] != "AZURE"]
|
309
313
|
# Run the custom Nornir task _load_vlan_data
|
310
314
|
result = nr.run(
|
311
315
|
name=task_text,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: nornir-collection
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.9
|
4
4
|
Summary: Nornir-Collection contains network automation functions and complete IaC workflows with Nornir and other python libraries. It contains Nornir tasks and general functions in Nornir style.
|
5
5
|
Author: Willi Kubny
|
6
6
|
Author-email: willi.kubny@gmail.ch
|
@@ -35,7 +35,7 @@ nornir_collection/fortinet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
35
35
|
nornir_collection/fortinet/utils.py,sha256=xkvxdJy3-aD39WK_9Gc0rY9r-OxfHnPVNMspy3KZbcE,1174
|
36
36
|
nornir_collection/netbox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
37
|
nornir_collection/netbox/custom_script.py,sha256=yU1lbv_25b3qAWA6GRsVYpEuh0KUPTVo47U5s_lksjo,4050
|
38
|
-
nornir_collection/netbox/inventory.py,sha256=
|
38
|
+
nornir_collection/netbox/inventory.py,sha256=2db5GogMsY5bZgc4mXIhlmH9pcvyQ7AE55dL0EiqxDI,15488
|
39
39
|
nornir_collection/netbox/scan_prefixes_and_update_ip_addresses.py,sha256=IGaE-HR_eManlENJzx7odn6yuMgpUV85NZfhpfaxpA0,41376
|
40
40
|
nornir_collection/netbox/set_device_status.py,sha256=vtn0KcR-91Z2aLjbEpZRef1Jip8eM9GWbKRiAJuEjLY,2437
|
41
41
|
nornir_collection/netbox/sync_datasource.py,sha256=eEsgwy_arIPbA-ObqqzTNdU9aiP80s7LCzAKA6hCXYQ,4703
|
@@ -52,8 +52,8 @@ nornir_collection/nornir_plugins/inventory/staggered_yaml.py,sha256=nBvUFq7U5zVT
|
|
52
52
|
nornir_collection/nornir_plugins/inventory/utils.py,sha256=mxIlKK-4PHqCnFKn7Oozu1RW_JB5z1TgEYc-ave70nE,11822
|
53
53
|
nornir_collection/purestorage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
54
54
|
nornir_collection/purestorage/utils.py,sha256=TqU2sKz0ENnmSDEBcSvXPnVkI1DVHOogI68D7l32g7I,1730
|
55
|
-
nornir_collection-0.0.
|
56
|
-
nornir_collection-0.0.
|
57
|
-
nornir_collection-0.0.
|
58
|
-
nornir_collection-0.0.
|
59
|
-
nornir_collection-0.0.
|
55
|
+
nornir_collection-0.0.9.dist-info/LICENSE,sha256=bOPVh1OVNwz2tCjkLaChWT6AoXdtqye3aua5l0tgYJo,1068
|
56
|
+
nornir_collection-0.0.9.dist-info/METADATA,sha256=3i-2daEZ2nlcCFvtLqTjzVyUL7M0Dv0gdzY1XuvpVCE,7137
|
57
|
+
nornir_collection-0.0.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
58
|
+
nornir_collection-0.0.9.dist-info/top_level.txt,sha256=OyCzPWABf-D0AOHm9ihrwdk5eq200BnKna6gIDspwsE,18
|
59
|
+
nornir_collection-0.0.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|