-
Notifications
You must be signed in to change notification settings - Fork 160
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
base: main
Are you sure you want to change the base?
Conversation
Pull Request Functional Test Report for #3745 / 6ae70aaVirtual Devices
Hardware Devices
|
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this 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"
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 { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
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: