Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cisco SR using only MPLS OC Paths #3745

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mastarkey
Copy link
Contributor

Added changes for Cisco where we only config SR via the MPLS paths and avoid using SR config via SR IGP paths

config paths used

/network-instances/network-instance/mpls/global/interface-attributes/interface/config/mpls-enabled:
/network-instances/network-instance/mpls/global/reserved-label-blocks/reserved-label-block/config/local-id:
/network-instances/network-instance/mpls/global/reserved-label-blocks/reserved-label-block/config/lower-bound:
/network-instances/network-instance/mpls/global/reserved-label-blocks/reserved-label-block/config/upper-bound:

@mastarkey mastarkey requested a review from a team as a code owner February 3, 2025 02:52
@OpenConfigBot
Copy link

Pull Request Functional Test Report for #3745 / 6ae70aa

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
MPLS-1.1: MPLS label blocks using ISIS
Cisco 8000E status
MPLS-1.1: MPLS label blocks using ISIS
Cisco XRd status
MPLS-1.1: MPLS label blocks using ISIS
Juniper ncPTX status
MPLS-1.1: MPLS label blocks using ISIS
Nokia SR Linux status
MPLS-1.1: MPLS label blocks using ISIS
Openconfig Lemming status
MPLS-1.1: MPLS label blocks using ISIS

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
MPLS-1.1: MPLS label blocks using ISIS
Cisco 8808 status
MPLS-1.1: MPLS label blocks using ISIS
Juniper PTX10008 status
MPLS-1.1: MPLS label blocks using ISIS
Nokia 7250 IXR-10e status
MPLS-1.1: MPLS label blocks using ISIS

Help

@mastarkey mastarkey changed the title modified sr paths to use mpls paths vs using IGP paths Cisco SR using only MPLS OC Paths Feb 3, 2025
Copy link
Contributor

@ram-mac ram-mac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add deviations


// Checking MPLS SR
verifyMPLSSR(t, ts)
if ts.DUT.Vendor() == ondatra.CISCO {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mastarkey , please create a deviation for Cisco and use Switch to pick the vendor. Below is an example for reference weighted_ecmp_test

if deviations.WecmpAutoUnsupported(dut) {
	var weight string
	switch dut.Vendor() {
	case ondatra.CISCO:
		weight = fmt.Sprintf(" router isis DEFAULT \n interface %s \n address-family ipv4 unicast \n weight 100 \n address-family ipv6 unicast \n weight 100 \n ! \n interface %s \n address-family ipv4 unicast \n weight 100 \n address-family ipv6 unicast \n weight 100 \n ! \n interface %s \n address-family ipv4 unicast \n weight 100 \n address-family ipv6 unicast \n weight 100 \n", aggIDs[1], aggIDs[2], aggIDs[3])
	default:
		t.Fatalf("Unsupported vendor %s for deviation 'WecmpAutoUnsupported'", dut.Vendor())
	}
	helpers.GnmiCLIConfig(t, dut, weight)
}

configureOTG(t, ts)
otg := ts.ATE.OTG()
pcl := ts.DUTConf.GetNetworkInstance(deviations.DefaultNetworkInstance(ts.DUT)).GetProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isissession.ISISName)
fptest.LogQuery(t, "Protocol ISIS", isissession.ProtocolPath(ts.DUT).Config(), pcl)
isissr := ts.DUTConf.GetNetworkInstance(deviations.DefaultNetworkInstance(ts.DUT)).GetProtocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isissession.ISISName).GetIsis().GetGlobal().GetSegmentRouting()
fptest.LogQuery(t, "Protocol ISIS Global Segment Routing", isissession.ProtocolPath(ts.DUT).Config(), isissr)
sr := ts.DUTConf.GetNetworkInstance(deviations.DefaultNetworkInstance(ts.DUT)).GetMpls().GetGlobal()
fptest.LogQuery(t, "Protocol MPLS and SR", isissession.ProtocolPath(ts.DUT).Config(), sr)
if ts.DUT.Vendor() == ondatra.CISCO {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use deviation and use switch case, reference weighted_ecmp_test

srgbValue := pcl.GetIsis().GetGlobal().GetSegmentRouting().GetSrgb()
if srgbValue == "nil" || srgbValue == "" {
t.Errorf("FAIL- SRGB is not present on DUT")
if ts.DUT.Vendor() == ondatra.CISCO {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mastarkey - Is this for the ISIS igp checks? we will have to use deviation here too and switch case , reference weighted_ecmp_test

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mastarkey - We cannot be skipping the protocol checks. It is part of the test. If check is failing, then let that be so.

Copy link
Contributor

@ram-mac ram-mac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mastarkey - Static analysis are failing due to the import library in the test. you will have to move the position of this library as mentioned in the failures.

  • "github.com/openconfig/ondatra"

@ram-mac ram-mac self-assigned this Feb 3, 2025
srgbValue := pcl.GetIsis().GetGlobal().GetSegmentRouting().GetSrgb()
if srgbValue == "nil" || srgbValue == "" {
t.Errorf("FAIL- SRGB is not present on DUT")
if ts.DUT.Vendor() == ondatra.CISCO {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mastarkey - We cannot be skipping the protocol checks. It is part of the test. If check is failing, then let that be so.

@@ -72,6 +75,53 @@ const (
devIsisName = "devIsis"
)

// configureSRGBGlobalPath
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is changing the requirements of the test, let the test fail if a vendor does not support the path required in the Readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants