Only compare description config

This commit is contained in:
rizlas 2022-01-18 18:26:15 +01:00
parent 1bb75cfe69
commit e5573f9a8c
3 changed files with 6 additions and 6 deletions

View File

@ -12,9 +12,9 @@ class Config(PluginConfig):
'exclude_virtual_interfaces': True,
'include_interfaces_panel': False,
# Compare description during diff
'compare_description': False,
# Sync or not description from device type
'exclude_description': False
# If compare is true, description will also be synced to device
# Otherwise not.
'compare_description': True
}

View File

@ -84,7 +84,7 @@ def post_components(
updated = 0
keys_to_avoid = ["id"]
if config["exclude_description"]:
if not config["compare_description"]:
keys_to_avoid.append("description")
for i in add_to_device_component.values():

View File

@ -269,7 +269,7 @@ class PowerOutletComparisonView(LoginRequiredMixin, PermissionRequiredMixin, Vie
updated = 0
keys_to_avoid = ["id"]
if config["exclude_description"]:
if not config["compare_description"]:
keys_to_avoid.append("description")
for i in add_to_device_component.values():
@ -406,7 +406,7 @@ class FrontPortComparisonView(LoginRequiredMixin, PermissionRequiredMixin, View)
updated = 0
keys_to_avoid = ["id"]
if config["exclude_description"]:
if not config["compare_description"]:
keys_to_avoid.append("description")
for i in add_to_device_component.values():