You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
container mac {
description
"MAC address forwarding. ";
container globalAttribute {
description
"MAC global attribute.";
leaf macAgeTimeEnable {
type macAgeTimeType;
default "enable";
description
"Whether MAC address aging is enabled.";
}
leaf macAgingTime {
when "not(../macAgeTimeEnable='disable') or
../macAgeTimeEnable='enable'";
type uint32 {
range "60..1000000";
}
default "300";
description
"Aging time.";
}
}
while using generator, failed to generate api files:
[INFO][CGenerator]: Generating API files:
dire name = mac_dir/src/plugin/api/mac
Traceback (most recent call last):
File "/home/workspace/sysrepo-plugin-generator/src/sysrepo-plugin-generator.py", line 42, in
generator.generate_files()
File "/home//workspace/sysrepo-plugin-generator/src/target/c/generator.py", line 327, in generate_files
self.__generate_api_files()
File "/home/workspace/sysrepo-plugin-generator/src/target/c/generator.py", line 430, in __generate_api_files
prefix, node_list = dir_functions[dir]
KeyError: 'mac_dir/src/plugin/api/mac'
With bellow workaround ( after adding leaf test-wa, api files where generated properly.
Could you please check is it a configuration issue or generator issue.
container mac {
description
"MAC address forwarding. ";
**leaf test-wa{
type boolean;
default true;
description
"work around for key error while using plugin generator.";
}**
container globalAttribute {
description
"MAC global attribute.";
leaf macAgeTimeEnable {
type macAgeTimeType;
default "enable";
description
"Whether MAC address aging is enabled.";
}
leaf macAgingTime {
when "not(../macAgeTimeEnable='disable') or
../macAgeTimeEnable='enable'";
type uint32 {
range "60..1000000";
}
default "300";
description
"Aging time.";
}
}
The text was updated successfully, but these errors were encountered:
Hi
bellow snippet is copied from yang file :
https://github.com/YangModels/yang/blob/main/experimental/ietf-extracted-YANG-modules/ietf-mac%402016-12-30.yang
container mac {
description
"MAC address forwarding. ";
container globalAttribute {
description
"MAC global attribute.";
leaf macAgeTimeEnable {
type macAgeTimeType;
default "enable";
description
"Whether MAC address aging is enabled.";
}
while using generator, failed to generate api files:
[INFO][CGenerator]: Generating API files:
dire name = mac_dir/src/plugin/api/mac
Traceback (most recent call last):
File "/home/workspace/sysrepo-plugin-generator/src/sysrepo-plugin-generator.py", line 42, in
generator.generate_files()
File "/home//workspace/sysrepo-plugin-generator/src/target/c/generator.py", line 327, in generate_files
self.__generate_api_files()
File "/home/workspace/sysrepo-plugin-generator/src/target/c/generator.py", line 430, in __generate_api_files
prefix, node_list = dir_functions[dir]
KeyError: 'mac_dir/src/plugin/api/mac'
With bellow workaround ( after adding leaf test-wa, api files where generated properly.
Could you please check is it a configuration issue or generator issue.
container mac {
description
"MAC address forwarding. ";
container globalAttribute {
description
"MAC global attribute.";
leaf macAgeTimeEnable {
type macAgeTimeType;
default "enable";
description
"Whether MAC address aging is enabled.";
}
The text was updated successfully, but these errors were encountered: