Hi,
Working on a presentation focused on a value of local validation, I create a wrong ip prefix for a static route but I keep receiving a ydk.errors.YPYServiceProviderError instead of a ydk.errors.YPYDataValidationError and I have confirmed below that the message comes from the Netconf server. I have tried obvious wrong string like 1.1.1???, with the same result ... no local validation.
This is the code:
router_static = xr_ip_static_cfg.RouterStatic()
vrf_unicast = router_static.default_vrf.address_family.vrfipv4.vrf_unicast
vrf_prefix = vrf_unicast.vrf_prefixes.VrfPrefix()
vrf_prefix.prefix = "1.1.1.A" # Note that this is a wrong IP address
vrf_prefix.prefix_length = 24
vrf_next_hop_next_hop_address = vrf_prefix.vrf_route.vrf_next_hop_table.VrfNextHopNextHopAddress()
vrf_next_hop_next_hop_address.next_hop_address = "192.168.10.5"
vrf_prefix.vrf_route.vrf_next_hop_table.vrf_next_hop_next_hop_address.append(vrf_next_hop_next_hop_address)
vrf_unicast.vrf_prefixes.vrf_prefix.append(vrf_prefix)
and the logging:
CREATE operation initiated
1.1.1.A24192.168.10.51.1.1.A24192.168.10.5protocolbad-elementerrorns1:router-static/ns1:default-vrf/ns1:address-family/ns1:vrfipv4/ns1:vrf-unicast/ns1:vrf-prefixes/ns1:vrf-prefix[prefix = '1.1.1.A' and prefix-length = '24']/ns1:prefixprefix
The current release of YDK-Py (0.5.3) may miss some regular expression checks depending on the pattern involved. The new YDK-Py infrastructure (expected to be in 0.6.0) will take care of these issues.
Hi, Working on a presentation focused on a value of local validation, I create a wrong ip prefix for a static route but I keep receiving a ydk.errors.YPYServiceProviderError instead of a ydk.errors.YPYDataValidationError and I have confirmed below that the message comes from the Netconf server. I have tried obvious wrong string like1.1.1??? , with the same result ... no local validation.
This is the code: router_static = xr_ip_static_cfg.RouterStatic() vrf_unicast = router_static.default_vrf.address_family.vrfipv4.vrf_unicast vrf_prefix = vrf_unicast.vrf_prefixes.VrfPrefix() vrf_prefix.prefix = "1.1.1.A" # Note that this is a wrong IP address vrf_prefix.prefix_length = 24 vrf_next_hop_next_hop_address = vrf_prefix.vrf_route.vrf_next_hop_table.VrfNextHopNextHopAddress() vrf_next_hop_next_hop_address.next_hop_address = "192.168.10.5" vrf_prefix.vrf_route.vrf_next_hop_table.vrf_next_hop_next_hop_address.append(vrf_next_hop_next_hop_address) vrf_unicast.vrf_prefixes.vrf_prefix.append(vrf_prefix)
and the logging: CREATE operation initiated
CREATE operation completed