mirror of
https://github.com/drygdryg/netbox-plugin-interface-sync
synced 2024-11-25 18:10:52 +03:00
Only compare description config
This commit is contained in:
parent
1bb75cfe69
commit
e5573f9a8c
@ -12,9 +12,9 @@ class Config(PluginConfig):
|
|||||||
'exclude_virtual_interfaces': True,
|
'exclude_virtual_interfaces': True,
|
||||||
'include_interfaces_panel': False,
|
'include_interfaces_panel': False,
|
||||||
# Compare description during diff
|
# Compare description during diff
|
||||||
'compare_description': False,
|
# If compare is true, description will also be synced to device
|
||||||
# Sync or not description from device type
|
# Otherwise not.
|
||||||
'exclude_description': False
|
'compare_description': True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ def post_components(
|
|||||||
updated = 0
|
updated = 0
|
||||||
keys_to_avoid = ["id"]
|
keys_to_avoid = ["id"]
|
||||||
|
|
||||||
if config["exclude_description"]:
|
if not config["compare_description"]:
|
||||||
keys_to_avoid.append("description")
|
keys_to_avoid.append("description")
|
||||||
|
|
||||||
for i in add_to_device_component.values():
|
for i in add_to_device_component.values():
|
||||||
|
@ -269,7 +269,7 @@ class PowerOutletComparisonView(LoginRequiredMixin, PermissionRequiredMixin, Vie
|
|||||||
updated = 0
|
updated = 0
|
||||||
keys_to_avoid = ["id"]
|
keys_to_avoid = ["id"]
|
||||||
|
|
||||||
if config["exclude_description"]:
|
if not config["compare_description"]:
|
||||||
keys_to_avoid.append("description")
|
keys_to_avoid.append("description")
|
||||||
|
|
||||||
for i in add_to_device_component.values():
|
for i in add_to_device_component.values():
|
||||||
@ -406,7 +406,7 @@ class FrontPortComparisonView(LoginRequiredMixin, PermissionRequiredMixin, View)
|
|||||||
updated = 0
|
updated = 0
|
||||||
keys_to_avoid = ["id"]
|
keys_to_avoid = ["id"]
|
||||||
|
|
||||||
if config["exclude_description"]:
|
if not config["compare_description"]:
|
||||||
keys_to_avoid.append("description")
|
keys_to_avoid.append("description")
|
||||||
|
|
||||||
for i in add_to_device_component.values():
|
for i in add_to_device_component.values():
|
||||||
|
Loading…
Reference in New Issue
Block a user