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

After a read operation, python leaf is stored as string (not as native type) #733

Closed
ghost opened this issue Apr 3, 2018 · 2 comments
Closed
Assignees
Projects
Milestone

Comments

@ghost
Copy link

ghost commented Apr 3, 2018

Issue tracker is ONLY used for reporting bugs. Please use the YDK Community for any support issues.

Expected Behavior

After a read operation, the leaf should be stored as python native type

Current Behavior

The leaf is always stored as a string even if the base type is something else, like int or Identity()

Steps to Reproduce

Run the below script

Your Script

from ydk.models.ydktest import ydktest_sanity
              
runner = ydktest_sanity.Runner() 
runner.ytypes.built_in_t.identity_ref_value = ydktest_sanity.ChildIdentity()

crud.create(provider, runner)

runner_read = crud.read(provider, ydktest_sanity.Runner())
print(type(runner_read.ytypes.built_in_t.identity_ref_value))

Logs

Enable logging and post the logs below

In [6]: type(runner_read.ytypes.built_in_t.identity_ref_value)
Out[6]: str <-- should be ydktest_sanity.ChildIdentity()

System Information

ydk-gen master

@111pontes
Copy link
Collaborator

Still need fixing.

@111pontes 111pontes reopened this Apr 6, 2018
@ghost ghost added the python label Apr 28, 2018
@ghost ghost added this to In progress in YDK May 1, 2018
@ghost ghost added this to the 0.7.2-dev milestone May 1, 2018
@ghost ghost assigned ylil93 May 2, 2018
ylil93 added a commit to ylil93/ydk-gen that referenced this issue May 26, 2018
ylil93 added a commit to ylil93/ydk-gen that referenced this issue May 26, 2018
ylil93 added a commit to ylil93/ydk-gen that referenced this issue Jun 7, 2018
ghost pushed a commit that referenced this issue Sep 7, 2018
@ghost
Copy link
Author

ghost commented Sep 15, 2018

Fixed in #820

@ghost ghost closed this as completed Sep 15, 2018
YDK automation moved this from In progress to Done Sep 15, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
YDK
  
Done
Development

No branches or pull requests

2 participants