hnbgw: vty: set explicit go_parent_cb
A second level of depth will be added to the hnbgw node soon, which will need
explicit go-parent logic.
Change-Id: I8d1c18a396c215e8425ae49872b5c73316087d7d
diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c
index ff75aea..a458c76 100644
--- a/src/hnbgw_vty.c
+++ b/src/hnbgw_vty.c
@@ -54,6 +54,27 @@
return CMD_SUCCESS;
}
+int hnbgw_vty_go_parent(struct vty *vty)
+{
+ switch (vty->node) {
+ case IUH_NODE:
+ vty->node = HNBGW_NODE;
+ vty->index = NULL;
+ break;
+ default:
+ case HNBGW_NODE:
+ vty->node = CONFIG_NODE;
+ vty->index = NULL;
+ break;
+ case CONFIG_NODE:
+ vty->node = ENABLE_NODE;
+ vty->index = NULL;
+ break;
+ }
+
+ return vty->node;
+}
+
static void vty_dump_hnb_info(struct vty *vty, struct hnb_context *hnb)
{
struct hnbgw_context_map *map;