Skip to content

Commit

Permalink
Remove IS-IS instance leaf use & update deviation (openconfig#1966)
Browse files Browse the repository at this point in the history
* Remove IS-IS instance leaf use & update deviation

* Resolve conflicts

* Resolve conflicts

* fix goimport error
  • Loading branch information
arvbaska1 authored Aug 10, 2023
1 parent 844b3ef commit 8b70869
Show file tree
Hide file tree
Showing 13 changed files with 359 additions and 368 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ platform_exceptions: {
deviations: {
isis_multi_topology_unsupported: true
isis_interface_level1_disable_required: true
isis_instance_enabled_not_required: true
missing_isis_interface_afi_safi_enable: true
isis_restart_suppress_unsupported: true
explicit_port_speed: true
Expand All @@ -29,7 +28,6 @@ platform_exceptions: {
ipv4_missing_enabled: true
isis_interface_level1_disable_required: true
isis_single_topology_required: true
isis_instance_enabled_not_required: true
missing_isis_interface_afi_safi_enable: true
}
}
Expand All @@ -42,5 +40,6 @@ platform_exceptions: {
missing_value_for_defaults: true
interface_enabled: true
default_network_instance: "default"
isis_instance_enabled_required: true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func addISISOC(dev *oc.Root, areaAddress, sysID, ifaceName string, dut *ondatra.
prot.Enabled = ygot.Bool(true)
isis := prot.GetOrCreateIsis()
glob := isis.GetOrCreateGlobal()
if !deviations.ISISInstanceEnabledNotRequired(dut) {
if deviations.ISISInstanceEnabledRequired(dut) {
glob.Instance = ygot.String(ISISName)
}
glob.Net = []string{fmt.Sprintf("%v.%v.00", areaAddress, sysID)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ platform_exceptions: {
}
deviations: {
isis_interface_level1_disable_required: true
isis_instance_enabled_not_required: true
missing_isis_interface_afi_safi_enable: true
explicit_port_speed: true
explicit_interface_in_default_vrf: true
Expand All @@ -26,7 +25,6 @@ platform_exceptions: {
deviations: {
ipv4_missing_enabled: true
isis_interface_level1_disable_required: true
isis_instance_enabled_not_required: true
missing_isis_interface_afi_safi_enable: true
}
}
Expand All @@ -39,5 +37,6 @@ platform_exceptions: {
missing_value_for_defaults: true
interface_enabled: true
default_network_instance: "default"
isis_instance_enabled_required: true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ platform_exceptions: {
}
deviations: {
isis_interface_level1_disable_required: true
isis_instance_enabled_not_required: true
missing_isis_interface_afi_safi_enable: true
explicit_port_speed: true
explicit_interface_in_default_vrf: true
Expand All @@ -26,7 +25,6 @@ platform_exceptions: {
deviations: {
ipv4_missing_enabled: true
isis_interface_level1_disable_required: true
isis_instance_enabled_not_required: true
missing_isis_interface_afi_safi_enable: true
}
}
Expand All @@ -39,5 +37,6 @@ platform_exceptions: {
missing_value_for_defaults: true
interface_enabled: true
default_network_instance: "default"
isis_instance_enabled_required: true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ platform_exceptions: {
deviations: {
isis_multi_topology_unsupported: true
isis_interface_level1_disable_required: true
isis_instance_enabled_not_required: true
missing_isis_interface_afi_safi_enable: true
isis_restart_suppress_unsupported: true
explicit_port_speed: true
Expand All @@ -29,7 +28,6 @@ platform_exceptions: {
ipv4_missing_enabled: true
isis_interface_level1_disable_required: true
isis_single_topology_required: true
isis_instance_enabled_not_required: true
missing_isis_interface_afi_safi_enable: true
}
}
Expand All @@ -42,5 +40,6 @@ platform_exceptions: {
missing_value_for_defaults: true
interface_enabled: true
default_network_instance: "default"
isis_instance_enabled_required: true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func addISISOC(dev *oc.Root, areaAddress, sysID, ifaceName string, dut *ondatra.
prot.Enabled = ygot.Bool(true)
isis := prot.GetOrCreateIsis()
glob := isis.GetOrCreateGlobal()
if !deviations.ISISInstanceEnabledNotRequired(dut) {
if deviations.ISISInstanceEnabledRequired(dut) {
glob.Instance = ygot.String(ISISName)
}
glob.Net = []string{fmt.Sprintf("%v.%v.00", areaAddress, sysID)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ platform_exceptions: {
}
deviations: {
isis_interface_level1_disable_required: true
isis_instance_enabled_not_required: true
missing_isis_interface_afi_safi_enable: true
explicit_port_speed: true
explicit_interface_in_default_vrf: true
Expand All @@ -26,7 +25,6 @@ platform_exceptions: {
deviations: {
ipv4_missing_enabled: true
isis_interface_level1_disable_required: true
isis_instance_enabled_not_required: true
missing_isis_interface_afi_safi_enable: true
}
}
Expand All @@ -39,5 +37,6 @@ platform_exceptions: {
missing_value_for_defaults: true
interface_enabled: true
default_network_instance: "default"
isis_instance_enabled_required: true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ platform_exceptions: {
vendor: CISCO
}
deviations: {
isis_instance_enabled_not_required: true
missing_isis_interface_afi_safi_enable: true
}
}
Expand All @@ -21,7 +20,6 @@ platform_exceptions: {
deviations: {
isis_global_authentication_not_required: true
isis_explicit_level_authentication_config: true
isis_instance_enabled_not_required: true
missing_isis_interface_afi_safi_enable: true
explicit_port_speed: true
explicit_interface_in_default_vrf: true
Expand Down Expand Up @@ -49,5 +47,6 @@ platform_exceptions: {
isis_interface_afi_unsupported: true
isis_require_same_l1_metric_with_l2_metric: true
bgp_set_med_requires_equal_ospf_set_metric: true
isis_instance_enabled_required: true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ platform_exceptions: {
vendor: CISCO
}
deviations: {
isis_instance_enabled_not_required: true
missing_isis_interface_afi_safi_enable: true
}
}
Expand All @@ -20,7 +19,6 @@ platform_exceptions: {
}
deviations: {
isis_global_authentication_not_required: true
isis_instance_enabled_not_required: true
isis_explicit_level_authentication_config: true
missing_isis_interface_afi_safi_enable: true
explicit_port_speed: true
Expand All @@ -47,5 +45,6 @@ platform_exceptions: {
missing_isis_interface_afi_safi_enable: true
isis_interface_afi_unsupported: true
default_network_instance: "default"
isis_instance_enabled_required: true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,8 @@ func BuildBenchmarkingConfig(t *testing.T) *oc.Root {
isis := prot.GetOrCreateIsis()

globalISIS := isis.GetOrCreateGlobal()
globalISIS.Instance = ygot.String(ISISInstance)
if deviations.ISISInstanceEnabledNotRequired(dut) {
globalISIS.Instance = nil
if deviations.ISISInstanceEnabledRequired(dut) {
globalISIS.Instance = ygot.String(ISISInstance)
}
globalISIS.LevelCapability = oc.Isis_LevelType_LEVEL_2
globalISIS.AuthenticationCheck = ygot.Bool(true)
Expand Down
6 changes: 3 additions & 3 deletions internal/deviations/deviations.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,9 @@ func ExplicitIPv6EnableForGRIBI(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetIpv6EnableForGribiNhDmac()
}

// ISISInstanceEnabledNotRequired returns if isis instance enable flag should not be on the device.
func ISISInstanceEnabledNotRequired(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetIsisInstanceEnabledNotRequired()
// ISISInstanceEnabledRequired returns if isis instance name string should be set on the device.
func ISISInstanceEnabledRequired(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetIsisInstanceEnabledRequired()
}

// GNOISubcomponentPath returns if device currently uses component name instead of a full openconfig path.
Expand Down
2 changes: 1 addition & 1 deletion proto/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ message Metadata {
// Set isis af ipv6 single topology on the device if value is true.
bool isis_single_topology_required = 8;
// Don't set isis instance enable flag on the device if value is true.
bool isis_instance_enabled_not_required = 10;
bool isis_instance_enabled_required = 10;
// Set and validate isis interface address family enable on the device if
// value is true.
bool missing_isis_interface_afi_safi_enable = 11;
Expand Down
Loading

0 comments on commit 8b70869

Please sign in to comment.