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

holo-cli should not move to on to a wrong "token" #3

Open
frederic-loui opened this issue Apr 17, 2024 · 0 comments
Open

holo-cli should not move to on to a wrong "token" #3

frederic-loui opened this issue Apr 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@frederic-loui
Copy link
Member

frederic-loui commented Apr 17, 2024

When trying to apply wrong IPv4 address for example holo-cli should not add the wrong token (and thus update the prompt):

holo(config)# interfaces interface eth3
holo(config/interface[eth3])# ipv4 enabled true
holo(config/interface[eth3])# ipv4 address 1.2.3.455 prefix-length 24
% failed to edit configuration: Unsatisfied pattern - "1.2.3.455" does not conform to "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?".
holo(config/interface[eth3]/address[1.2.3.455])#

The message could be more human/user friendly:

% failed to edit configuration: Unsatisfied pattern - "1.2.3.455" does not conform to "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?".

It can be for example:

% error: invalid ipv4 format
@rwestphal rwestphal added the enhancement New feature or request label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants