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

YDK-gen to provide a way to recover the default value of a leaf programmatically #1025

Open
valeriodigregorio opened this issue Sep 8, 2020 · 0 comments

Comments

@valeriodigregorio
Copy link

valeriodigregorio commented Sep 8, 2020

Expected Behavior

In example for Python I can see that Cisco_IOS_XE_wireless_wlan_cfg.WlanCfgData.WlanCfgEntries.WlanCfgEntry.__doc__ contains indication of default value for each leaf:

            .. attribute:: wpa1_enabled
            
            	Configures WPA1 support
            	**type**\: bool
            
            	**default value**\: false

I would expect the user to be able to programmatically recover that value, in example like:

Cisco_IOS_XE_wireless_wlan_cfg.WlanCfgData.WlanCfgEntries.WlanCfgEntry.get_yang_default_value("wpa1_enabled")

That should also return the right type and eventually support enums.

Note that querying some devices via Netconf may not return indication of config/oper for leafs that are set to a default value.

Current Behavior

It's impossible to recover the default value programmatically.

Steps to Reproduce

Try to print the default value of a leaf.

Your Script

There's no way to do this.

Logs

N/A

System Information

YDK 0.8.4

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