I have e yang model with conflicting names, the draft for l1topology has two enumerations admin-status and oper-status with a enum “down” which causes a conflict and confdc will not generate them.
I edited the yang model and added tailf:code-name to the enum “down”
Without your full YANG model, it is slightly more difficult to comment on how to do it for your specific case. However, following is a simple example that should illustrate the point of how to do it:
$ ls *.yang
enum-ann.yang enum.yang
$ cat *.yang
module enum-ann {
namespace "urn:dummy";
prefix "dummy";
import tailf-common {
prefix tailf;
}
tailf:annotate-module "enum" {
tailf:annotate-statement leaf[name='d'] {
tailf:code-name "my-d";
}
}
}
module enum {
namespace "urn:enum";
prefix "e";
import tailf-common {
prefix tailf;
}
typedef e {
type enumeration {
enum a;
enum b;
}
}
leaf d {
type enumeration {
enum c {
value 3;
}
enum d ;
}
}
}
My previous example only applied code-name to the leaf element named d. In order to assign a new code-name to the enum named d, the following is a better example: