Skip to content

YDK0.8.5 vrf route-target leaf stitching(bool) fails as invalid #1059

@hahamedp

Description

@hahamedp

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

In YDK0.8.5 - configuring vrf route-target stitching leaf (sending value as boolean) is considered as invalid value due to its converting this to string in infra setting as leaf

*** ydk.errors.YModelError: Invalid value "False" in "stitching" element. Path: /Cisco-IOS-XR-um-vrf-cfg:vrfs/vrf[vrf-name='vrf_l3vpn']/address-family/ipv4/unicast/Cisco-IOS-XR-um-router-bgp-cfg:import/route-target/four-byte-as-rts/four-byte-as-rt[as-number='65600'][index='100'][stitching='False']/stitching

(Pdb) rote_target.stitching
*** NameError: name 'rote_target' is not defined
(Pdb) route_target.stitching
False
(Pdb) type(route_target.stitching). >>>>set as boolean
<class 'bool'>
(Pdb) as_cfg.import_.route_target.four_byte_as_rts.four_byte_as_rt.append(route_target)
(Pdb) vrf_cfg.address_family.ipv4.unicast = as_cfg

https://community.cisco.com/t5/yang-tools/ydk0-8-5-vrf-route-target-leaf-stitching-bool-fails-as-invalid/m-p/4569021#M2250

Expected Behavior

stitching value to be used as Boolean

Current Behavior

its converting to string

Steps to Reproduce

Your Script

route_target = as_cfg.import_.route_target.four_byte_as_rts.FourByteAsRt()
as_or_addr = as_or_addr_nn.split(':')
route_target.as_number = int(as_or_addr[0])
route_target.index = int(as_or_addr[1])
route_target.stitching = False
as_cfg.import_.route_target.four_byte_as_rts.four_byte_as_rt.append(route_target)

Logs

Enable logging and post the logs below


System Information

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions