Closed krihal closed 1 year ago
Getting the same error:
debian@khn-dev[/]# set devices device r* config interfaces interface test config name test
debian@khn-dev[/]# set devices device r* config interfaces interface test config type ethernetCsmacd
debian@khn-dev[/]# validate
debian@khn-dev[/]# validate push
Transaction 6 failed Error Identityref validation failed, ethernetCsmacd not derived from interface-type in ietf-interfaces.yang:68 in state PUSH-VALIDATE of device r1
debian@khn-dev[/]# commit push
Transaction 7 failed Error Identityref validation failed, ethernetCsmacd not derived from interface-type in ietf-interfaces.yang:68 in state PUSH-VALIDATE of device r1
debian@khn-dev[/]#
There are some problems with the use of namespaces in the issue:
The type should have prefix: ianaift:
as in:
set devices device openconfig1 config interfaces interface test config type ianaift:ethernetCsmacd
If you use expand it should only offer types with proper prefixes.
However, you can text in a type without prefix, as in: ethernetCsmacd
But then the local validation should fail:
olof@alarik[/]# validate local
Sep 27 10:58:32: Validate failed. Edit and try again or discard changes: application operation-failed Identityref validation failed, ethernetCsmacd not derived from interface-type in ietf-interfaces.yang:68
But if yang-config is not VALIDATE, ie:
<yang-config>BIND</yang-config>
then local validation will not work, and the error will only be detected at push as the issue request shows.
Therefore I guess that the target is (1) type is manually texted, (2) yang-config is set to BIND.
Please change that, and check if it works.
As you write, setting yang-config to VALIDATE works. Closing.