Skip to content

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

@ghost

Description

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions