openconfig / ondatra

54 stars 37 forks source link

ISIS Neighbor attribute retrieval #51

Closed cprabha closed 1 year ago

cprabha commented 1 year ago

Hi,

We need to retrieve ISIS neighbor attributes like overload bit, metric from ATE LSDB information.

Below is test scenario which we are trying to validate.

Validate that received LSDB on ATE has:

1.) Overload bit unset by default, change overload bit to set via DUT configuration, and ensure that the overload bit is advertised as set (as observed by the ATE). Ensure that DUT telemetry reflects the overload bit is set.

2.) Metric is set to the specified value for ATE port-1 facing DUT port via configuration, update value in configuration, and ensure that ATE and DUT telemetry reflects the change.

On DUT we are using below OC Paths to set overload bit and metric.

/openconfig-network-instance/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/config/metric.

/openconfig-network-instance/network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/overload-bit/config/set-bit

WBB Testcase which needs this support: gnmi 1.3, RT 2.2

Thanks, Prabha

cprabha commented 1 year ago

Hi,

IXIA POCs: Subhajit Pal subhajit.pal@keysight.com; Vibaswan Roychowdhury vibaswan.roychowdhury@keysight.com

Thanks, Prabha

greg-dennis commented 1 year ago

Sure, please have the Keysight POCs point us to confirm where Ixia reports this information.

cprabha commented 1 year ago

Hi Subhajit, Vibaswan,

Please could you help with requested details on ATE.

Thanks, Prabha

Juniper Business Use Only From: Greg Dennis @.> Sent: Wednesday, November 16, 2022 1:57 PM To: openconfig/ondatra @.> Cc: Prabha Chethan @.>; Author @.> Subject: Re: [openconfig/ondatra] ISIS Neighbor attribute retrieval (Issue #51)

[External Email. Be cautious of content]

Sure, please have the Keysight POCs point us to confirm where Ixia reports this information.

- Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/openconfig/ondatra/issues/51*issuecomment-1317723081__;Iw!!NEt6yMaO-gk!EURzrmWXQ6cm-hc8jrwKP6hhk6Y2rTHJCJDG4avBQ26NXlEXqOYaKortAYQl6qKHhQMmTh9zEeG5HFufHavWWBld$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AHCEB5TGO4SEINBJ2JMCSBTWIVKBXANCNFSM6AAAAAASCVD5XY__;!!NEt6yMaO-gk!EURzrmWXQ6cm-hc8jrwKP6hhk6Y2rTHJCJDG4avBQ26NXlEXqOYaKortAYQl6qKHhQMmTh9zEeG5HFufHZCBOIvn$. You are receiving this because you authored the thread.Message ID: @.**@.>>

Vibaswan commented 1 year ago

Point 1: IxNetwork does not report overload-bit as of now.

Point 2: Currently there are three ways in ondatra to retrieve ipv4 prefix and metric info ipv4-internal-tlv (tlv 128) ----> when origin type is set internal Ipv4-external-tlv(tlv 130) -----> when origin type is external Ipv4-extended-tlv(tlv 135) ---> when wide metric is enabled

IxNetwork Learned info though gives us the value of ipv4 prefix and metric (as you can see in the table https://github.com/openconfig/ondatra/issues/42#issuecomment-1287358729) but it does not have any indication in learned info table that would help us to decide a particular ipv4 prefix should be populated in which tlv.

So as workaround we can populated all types of ipv4 prefixes in the Ipv4-extended-tlv(tlv 135) gnmi path of ondatra , and later when there is a fix in Ixnetwork we would then need to change the implementation accordingly.

@greg-dennis Do you think this workaround is acceptable?

In that case proposed test script snippet will be:

is := at.NetworkInstance(ap.Name()).Protocol(telemetry.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, "0").Isis( ).LevelAny().LspAny()
fmt.Println(lsps)

prefix := lsps.Tlv(telemetry.IsisLsdbTypes_ISIS_TLV_TYPE_EXTENDED_IPV4_REACHABILITY).ExtendedIpv4Reachability().PrefixAny().Prefix().Get(t)
fmt.Println(prefix)
metric := lsps.Tlv(telemetry.IsisLsdbTypes_ISIS_TLV_TYPE_EXTENDED_IPV4_REACHABILITY).ExtendedIpv4Reachability().PrefixAny().Metric().Get(t)
            fmt.Println(metric)
greg-dennis commented 1 year ago

@Vibaswan that would probably be acceptable, but we may be able to do a bit better. Today, when we populate the ISIS telemetry, we have access to the configured isisL3Router object, so we could lookup whether wide metric is enabled. Is there a single place to config to look up the origin type?

Vibaswan commented 1 year ago

@greg-dennis IxNetwork basically learns these information from the "Device Under Test" , so we cannot determine the ipv4 prefixes from the configured isisL3Router object.

greg-dennis commented 1 year ago

@Vibaswan, ok then I think populating all the leaves with the values, with a comment and ideally a link to the bug/feature request to fix, is acceptable for now

greg-dennis commented 1 year ago

@Vibaswan, I think you can populate it in a relatively straightforward way here: https://github.com/openconfig/ondatra/blob/main/internal/ixgnmi/isislsdb.go#L107 Can you send me a PR?

vhowdhur commented 1 year ago

@greg-dennis, I raised a PR for the changes https://github.com/openconfig/ondatra/pull/52

greg-dennis commented 1 year ago

@cprabha, @vhowdhur changes have been merged, so I will close this.

@vhowdhur, do you have a place where @cprabha could track progress on exporting the overload bit? When that is available, feel free to send a PR to add it to Ondatra.

cprabha commented 1 year ago

Thanks Greg. -Prabha.

Juniper Business Use Only From: Greg Dennis @.> Sent: Monday, November 21, 2022 10:27 AM To: openconfig/ondatra @.> Cc: Prabha Chethan @.>; Mention @.> Subject: Re: [openconfig/ondatra] ISIS Neighbor attribute retrieval (Issue #51)

[External Email. Be cautious of content]

@cprabhahttps://urldefense.com/v3/__https:/github.com/cprabha__;!!NEt6yMaO-gk!ArIG6O-Du_bZO3ixab62FHNG7e6IVPuczyixlXITfwqWYGpNaeAlfuBVxZTkKmprbH1SS8FNUplNI8b7L9YFssiu$, @vhowdhurhttps://urldefense.com/v3/__https:/github.com/vhowdhur__;!!NEt6yMaO-gk!ArIG6O-Du_bZO3ixab62FHNG7e6IVPuczyixlXITfwqWYGpNaeAlfuBVxZTkKmprbH1SS8FNUplNI8b7L65zDp39$ changes have been merged, so I will close this.

@vhowdhurhttps://urldefense.com/v3/__https:/github.com/vhowdhur__;!!NEt6yMaO-gk!ArIG6O-Du_bZO3ixab62FHNG7e6IVPuczyixlXITfwqWYGpNaeAlfuBVxZTkKmprbH1SS8FNUplNI8b7L65zDp39$, do you have a place where @cprabhahttps://urldefense.com/v3/__https:/github.com/cprabha__;!!NEt6yMaO-gk!ArIG6O-Du_bZO3ixab62FHNG7e6IVPuczyixlXITfwqWYGpNaeAlfuBVxZTkKmprbH1SS8FNUplNI8b7L9YFssiu$ could track progress on exporting the overload bit? When that is available, feel free to send a PR to add it to Ondatra.

- Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/openconfig/ondatra/issues/51*issuecomment-1322478746__;Iw!!NEt6yMaO-gk!ArIG6O-Du_bZO3ixab62FHNG7e6IVPuczyixlXITfwqWYGpNaeAlfuBVxZTkKmprbH1SS8FNUplNI8b7L3-EfgXe$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AHCEB5UFPXMS275F6LAWPXLWJO5F3ANCNFSM6AAAAAASCVD5XY__;!!NEt6yMaO-gk!ArIG6O-Du_bZO3ixab62FHNG7e6IVPuczyixlXITfwqWYGpNaeAlfuBVxZTkKmprbH1SS8FNUplNI8b7L-zyHO9v$. You are receiving this because you were mentioned.Message ID: @.**@.>>