Skip to content

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

@frederic-loui

Description

@frederic-loui

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions