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

datamodel tree generated form basemodel tree is not proper when a list has more than one key and key is of enum type #417

Closed
DeekshaBhandary opened this issue Feb 6, 2023 · 2 comments

Comments

@DeekshaBhandary
Copy link

list list1{
   key "key1 key2";
    
	leaf key1 {
	type custom_type;
	//is an enum;
	}
	
	leaf key2 {
	type string;
	}
}

typedef custom_type {
        type enumeration {
            enum value1 {
                value "1";
            }
            enum value2 {
                value "2";
            }
            enum value3 {
                value "3";
            }
        }
        description "Custom enum values;
}

Generated CLI:

cli>set list1 <PRESS ?>
<key1>     Helptext for key1
cli>set list1 test <PRESS ?>
<cr>                        <------------------- Presence of <cr>. Not a right behavior
<key2> 	Helptext for key2
cli>

If the leaf key1 is of any type other than enum the generated datamodel tree would be of below syntax:

cli>set list1 <PRESS ?>
<key1>     Helptext for key1
cli>set list1 test <PRESS ?>
<key2> 	Helptext for key2
cli>
olofhagsand added a commit to clicon/cligen that referenced this issue Feb 12, 2023
…en a list has more than one key and key is of enum type](clicon/clixon#417)

Added accessor function for co_filter
@olofhagsand
Copy link
Member

Fixed in CLIgen. Please verify.

olofhagsand added a commit that referenced this issue Feb 12, 2023
…95=true and ietf-yang-libra$

  * Removed obsolete option: `CLICON_MODULE_LIBRARY_RFC7895'
  * Obsolete config options given in the confi file are considered an error
* Added section in CONTRIBUTING relating to optimzation
* Changed reset merge to implicit default values.
  * This avoids a potential overwriting of explicitly set default values in the existing config
* Adapted some code to [Make cligen_* functions const ](clicon/cligen#83)
* Test: fixed test for * Fixed: [datamodel tree generated from basemodel tree is not proper when a list has more than one key and key is of enum type](#417)
@DeekshaBhandary
Copy link
Author

This issue is fixed

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