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

Does clixon cli support autocompletion for leafrefs pointed to another module? #455

Closed
EvgeniiVR opened this issue Sep 27, 2023 · 2 comments

Comments

@EvgeniiVR
Copy link

EvgeniiVR commented Sep 27, 2023

Hello team,

Let's say we have the following simple modules:

module ex-module1 {
  yang-version 1.1;
  namespace "urn:example:module1";
  prefix m1;
 
  list M1LIST1 {
    key name; 
	leaf name {
	  type string;
	}
  }
  
  leaf M1LEAF2 {
    type string;
  }
}
module ex-module2 {
  yang-version 1.1;
  namespace "urn:example:module2";
  prefix m2;
  
  import ex-module1 {
    prefix m1;
  }
  
  leaf M2L1 {
   	type leafref {
	  path "/m1:M1LIST1/m1:name";
      require-instance true;
    } 
  }
}

From the validation side it works and leafrefs are checked properly. But cli autocomplete fails with error:

Get configuration: application bad-attribute No namespace found for prefix: m1 <bad-attribute>select</bad-attribute>
However for intramodule desc paths autocompletion works fine.
Is it expected behaviour?

@olofhagsand
Copy link
Member

Confirm that this is a bug.
Note that CLICON_CLI_EXPAND_LEAFREF=true is a required setting for this functionality

@olofhagsand
Copy link
Member

Should be fixed. Please verify that it works now.

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

No branches or pull requests

2 participants