Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/healthz_cisco' into healthz_cisco
Browse files Browse the repository at this point in the history
# Conflicts:
#	proto/metadata.proto
#	proto/metadata_go_proto/metadata.pb.go
  • Loading branch information
karthikeya-remilla committed Oct 3, 2024
2 parents 234160a + 7c710ab commit b8a4bad
Show file tree
Hide file tree
Showing 63 changed files with 1,019 additions and 1,428 deletions.
5 changes: 0 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,18 @@
* @openconfig/featureprofiles-maintainers

# /feature folders each have owners who are auto requested for review and may merge PR's
/feature/acl/ @alokmtri-g
/feature/bgp/ @dplore
/feature/dhcp/ @alokmtri-g
/feature/ethernet/ @ram-mac
/feature/interface/ @ram-mac
/feature/isis/ @rohit-rp
/feature/lldp/ @alokmtri-g
/feature/mpls/ @swetha-haridasula
/feature/mtu/ @swetha-haridasula
/feature/networkinstance/ @swetha-haridasula
/feature/platform/ @amrindrr
/feature/policy_forwarding/ @swetha-haridasula
/feature/qos @sezhang2
/feature/routing_policy/ @swetha-haridasula
/feature/security @mihirpitale-googler
/feature/staticroute/ @swetha-haridasula
/feature/stp/ @alokmtri-g
/feature/system @self-maurya
/feature/vrrp @amrindrr

Expand Down
23 changes: 1 addition & 22 deletions feature/bgp/policybase/otg_tests/community_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,6 @@ BGP policy configuration for Community Sets
* Verify traffic is received on ATE port 1 for accepted prefixes.
* Verify traffic is not received on ATE port 1 for rejected prefixes.

* RT-7.2.3 - Update community set and validate
1. Configure a community-set named `update_comm_set` with "100:1" as member.

2. Create a `policy-definition` named 'community-match' with the following `statements`
* statement[name='accept_update_comm_set']/
* conditions/bgp-conditions/match-community-set/config/community-set = 'update_comm_set'
* conditions/bgp-conditions/match-community-set/config/match-set-options = INVERT
* actions/config/policy-result = ACCEPT_ROUTE

3. Send traffic from ATE port-2 to all prefix-sets.
* Verify traffic is received on ATE port 1 for accepted prefixes for all community set except "100:1".
* Verify traffic is not received on ATE port 1 for rejected prefixes for community set "100:1".

4. Update the community-set named `update_comm_set` with "200:2" as member.

5. Send traffic from ATE port-2 to all prefix-sets.
* Verify traffic is received on ATE port 1 for accepted prefixes for all community set except "200:1".
* Verify traffic is not received on ATE port 1 for rejected prefixes for community set "200:1".



### Expected community matches

| prefix-set | any_my_3_comms | all_3_comms | no_3_comms | any_my_regex_comms |
Expand Down Expand Up @@ -176,4 +155,4 @@ rpcs:
gnmi:
gNMI.Set:
gNMI.Subscribe:
```
```
103 changes: 26 additions & 77 deletions feature/bgp/policybase/otg_tests/community_test/community_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,32 @@ type testCase struct {
}

func TestCommunitySet(t *testing.T) {
bs := testSetup(t)
bs := cfgplugins.NewBGPSession(t, cfgplugins.PortCount2, nil)
bs.WithEBGP(t, []oc.E_BgpTypes_AFI_SAFI_TYPE{oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST, oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST}, []string{"port2"}, true, true)

var communityMembers = [][][]int{
{
{100, 1}, {200, 2}, {300, 3},
},
{
{100, 1}, {101, 1}, {200, 2},
},
{
{107, 1}, {108, 1}, {109, 1},
},
{
{400, 1}, {500, 1}, {600, 1},
},
}

configureOTG(t, bs, prefixesV4, prefixesV6, communityMembers)
bs.PushAndStart(t)

t.Log("Verify DUT BGP sessions up")
cfgplugins.VerifyDUTBGPEstablished(t, bs.DUT)
t.Log("Verify OTG BGP sessions up")
cfgplugins.VerifyOTGBGPEstablished(t, bs.ATE)

ipv4 := bs.ATETop.Devices().Items()[1].Ethernets().Items()[0].Ipv4Addresses().Items()[0].Address()
ipv6 := bs.ATETop.Devices().Items()[1].Ethernets().Items()[0].Ipv6Addresses().Items()[0].Address()

Expand Down Expand Up @@ -294,79 +319,3 @@ func TestCommunitySet(t *testing.T) {
})
}
}

func testSetup(t *testing.T) *cfgplugins.BGPSession {
t.Helper()

bs := cfgplugins.NewBGPSession(t, cfgplugins.PortCount2, nil)
bs.WithEBGP(t, []oc.E_BgpTypes_AFI_SAFI_TYPE{oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST, oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST}, []string{"port2"}, true, true)

var communityMembers = [][][]int{
{
{100, 1}, {200, 2}, {300, 3},
},
{
{100, 1}, {101, 1}, {200, 2},
},
{
{107, 1}, {108, 1}, {109, 1},
},
{
{400, 1}, {500, 1}, {600, 1},
},
}

configureOTG(t, bs, prefixesV4, prefixesV6, communityMembers)
bs.PushAndStart(t)

t.Log("Verify DUT BGP sessions up")
cfgplugins.VerifyDUTBGPEstablished(t, bs.DUT)
t.Log("Verify OTG BGP sessions up")
cfgplugins.VerifyOTGBGPEstablished(t, bs.ATE)

return bs
}

func TestCommunitySetUpdate(t *testing.T) {
bs := testSetup(t)
ipv4 := bs.ATETop.Devices().Items()[1].Ethernets().Items()[0].Ipv4Addresses().Items()[0].Address()
ipv6 := bs.ATETop.Devices().Items()[1].Ethernets().Items()[0].Ipv6Addresses().Items()[0].Address()

commMatch := [3]string{"100:1"}
configureImportBGPPolicy(t, bs.DUT, ipv4, ipv6, "update_comm_set", commMatch, oc.BgpPolicy_MatchSetOptionsType_INVERT)
validateCommunitySetUpdateTraffic(t, bs)

// change community match set
commMatch = [3]string{"200:2"}
configureImportBGPPolicy(t, bs.DUT, ipv4, ipv6, "update_comm_set", commMatch, oc.BgpPolicy_MatchSetOptionsType_INVERT)
validateCommunitySetUpdateTraffic(t, bs)
}

func validateCommunitySetUpdateTraffic(t *testing.T, bs *cfgplugins.BGPSession) {
t.Helper()

sleepTime := time.Duration(totalPackets/trafficPps) + 2
bs.ATETop.Flows().Clear()
for index, prefixPairV4 := range prefixesV4 {
configureFlow(t, bs, prefixPairV4, "ipv4", index)
configureFlow(t, bs, prefixesV6[index], "ipv6", index)
}
bs.PushAndStartATE(t)

// Verify BGP session after its reset with OTG push config & start
cfgplugins.VerifyDUTBGPEstablished(t, bs.DUT)

t.Logf("Starting traffic for IPv4 and v6")
bs.ATE.OTG().StartTraffic(t)
time.Sleep(sleepTime * time.Second)
bs.ATE.OTG().StopTraffic(t)
otgutils.LogFlowMetrics(t, bs.ATE.OTG(), bs.ATETop)

testResults := [4]bool{false, false, true, true}
for index, prefixPairV4 := range prefixesV4 {
t.Logf("Validating traffic test for IPv4 prefixes: [%s, %s]. Expected Result: [%t]", prefixPairV4[0], prefixPairV4[1], testResults[index])
verifyTraffic(t, bs.ATE, "ipv4", testResults[index], index)
t.Logf("Validating traffic test for IPv6 prefixes: [%s, %s]. Expected Result: [%t]", prefixesV6[index][0], prefixesV6[index][1], testResults[index])
verifyTraffic(t, bs.ATE, "ipv6", testResults[index], index)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,21 @@ containing a single NH.
* Interface DUT port-2 is disabled.
* Remove the entry for 192.0.2.254/32.

## OpenConfig Path and RPC Coverage
```yaml
rpcs:
gnmi:
gNMI.Get:
gNMI.Set:
gNMI.Subscribe:
gribi:
gRIBI.Get:
gRIBI.Modify:
gRIBI.Flush:
```
## Config Parameter coverage

No new configuration covered.

## Telemetry Parameter coverage

No new telemetry covered.

## Protocol/RPC Parameter coverage

* gRIBI
* Modify
* ModifyRequest
* NextHopGroup
* backup_nexthop_group

## Minimum DUT platform requirement

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# proto-file: github.com/openconfig/featureprofiles/proto/feature.proto
# proto-message: FeatureProfile

id {
name: "experimental_basic_entries_installed_in_gribi_gribi_ip4_entry"
version: 1
}

telemetry_path {
path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/next-hop-group"
}
telemetry_path {
path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/origin-protocol"
}
telemetry_path {
path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/prefix"
}
telemetry_path {
path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/id"
}
telemetry_path {
path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop/index"
}
telemetry_path {
path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop/state/index"
}
telemetry_path {
path: "/network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/id"
}
telemetry_path {
path: "/network-instances/network-instance/afts/next-hops/next-hop/index"
}
telemetry_path {
path: "/network-instances/network-instance/afts/next-hops/next-hop/interface-ref/state/interface"
}
telemetry_path {
path: "/network-instances/network-instance/afts/next-hops/next-hop/interface-ref/state/subinterface"
}
telemetry_path {
path: "/network-instances/network-instance/afts/next-hops/next-hop/state/index"
}
telemetry_path {
path: "/network-instances/network-instance/afts/next-hops/next-hop/state/ip-address"
}
telemetry_path {
path: "/network-instances/network-instance/afts/next-hops/next-hop/state/mac-address"
}
telemetry_path {
path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/decapsulate-header"
}
telemetry_path {
path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/counters/octets-forwarded"
}
telemetry_path {
path: "/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/counters/packets-forwarded"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# proto-file: github.com/openconfig/featureprofiles/proto/feature.proto
# proto-message: FeatureProfile

id {
name: "experimental_gnmi_service_benchmarking_drained_configuration_convergence_time"
version: 1
}

config_path {
path: "/routing-policy/policy-definitions/policy-definition/statements/statement/actions/bgp-actions/config/set-med"
}
config_path {
path: "/routing-policy/policy-definitions/policy-definition/statements/statement/actions/bgp-actions/set-as-path-prepend/config/repeat-n"
}
config_path {
path: "/routing-policy/policy-definitions/policy-definition/statements/statement/actions/bgp-actions/set-as-path-prepend/config/asn"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# proto-file: github.com/openconfig/featureprofiles/proto/feature.proto
# proto-message: FeatureProfile

id {
name: "experimental_gnmi_service_telemetry_port_speed"
version: 1
}

telemetry_path {
path: "/interfaces/interface/state/oper-status"
}
telemetry_path {
path: "/interfaces/interface/ethernet/state/port-speed"
}
telemetry_path {
path: "/interfaces/interface/aggregation/state/lag-speed"
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,15 @@ Different test scenarios requires different setups.
traffic with decapsulated traffic with destination IP as `InnerDstIP_1`
at ATE port-4.

## OpenConfig Path and RPC Coverage
```yaml
rpcs:
gnmi:
gNMI.Get:
gNMI.Set:
gNMI.Subscribe:
gribi:
gRIBI.Get:
gRIBI.Modify:
gRIBI.Flush:
```
## Config Parameter coverage

No new configuration covered.

## Telemetry Parameter coverage

No new telemetry covered.

## Protocol/RPC Parameter coverage

## Minimum DUT platform requirement

Expand Down
Loading

0 comments on commit b8a4bad

Please sign in to comment.