laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/16394 )

Change subject: Add "no traffic-mode" configuration to AS
......................................................................

Add "no traffic-mode" configuration to AS

As per RFC4666 it is optional whether or not a traffic-mode IE is
part of ASPAC requests from ASP to SG.  We implemented that so far
by having none as default, unless the user specified an explicit
traffic-mode in the VTY.  However, we had no command to remove that
explicit configuration and return to the implicit one.

Change-Id: Ibe2b298dd76dc4b02521dc411ae9d570eaf5a9a2
---
M src/osmo_ss7_vty.c
M tests/vty/ss7_asp_test.vty
2 files changed, 15 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 9a2f8bb..9c31c00 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -878,6 +878,17 @@
        return CMD_SUCCESS;
 }

+DEFUN(as_no_traf_mode, as_no_traf_mode_cmd,
+       "no traffic-mode",
+       NO_STR "Remove explicit traffic mode of operation of this AS\n")
+{
+       struct osmo_ss7_as *as = vty->index;
+
+       as->cfg.mode = 0;
+       as->cfg.mode_set_by_vty = false;
+       return CMD_SUCCESS;
+}
+
 DEFUN(as_recov_tout, as_recov_tout_cmd,
        "recovery-timeout <1-2000>",
        "Specifies the recovery timeout value in milliseconds\n"
@@ -1931,6 +1942,7 @@
        install_element(L_CS7_AS_NODE, &as_asp_cmd);
        install_element(L_CS7_AS_NODE, &as_no_asp_cmd);
        install_element(L_CS7_AS_NODE, &as_traf_mode_cmd);
+       install_element(L_CS7_AS_NODE, &as_no_traf_mode_cmd);
        install_element(L_CS7_AS_NODE, &as_recov_tout_cmd);
        install_element(L_CS7_AS_NODE, &as_qos_class_cmd);
        install_element(L_CS7_AS_NODE, &as_rout_key_cmd);
diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty
index 9bafb02..7411b1f 100644
--- a/tests/vty/ss7_asp_test.vty
+++ b/tests/vty/ss7_asp_test.vty
@@ -250,6 +250,7 @@
   asp NAME
   no asp NAME
   traffic-mode (broadcast | loadshare | roundrobin | override)
+  no traffic-mode
   recovery-timeout <1-2000>
   qos-class <0-255>
   routing-key RCONTEXT DPC
@@ -271,7 +272,8 @@
   point-code        Point Code Specific Features

 ss7_asp_vty_test(config-cs7-as)# no ?
-  asp  Specify ASP to be removed from this AS
+  asp           Specify ASP to be removed from this AS
+  traffic-mode  Remove explicit traffic mode of operation of this AS

 ss7_asp_vty_test(config-cs7-as)# do show cs7 instance 0 as all
                           Routing    Routing Key                          Cic  
 Cic   Traffic

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16394
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ibe2b298dd76dc4b02521dc411ae9d570eaf5a9a2
Gerrit-Change-Number: 16394
Gerrit-PatchSet: 4
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-CC: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to