pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29778 )
Change subject: mgcp-client: vty: Write deprecation warning using non-mgw nodes ......................................................................
mgcp-client: vty: Write deprecation warning using non-mgw nodes
Let's advise all our users to migrate to the new pooled mode, the old VTY interface should be dropped at some point to avoid making it overcomplex to configure MGW. There's no need to maintain the same set of commands under 2 different places.
Change-Id: I95f717a0fcd3c4ca622e3989baa28fac1f7ec1ca --- M src/libosmo-mgcp-client/mgcp_client_vty.c 1 file changed, 7 insertions(+), 2 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved
diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c index da017f6..76f8c4f 100644 --- a/src/libosmo-mgcp-client/mgcp_client_vty.c +++ b/src/libosmo-mgcp-client/mgcp_client_vty.c @@ -52,8 +52,13 @@ { if (global_mgcp_client_pool && vty->node == global_mgcp_client_pool->vty_node->node) return vty->index; - else - return global_mgcp_client_conf; + + /* Global single MGCP config, deprecated: */ + vty_out(vty, "%% MGCP commands outside of 'mgw' nodes are deprecated. " + "You should consider reading User Manual and migrating to 'mgw' node.%s", + VTY_NEWLINE); + + return global_mgcp_client_conf; }
DEFUN(cfg_mgw_local_ip, cfg_mgw_local_ip_cmd,