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
This commit is contained in:
parent
9153de6498
commit
c510fc29fc
|
@ -148,3 +148,4 @@ struct hnb_context *hnb_context_alloc(struct hnb_gw *gw, struct osmo_stream_srv_
|
|||
void hnb_context_release(struct hnb_context *ctx);
|
||||
|
||||
void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx);
|
||||
int hnbgw_vty_go_parent(struct vty *vty);
|
||||
|
|
|
@ -346,6 +346,7 @@ static const struct log_info hnbgw_log_info = {
|
|||
static struct vty_app_info vty_info = {
|
||||
.name = "OsmoHNBGW",
|
||||
.version = "0",
|
||||
.go_parent_cb = hnbgw_vty_go_parent,
|
||||
};
|
||||
|
||||
static struct {
|
||||
|
|
|
@ -54,6 +54,27 @@ DEFUN(cfg_hnbgw_iuh, cfg_hnbgw_iuh_cmd,
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue