Skip to content

Commit

Permalink
Merge pull request #2547 from aapostoliuk/T4704-circinus
Browse files Browse the repository at this point in the history
policy: T4704: Allowed to set metric (MED) to (+/-)rtt
  • Loading branch information
c-po authored Dec 1, 2023
2 parents 5a524fa + 5d98e80 commit 12957f9
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions interface-definitions/policy.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -1446,9 +1446,18 @@
<format>u32:0-4294967295</format>
<description>Metric value</description>
</valueHelp>
<valueHelp>
<format>&lt;+/-rtt&gt;</format>
<description>Add or subtract round trip time</description>
</valueHelp>
<valueHelp>
<format>&lt;rtt&gt;</format>
<description>Round trip time</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--relative --"/>
<validator name="numeric" argument="--range 0-4294967295"/>
<regex>^[+|-]?rtt$</regex>
</constraint>
</properties>
</leafNode>
Expand Down
27 changes: 27 additions & 0 deletions smoketest/scripts/cli/test_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,33 @@ def test_route_map(self):
'metric' : '-20',
},
},
'30': {
'action': 'permit',
'match': {
'ip-nexthop-addr': ipv4_nexthop_address,
},
'set': {
'metric': 'rtt',
},
},
'40': {
'action': 'permit',
'match': {
'ip-nexthop-addr': ipv4_nexthop_address,
},
'set': {
'metric': '+rtt',
},
},
'50': {
'action': 'permit',
'match': {
'ip-nexthop-addr': ipv4_nexthop_address,
},
'set': {
'metric': '-rtt',
},
},
},
},
}
Expand Down

0 comments on commit 12957f9

Please sign in to comment.