Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cl:autocli-op hide has no effect in yang submodule #282

Closed
nowaits opened this issue Oct 31, 2021 · 3 comments
Closed

cl:autocli-op hide has no effect in yang submodule #282

nowaits opened this issue Oct 31, 2021 · 3 comments
Labels

Comments

@nowaits
Copy link
Contributor

nowaits commented Oct 31, 2021

Hi olof,
I'm using cl:autocli-op hide in yang submodule, and find has no effect.
my main yang is: example.yang

module example {
    yang-version 1.1;
    namespace "example.com";
    prefix ex;

    include demo;
    
    uses demo;
}

submodule is demo.yang

submodule demo {
    belongs-to "example" {
        prefix "demo";
    }

    import clixon-lib { prefix cl; }

    grouping demo {
        container a {
            cl:autocli-op hide;
            
            leaf b {
                type string;
            }
        }
    }
}

config.cli:

CLICON_MODE="config";
CLICON_PLUGIN="mgmt-cli";

# Autocli syntax tree operations
config @datamodel, cli_auto_edit("datamodel");
up, cli_auto_up("datamodel");
top, cli_auto_top("datamodel");
set @datamodel, cli_auto_set();
create @datamodel, cli_auto_create();
delete("Delete a configuration item") {
      @datamodel, cli_auto_del(); 
}

When enter , option a still exist in cli:

root@localhost (config) > set <TAB>
 a                    
@olofhagsand olofhagsand added the bug label Nov 4, 2021
@olofhagsand
Copy link
Member

confirmed.
Temporary work-around: add
import clixon-lib { prefix cl; }
in main module

@olofhagsand
Copy link
Member

It is actually worse, not only grouping/uses from submodules but the same issue exists for imported modules.

@olofhagsand
Copy link
Member

Fixed by patch ^.
Please verify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants