pespin submitted this change.
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(-)
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,
To view, visit change 29778. To unsubscribe, or for help writing mail filters, visit settings.