ConfD User Community

Hiding same level leafs in config CLI

I am trying to disable showing up of other leafs of a hierarchy when one of the leafs within the hierarchy is being configured. Below is the yang snippet and an example of what I am trying to achieve.

 grouping bridge-options {
    leaf mac-learning {
        tailf:info "Enable/Disable MAC learning";
        type empty;
    }
    leaf mac-move {
        tailf:info "Enable/Disable MAC move ";
        type empty;
    }
}

container bridge-domains {
    list bdomain-list {
        tailf:cli-no-keyword;

        container bridge-options {
            tailf:info "Bridge options";
            presence true;
            uses bridge-options;
        }

        leaf-list bd-interfaces {
            tailf:info "List of Bridge Domain Interface names";
            tailf:cli-full-command;
            view:pathmap "bd-interfaces";
            view:register-hook "rti_bd_interface";
            type string;
        }
    }
}

The behavior I am looking for is

admin@br1-cli(config)% set routing-instances rti-2 bridge-domains bd-1 bd-interfaces eth0 ?
Possible completions:
  <cr>

However, the behavior I see is

admin@br1-cli(config)% set routing-instances rti-2 bridge-domains bd-1 bd-interfaces eth0 ?
Possible completions:
  bridge-options - Bridge options

I tried adding tailf:cli-full-command under the bd-interfaces leaf-list but it doesnt seem to be helping. Is there another option that I can use or is there something I missed in the yang?

Thanks in advance.

You are using Juniper-style (or J-style) CLI, only some of the tailf:cli-* annotations work for that; and as you can read in the documentation, tailf:cli-full-command is used in I- and C-style CLIs.

J-style CLI is considerably less customizable than the other two, I don’t think there is a J-style equivalent for tailf:cli-full-command.

Thanks mvf for the response.