我正在研究一个项目,我需要解析tailf:使用opendaylight库在杨模式中的动作。我尝试在org.opendaylight.yangtools.yang.model.api中找到一个可用于解析tailf:action的类。然后我可以从这个类实例获取输入和输出(通常它们是叶子列表)来进行递归处理。任何人都知道org.opendaylight中是否有类.yangtools.yang.model.api可以支持tailf:action吗?
我展示了一个tailf:动作示例,如下所示。
提前致谢。
tailf:action set-ip-attributes {
description "set ip";
tailf:info "...";
tailf:exec "/usr/local/a.py" {
tailf:args "-c $(context) -p $(path)";
}
tailf:cli-mount-point "set";
input {
leaf ip {
type inet:ip-address;
mandatory true;
description "IP Address of the session";
tailf:info "IP Address of the session";
}
leaf attribute {
type string;
mandatory true;
description "Name of the attribute";
tailf:info "Name of the attribute";
}
}
output {
uses set-session-attribute;
}
}
Opendaylight仅支持“action”而不是“tailf:action”。使用以下类:org.opendaylight.yangtools.yang.model.api.ActionDefinition; org.opendaylight.yangtools.yang.model.api.ActionNodeContainer;