Skip to content

Commit 179e8ec

Browse files
rwcrowerocrowe
andauthored
refactor(lldp) (#176)
Co-authored-by: rocrowe <rocrowe@cisco.com>
1 parent dbe0841 commit 179e8ec

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

iosxr_lldp.tf

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,24 @@ resource "iosxr_lldp" "lldp" {
44
holdtime = try(local.device_config[each.value.name].lldp.holdtime, local.defaults.iosxr.devices.configuration.lldp.holdtime, null)
55
timer = try(local.device_config[each.value.name].lldp.timer, local.defaults.iosxr.devices.configuration.lldp.timer, null)
66
reinit = try(local.device_config[each.value.name].lldp.reinit, local.defaults.iosxr.devices.configuration.lldp.reinit, null)
7+
system_name = try(local.device_config[each.value.name].lldp.system_name, local.defaults.iosxr.devices.configuration.lldp.system_name, null)
8+
system_description = try(local.device_config[each.value.name].lldp.system_description, local.defaults.iosxr.devices.configuration.lldp.system_description, null)
9+
chassis_id = try(local.device_config[each.value.name].lldp.chassis_id, local.defaults.iosxr.devices.configuration.lldp.chassis_id, null)
10+
chassis_id_type_chassis_component = try(local.device_config[each.value.name].lldp.chassis_id_type, local.defaults.iosxr.devices.configuration.lldp.chassis_id_type, null) == "chassis_component" ? true : null
11+
chassis_id_type_interface_alias = try(local.device_config[each.value.name].lldp.chassis_id_type, local.defaults.iosxr.devices.configuration.lldp.chassis_id_type, null) == "interface_alias" ? true : null
12+
chassis_id_type_port_component = try(local.device_config[each.value.name].lldp.chassis_id_type, local.defaults.iosxr.devices.configuration.lldp.chassis_id_type, null) == "port_component" ? true : null
13+
chassis_id_type_mac_address = try(local.device_config[each.value.name].lldp.chassis_id_type, local.defaults.iosxr.devices.configuration.lldp.chassis_id_type, null) == "mac_address" ? true : null
14+
chassis_id_type_network_address = try(local.device_config[each.value.name].lldp.chassis_id_type, local.defaults.iosxr.devices.configuration.lldp.chassis_id_type, null) == "network_address" ? true : null
15+
chassis_id_type_interface_name = try(local.device_config[each.value.name].lldp.chassis_id_type, local.defaults.iosxr.devices.configuration.lldp.chassis_id_type, null) == "interface_name" ? true : null
16+
chassis_id_type_local = try(local.device_config[each.value.name].lldp.chassis_id_type, local.defaults.iosxr.devices.configuration.lldp.chassis_id_type, null) == "local" ? true : null
717
subinterfaces_enable = try(local.device_config[each.value.name].lldp.subinterfaces_enable, local.defaults.iosxr.devices.configuration.lldp.subinterfaces_enable, null)
18+
subinterfaces_tagged = try(local.device_config[each.value.name].lldp.subinterfaces_tagged, local.defaults.iosxr.devices.configuration.lldp.subinterfaces_tagged, null)
819
priorityaddr_enable = try(local.device_config[each.value.name].lldp.priorityaddr_enable, local.defaults.iosxr.devices.configuration.lldp.priorityaddr_enable, null)
920
extended_show_width_enable = try(local.device_config[each.value.name].lldp.extended_show_width_enable, local.defaults.iosxr.devices.configuration.lldp.extended_show_width_enable, null)
1021
management_enable = try(local.device_config[each.value.name].lldp.management_enable, local.defaults.iosxr.devices.configuration.lldp.management_enable, null)
11-
tlv_select_management_address_disable = try(local.device_config[each.value.name].lldp.tlv_select_management_address_disable, local.defaults.iosxr.devices.configuration.lldp.tlv_select_management_address_disable, null)
12-
tlv_select_port_description_disable = try(local.device_config[each.value.name].lldp.tlv_select_port_description_disable, local.defaults.iosxr.devices.configuration.lldp.tlv_select_port_description_disable, null)
13-
tlv_select_system_capabilities_disable = try(local.device_config[each.value.name].lldp.tlv_select_system_capabilities_disable, local.defaults.iosxr.devices.configuration.lldp.tlv_select_system_capabilities_disable, null)
14-
tlv_select_system_description_disable = try(local.device_config[each.value.name].lldp.tlv_select_system_description_disable, local.defaults.iosxr.devices.configuration.lldp.tlv_select_system_description_disable, null)
15-
tlv_select_system_name_disable = try(local.device_config[each.value.name].lldp.tlv_select_system_name_disable, local.defaults.iosxr.devices.configuration.lldp.tlv_select_system_name_disable, null)
22+
tlv_select_management_address_disable = try(local.device_config[each.value.name].lldp.tlv_select.management_address_disable, local.defaults.iosxr.devices.configuration.lldp.tlv_select.management_address_disable, null)
23+
tlv_select_port_description_disable = try(local.device_config[each.value.name].lldp.tlv_select.port_description_disable, local.defaults.iosxr.devices.configuration.lldp.tlv_select.port_description_disable, null)
24+
tlv_select_system_capabilities_disable = try(local.device_config[each.value.name].lldp.tlv_select.system_capabilities_disable, local.defaults.iosxr.devices.configuration.lldp.tlv_select.system_capabilities_disable, null)
25+
tlv_select_system_description_disable = try(local.device_config[each.value.name].lldp.tlv_select.system_description_disable, local.defaults.iosxr.devices.configuration.lldp.tlv_select.system_description_disable, null)
26+
tlv_select_system_name_disable = try(local.device_config[each.value.name].lldp.tlv_select.system_name_disable, local.defaults.iosxr.devices.configuration.lldp.tlv_select.system_name_disable, null)
1627
}

0 commit comments

Comments
 (0)