Open andaru opened 5 years ago
I am testing this with sonic but , did not see this problem with openconfig-acl.yang , But I am seeing this problem with other yang file .
My yang file and annotation are as below module ultraconfig-interfaces {
yang-version 1.1;
namespace "http://ultraconfig.com.au/ns/yang/ultraconfig-interfaces";
prefix if;
organization "Ultra Config Pty Ltd";
contact "Support: https://ultraconfig.com.au/contact/";
description "This YANG module has been created for the purpose of a tutorial. It defines the model for a basic ethernet interface";
revision "2020-01-03" { description "Initial Revision"; reference "Learn YANG - Full Tutorial for Beginners"; } typedef dotted-quad { type string { pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}'
Annotation file is module ultraconfig-interfaces-annot {
yang-version "1.1";
//namespace "http://openconfig.net/yang/annotation/if-annot"; namespace "http://ultraconfig.com.au/ns/yang/ultraconfig-interfaces/if-annot"; prefix "if-annot";
import ultraconfig-interfaces { prefix if; } import sonic-extensions { prefix sonic-ext; }
deviation /if:interfaces-ultra { deviate add { sonic-ext:table-name "ULTRA_TABLE1"; }
}
deviation /if:interfaces-ultra/if:interface { deviate add { sonic-ext:table-name "ULTRA_TABLE2"; } }
deviation /if:interfaces-ultra/if:interface/if:name {
deviation /if:interfaces-ultra/if:interface/if:address { deviate add { sonic-ext:field-name "address2"; } }
deviation /if:interfaces-ultra/if:interface/if:subnet-mask { deviate add { sonic-ext:field-name "subnet-mask2"; } }
deviation /if:interfaces-ultra/if:interface/if:enabled { deviate add { sonic-ext:field-name "enabled2"; }
}
deviation /if:interfaces-ultra/if:interface-state { deviate add { sonic-ext:field-name "interface-state2"; } } deviation /if:interfaces-ultra/if:interface-state/if:name { deviate add { sonic-ext:field-name "state-name2"; } }
deviation /if:interfaces-ultra/if:interface-state/if:oper-status { deviate add { sonic-ext:field-name "oper-status"; } }
}
Error seen Apr 22 06:50:12.200330 ip-172-26-8-32 INFO #/supervisord: rest-server cannot find target n ode to deviate, /if:interfaces-ultra/if:interface/if:address Apr 22 06:50:12.200334 ip-172-26-8-32 INFO #/supervisord: rest-server cannot find target n ode to deviate, /if:interfaces-ultra/if:interface/if:enabled Apr 22 06:50:12.200338 ip-172-26-8-32 INFO #/supervisord: rest-server cannot find target n ode to deviate, /if:interfaces-ultra/if:interface/if:name Apr 22 06:50:12.200341 ip-172-26-8-32 INFO #/supervisord: rest-server cannot find target n ode to deviate, /if:interfaces-ultra/if:interface/if:subnet-mask Apr 22 06:50:12.200767 ip-172-26-8-32 INFO #/supervisord: rest-server Found version 1.0.2 for yang module openconfig-acl
Please let us know how to fix this issue .
Thanks in advance
The new deviation support doesn't work with remote paths for us at all. Every one of our valid deviations fail to parse.
e.g.,
This deviation is found in a module importing
openconfig-acl
with prefixoc-acl
. This is the simplest example, but we see similar issues with augmented paths (where the namespace prefix change).RFC7950 section 6.5 says that:
As deviations are typically produced by a third-party to the original module author, this is the most common use case.
If you add some test cases to the previous change which include prefixes, you should see the error message above. e.g. a basic deviation module like this;