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

Request to suppress auto-completion for "deprecated" / "obsolete" status and warn the user. #410

Closed
navaneethyv opened this issue Jan 23, 2023 · 3 comments

Comments

@navaneethyv
Copy link

Hello !

From yang spec for keyword status

   o  "deprecated" indicates an obsolete definition, but it permits new/
      continued implementation in order to foster interoperability with
      older/existing implementations.

   o  "obsolete" means the definition is obsolete and SHOULD NOT be
      implemented and/or can be removed from implementations.```

[Slack Message](https://clixondev.slack.com/archives/C9NKJEXML/p1674468367732109)

Request to disable auto-completions for "obsolete" and "deprecated" keywords & provide warning if such an input is provided via CLI.
 
@navaneethyv
Copy link
Author

navaneethyv commented Jan 23, 2023

Suggestion on the behaviour.

  • "deprecated" and "obsolete" should both prevent the auto completion.
  • "deprecated" shall accept the config with a warning [ is deprecated ]
  • "obsolete" nodes should not accept the configs with a warning[ is obsolete]

@olofhagsand
Copy link
Member

olofhagsand commented Feb 12, 2023

My proposal is:

  • Do not generate any CLI syntax for obsolete elements (SHOULD NOT be implemented), that is leave it out altogether.
  • Accept deprecated syntax and generate completion. But as hidden commands, ie they can be given in scripts etc but are not visible in or <?> commands.

@olofhagsand olofhagsand self-assigned this Feb 12, 2023
olofhagsand added a commit that referenced this issue Feb 14, 2023
@olofhagsand
Copy link
Member

Please verify

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