jolly has uploaded this change for review.
Update VTY tests to Cisco like DSCP configuration
Related: OS#6753
Change-Id: If4f96e27861428bec183e93b765f7f0185d8fc54
---
M tests/vty/osmo_stp_test.vty
M tests/vty/ss7_asp_test.vty
M tests/vty/vty_test_runner.py
3 files changed, 53 insertions(+), 24 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/84/43684/1
diff --git a/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty
index 01cad83..7fd498a 100644
--- a/tests/vty/osmo_stp_test.vty
+++ b/tests/vty/osmo_stp_test.vty
@@ -125,6 +125,8 @@
xua rkm routing-key-allocation (static-only|dynamic-permitted)
sls-opc-dpc [opc-shift] [<0-8>] [dpc-shift] [<0-8>]
sls-shift <0-6>
+ qos class <1-255>
+ no qos class <1-255>
asp NAME <0-65535> <0-65535> (sua|m3ua|ipa)
asp NAME <0-65535> <0-65535> (sua|m3ua|ipa) (sctp|tcp)
no asp NAME
@@ -148,8 +150,9 @@
xua SIGTRAN xxxUA related
sls-opc-dpc Shift OPC and DPC bits used during routing decision
sls-shift Shift SLS bits used during routing decision
- asp Configure Application Server Process
+ qos QoS definition
no Negate a command or set its defaults
+ asp Configure Application Server Process
as Configure an Application Server
sccp-address Create/Modify an SCCP addressbook entry
timer Configure CS7 Instance default timer values
@@ -218,6 +221,7 @@
NAME Name of the SCCP Address
OsmoSTP(config-cs7)# no ?
+ qos QoS definition
asp Disable Application Server Process
as Disable Application Server
sccp-address Delete an SCCP addressbook entry
@@ -285,9 +289,8 @@
no remote-ip (A.B.C.D|X:X::X:X)
local-ip (A.B.C.D|X:X::X:X) [primary]
no local-ip (A.B.C.D|X:X::X:X)
- ip-dscp <0-63>
- no ip-dscp
- qos-class <0-7>
+ qos-class <1-255>
+ no qos-class
role (sg|asp|ipsp)
transport-role (client|server)
sctp-param init (num-ostreams|max-instreams|max-attempts|timeout) <0-65535>
@@ -317,8 +320,7 @@
no Negate a command or set its defaults
remote-ip Specify Remote IP Address of ASP
local-ip Specify Local IP Address from which to contact ASP
- ip-dscp Specify IP DSCP of ASP
- qos-class Specify QoS Class of ASP
+ qos-class QoS class
role Specify the xUA role for this ASP
transport-role Specify the transport layer role for this ASP
sctp-param Configure SCTP parameters
@@ -332,7 +334,7 @@
OsmoSTP(config-cs7-asp)# no ?
...
- ip-dscp Reset IP DSCP of ASP to default
+ qos-class QoS class
sctp-param Configure SCTP parameters
tcp-param Configure TCP parameters
destination-audit Configure ASP Auditing (xUA DAUD)
@@ -428,8 +430,8 @@
...
local-ip (A.B.C.D|X:X::X:X)
no local-ip (A.B.C.D|X:X::X:X)
- init-ip-dscp <0-63>
- no init-ip-dscp
+ qos-class <1-255>
+ no qos-class
accept-asp-connections (pre-configured|dynamic-permitted)
sctp-param init (num-ostreams|max-instreams) <0-65535>
no sctp-param init (num-ostreams|max-instreams)
@@ -439,16 +441,16 @@
...
local-ip Configure the Local IP Address for xUA
no Negate a command or set its defaults
- init-ip-dscp Specify IP DSCP of Listener
+ qos-class QoS class
accept-asp-connections Define what kind of ASP connections to accept
sctp-param Configure SCTP parameters
...
OsmoSTP(config-cs7-listen)# no ?
...
- local-ip Configure the Local IP Address for xUA
- init-ip-dscp Specify IP DSCP of Listener
- sctp-param Configure SCTP parameters
+ local-ip Configure the Local IP Address for xUA
+ qos-class QoS class
+ sctp-param Configure SCTP parameters
...
OsmoSTP(config-cs7-listen)# exit
diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty
index 5ea965b..04a29cc 100644
--- a/tests/vty/ss7_asp_test.vty
+++ b/tests/vty/ss7_asp_test.vty
@@ -123,6 +123,8 @@
xua rkm routing-key-allocation (static-only|dynamic-permitted)
sls-opc-dpc [opc-shift] [<0-8>] [dpc-shift] [<0-8>]
sls-shift <0-6>
+ qos class <1-255>
+ no qos class <1-255>
asp NAME <0-65535> <0-65535> (sua|m3ua|ipa)
asp NAME <0-65535> <0-65535> (sua|m3ua|ipa) (sctp|tcp)
no asp NAME
@@ -145,8 +147,9 @@
xua SIGTRAN xxxUA related
sls-opc-dpc Shift OPC and DPC bits used during routing decision
sls-shift Shift SLS bits used during routing decision
- asp Configure Application Server Process
+ qos QoS definition
no Negate a command or set its defaults
+ asp Configure Application Server Process
as Configure an Application Server
sccp-address Create/Modify an SCCP addressbook entry
timer Configure CS7 Instance default timer values
@@ -214,6 +217,7 @@
NAME Name of the SCCP Address
ss7_asp_vty_test(config-cs7)# no ?
+ qos QoS definition
asp Disable Application Server Process
as Disable Application Server
sccp-address Delete an SCCP addressbook entry
@@ -281,9 +285,8 @@
no remote-ip (A.B.C.D|X:X::X:X)
local-ip (A.B.C.D|X:X::X:X) [primary]
no local-ip (A.B.C.D|X:X::X:X)
- ip-dscp <0-63>
- no ip-dscp
- qos-class <0-7>
+ qos-class <1-255>
+ no qos-class
role (sg|asp|ipsp)
transport-role (client|server)
sctp-param init (num-ostreams|max-instreams|max-attempts|timeout) <0-65535>
@@ -313,8 +316,7 @@
no Negate a command or set its defaults
remote-ip Specify Remote IP Address of ASP
local-ip Specify Local IP Address from which to contact ASP
- ip-dscp Specify IP DSCP of ASP
- qos-class Specify QoS Class of ASP
+ qos-class QoS class
role Specify the xUA role for this ASP
transport-role Specify the transport layer role for this ASP
sctp-param Configure SCTP parameters
@@ -330,7 +332,7 @@
...
remote-ip Specify Remote IP Address of ASP
local-ip Specify Local IP Address from which to contact ASP
- ip-dscp Reset IP DSCP of ASP to default
+ qos-class QoS class
sctp-param Configure SCTP parameters
tcp-param Configure TCP parameters
destination-audit Configure ASP Auditing (xUA DAUD)
diff --git a/tests/vty/vty_test_runner.py b/tests/vty/vty_test_runner.py
index a01f193..21c9ad5 100755
--- a/tests/vty/vty_test_runner.py
+++ b/tests/vty/vty_test_runner.py
@@ -235,20 +235,36 @@
def vty_app(self):
return (4239, "./stp/osmo-stp", "OsmoSTP", "stp")
- def testDSCPSettings(self):
+ def _run_test_dscp_settings(self, qos_class):
self.vty.enable()
self.assertTrue(self.vty.verify("configure terminal",['']))
self.assertTrue(self.vty.verify("cs7 instance 0",['']))
+ if qos_class:
+ self.assertTrue(self.vty.verify("qos class 5",['']))
+ self.assertTrue(self.vty.verify("qos-ip-dscp 23",['']))
+ self.assertTrue(self.vty.verify("exit",['']))
+ self.assertTrue(self.vty.verify("qos class 6",['']))
+ self.assertTrue(self.vty.verify("qos-ip-dscp 42",['']))
+ self.assertTrue(self.vty.verify("exit",['']))
+ self.assertTrue(self.vty.verify("qos class 7",['']))
+ self.assertTrue(self.vty.verify("qos-ip-dscp 8",['']))
+ self.assertTrue(self.vty.verify("exit",['']))
self.assertTrue(self.vty.verify("no listen m3ua 2905",['']))
self.assertTrue(self.vty.verify("listen m3ua 2905",['']))
self.assertTrue(self.vty.verify("accept-asp-connections dynamic-permitted",['']))
self.assertTrue(self.vty.verify("local-ip 127.0.0.1",['']))
- self.assertTrue(self.vty.verify("init-ip-dscp 23",['']))
+ if qos_class:
+ self.assertTrue(self.vty.verify("qos-class 5",['']))
+ else:
+ self.assertTrue(self.vty.verify("init-ip-dscp 23",['']))
self.assertTrue(self.vty.verify("exit",['']))
self.assertTrue(self.vty.verify("asp asp-srv-m3ua 2906 2905 m3ua",['']))
self.assertTrue(self.vty.verify("local-ip 127.0.0.1",['']))
self.assertTrue(self.vty.verify("remote-ip 127.0.0.2",['']))
- self.assertTrue(self.vty.verify("ip-dscp 8",['']))
+ if qos_class:
+ self.assertTrue(self.vty.verify("qos-class 7",['']))
+ else:
+ self.assertTrue(self.vty.verify("ip-dscp 8",['']))
self.assertTrue(self.vty.verify("role asp",['']))
self.assertTrue(self.vty.verify("sctp-role server",['']))
self.assertTrue(self.vty.verify("no shutdown",['']))
@@ -256,7 +272,10 @@
self.assertTrue(self.vty.verify("asp asp-clnt-m3ua 2905 2906 m3ua",['']))
self.assertTrue(self.vty.verify("local-ip 127.0.0.2",['']))
self.assertTrue(self.vty.verify("remote-ip 127.0.0.1",['']))
- self.assertTrue(self.vty.verify("ip-dscp 42",['']))
+ if qos_class:
+ self.assertTrue(self.vty.verify("qos-class 6",['']))
+ else:
+ self.assertTrue(self.vty.verify("ip-dscp 42",['']))
self.assertTrue(self.vty.verify("role asp",['']))
self.assertTrue(self.vty.verify("sctp-role client",['']))
self.assertTrue(self.vty.verify("no shutdown",['']))
@@ -368,6 +387,12 @@
sorted_output = "\n".join(sorted(output.splitlines()))
self.assertEqual(sorted_output, expected_output)
+ def testDSCPSettings_without_QoSClass(self):
+ self._run_test_dscp_settings(qos_class = False)
+
+ def testDSCPSettings_with_QoSClass(self):
+ self._run_test_dscp_settings(qos_class = True)
+
if __name__ == '__main__':
import argparse
import sys
To view, visit change 43684. To unsubscribe, or for help writing mail filters, visit settings.