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

RT-7.10 Routing policy statement insertion and removal #3578

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

Conversation

rszarecki
Copy link
Contributor

This test verify that using gNMI setReqyest(Replace) we can insert statement in the middle of pre-existing policy, then remove any statement form policy, the re add this statement.
Even if statement is not first and not last one.

This test verify correctness of gNMI setReques REPLACE operation for routing policy.

@rszarecki rszarecki requested review from dplore and a team as code owners November 12, 2024 19:03
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11803964838

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 55.268%

Totals Coverage Status
Change from base Build 11794420856: 0.0%
Covered Lines: 1983
Relevant Lines: 3588

💛 - Coveralls


## Summary

This test verify that using gNMI setReqyest(Replace) we can insert statement in the middle of pre-existing policy, then remove any statement form policy, the re add this statement.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This test verify that using gNMI setReqyest(Replace) we can insert statement in the middle of pre-existing policy, then remove any statement form policy, the re add this statement.
This test verify that using a sequence of gNMI setRequest(Replace) RPC's we can insert a policy statement in the middle of pre-existing policy, then remove a statement from a policy, and then add the previously removed statement back to the policy.


## Subtests

* RT-7.10.1 Initial Policy
Copy link
Member

Choose a reason for hiding this comment

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

Here and throughout, use a level 3 heading for subtests. ie: ### RT-7.10.1 Initial Policy

}
}
```
* Verify that DUT accepted configuration without errors.
Copy link
Member

Choose a reason for hiding this comment

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

  • Use gnmi Set with REPLACE option. Verify return code is OK.

}
```
* Verify that DUT accepted configuration without errors.
* Retrive "test-policy" from device using subscribeRequest once for `/routing-policy/policy-definitions/policy-definition[name="test-policy"]/*`. Compare with policy configured above.
Copy link
Member

Choose a reason for hiding this comment

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

Use gNMI Get to retrieve the 'config' paths for the above configuration. The gNMI response should match the 'config' paths used in the gNMI Set from the policy above.

* Retrive "test-policy" from device using subscribeRequest once for `/routing-policy/policy-definitions/policy-definition[name="test-policy"]/*`. Compare with policy configured above.

* RT-7.10.2 Policy statement insertion
* Configure policy "test-policy" and apply using setRequest Replace at `openconfig/routing-policy/`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* Configure policy "test-policy" and apply using setRequest Replace at `openconfig/routing-policy/`
* Generate policy "test-policy" and apply using gNMI Set with REPLACE option at `openconfig/routing-policy/`

}
```
* Verify that DUT accepted configuration without errors.
* Retrive "test-policy" from device using subscribeRequest once for `/routing-policy/policy-definitions/policy-definition[name="test-policy"]/*`. Compare with policy configured above.
Copy link
Member

Choose a reason for hiding this comment

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

The generated paths for the Set should match the paths retrieved from the Get exactly. There should be no additions or missing paths.

* RT-7.10.2 Policy statement insertion
* Configure policy "test-policy" and apply using setRequest Replace at `openconfig/routing-policy/`
```
{
Copy link
Member

Choose a reason for hiding this comment

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

This would replace the "test_policy" which above has statements 1,3,5,7,9 with a new test_policy containing only statemets 1,2,6,7,8,10. Statements 3,5,9 are omitted, so they would be removed. Is that the intent?

(likewise the community-sets are also affected)

* Retrive "test-policy" from device using subscribeRequest once for `/routing-policy/policy-definitions/policy-definition[name="test-policy"]/*`. Compare with policy configured above.

* RT-7.10.3 Policy statement removal
* Configure policy "test-policy" and apply using setRequest Replace at `openconfig/routing-policy/`
Copy link
Member

Choose a reason for hiding this comment

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

This appears to be the same as 7.10.2? Both contain statements 1,2,6,7,8,10.

If the desire is to delete one, perhaps change this to contain only statements 1,6,7,8,10. ?

@dplore dplore self-assigned this Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants