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

Feature request: node's alias for CLI #434

Closed
EvgeniiVR opened this issue Jun 8, 2023 · 6 comments
Closed

Feature request: node's alias for CLI #434

EvgeniiVR opened this issue Jun 8, 2023 · 6 comments

Comments

@EvgeniiVR
Copy link
Contributor

Hello Team,
For our data model we are using a set of private and public yang models.
Due to this sometimes CLI looks no so pretty, semantically tricky and even not human readable.
So our idea is to have a feature extension that can be used in top level private yang with augment statement to define nodes with alias just for CLI representation and leave original public yang models as-is under the hood.

@EvgeniiVR
Copy link
Contributor Author

Hello @olofhagsand,
As I see in 6.3.0 release notes new "alias" extension has been added. Is it tied w/ this FR?

@olofhagsand
Copy link
Member

The work was started, but not completed. It was a mistake to add in the Yang without any code or testcase.

@olofhagsand
Copy link
Member

Nor should it have been in the CHANGELOG.
Thanks for pointing this out.

@EvgeniiVR
Copy link
Contributor Author

Got it. Thank you for strong support!

@olofhagsand
Copy link
Member

@EvgeniiVR one thing I see when looking at the alias function. In the CLI one could alias a keyword to an alias, but it will still show in the original when shown as XML.
For example, assume a leaf "orig" renamed to "alias", then

cli> set alias abc
cli> show config | display cli
set alias abc
cli> show config | display xml
<orig>abc></orig>   # <--- original shown

To change the symbol completely one needs to modify the YANG node itself which you probably do not want.

@olofhagsand
Copy link
Member

I also see "alias" will be difficult for non-leafs. Due to existing code.
I will make a leaf-only variant of "alias" for the time being.

olofhagsand added a commit that referenced this issue Aug 31, 2023
New `clixon-autocli@2023-09-01.yang` revision
Misc typos
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