This was basically a link to configure/ipa which is not cleanly supported by the current VTY framework.
The test program uses the default implementation for go_parent_cb/vty_go_parent() and is_config_node, since config-ipa is a top level config node which is assumed by default. --- src/ipa_proxy.c | 8 -------- tests/ipa_proxy_test.c | 22 ---------------------- 2 files changed, 30 deletions(-)
diff --git a/src/ipa_proxy.c b/src/ipa_proxy.c index 30840ef..0c177a2 100644 --- a/src/ipa_proxy.c +++ b/src/ipa_proxy.c @@ -208,13 +208,6 @@ ipa_sock_src_accept_cb(struct ipa_server_link *link, int fd) /* * VTY commands for IPA */ -DEFUN(ipa_proxy, ipa_cmd, "ipa", "Configure the ipaccess proxy") -{ - vty->index = NULL; - vty->node = L_IPA_NODE; - return CMD_SUCCESS; -} - static int __ipa_instance_add(struct vty *vty, int argc, const char *argv[]) { struct ipa_proxy_instance *ipi; @@ -649,7 +642,6 @@ void ipa_proxy_vty_init(void) tall_ipa_proxy_ctx = talloc_named_const(libosmo_abis_ctx, 1, "ipa_proxy");
- install_element(ENABLE_NODE, &ipa_cmd); install_element(ENABLE_NODE, &ipa_instance_add_cmd); install_element(ENABLE_NODE, &ipa_instance_del_cmd); install_element(ENABLE_NODE, &ipa_instance_show_cmd); diff --git a/tests/ipa_proxy_test.c b/tests/ipa_proxy_test.c index 2ed30ff..8f4533c 100644 --- a/tests/ipa_proxy_test.c +++ b/tests/ipa_proxy_test.c @@ -28,31 +28,9 @@ const struct log_info ipa_proxy_test_log_info = { .num_cat = ARRAY_SIZE(ipa_proxy_test_cat), };
-static int bsc_vty_is_config_node(struct vty *vty, int node) -{ - switch(node) { - case L_IPA_NODE: - return 1; - break; - } - return 0; -} - -static enum node_type bsc_vty_go_parent(struct vty *vty) -{ - switch (vty->node) { - case L_IPA_NODE: - vty->node = VIEW_NODE; - break; - } - return vty->node; -} - static struct vty_app_info vty_info = { .name = "ipa-proxy-test", .version = "1.0", - .go_parent_cb = bsc_vty_go_parent, - .is_config_node = bsc_vty_is_config_node, };
#define IPA_PROXY_TEST_TELNET_PORT 4260