Skip to content

CLI types need additional attribute for customizing error messages #106

@pprindeville

Description

@pprindeville

When using a specification like:

<basedn:string regexp:"(((CN|cn)=([^,]*)),)?((((CN|cn|OU|ou)=[^,]+,?)+),)?(((DC|dc)=[^,]+,?)+)">

a failure to match this generates the following diagnostic:

tnsr1 tnsr(config-ldap)# basedn "wrong"
Feb 15 12:41:31: clicon_parse result:0 command: "basedn "wrong""
CLI syntax error: "basedn "wrong"": "wrong" is invalid input for cli command: basedn
tnsr1 tnsr(config-ldap)# 

which is generic enough to be of little help.

Recommending an additional field called error-message:<string> that would allow CLI writers to customize error messages.

The string could optionally contain a %s field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions