关于杨模型在这里没有太多的问题在stackoverflow,但我希望你能帮助我。Yang type not found
我创建了一个YANG模型,我想将其导入到另一个模块中。 import语句是这样的:
import service-abstract-type-definition {
prefix sfc-satd;
revision-date 2015-11-15;
}
而且它的用法是这样的:
leaf abstract-type {
type sfc-satd:service-abstract-type-definition;
description
"Abstract Type definition for the Service Function";
}
这是叶一组内。
导入模块如下所示:
module service-abstract-type-definition {
namespace "urn:odl:params:xml:ns:yang:sfc-satd";
prefix sfc-satd;
import service-locator {
prefix sfc-sl;
revision-date 2014-07-01;
}
description
"This module contains YANG definitions for managing Service Abstract Type Definition";
revision 2015-11-15 {
description
"First version of Service Abstract Type Definition.";
}
// Service Function
// Service Abstract Type definitions
container service-abstract-type-definition {
description
"List of parameters to define an abstract type of Service Function";
leaf name {
type string;
description "Service Function type names such as firewall, dpi, tcp-proxy, etc";
}
leaf symmetry {
type boolean;
description "SF is involved in a symmetric service path";
}
leaf bidirectionality {
type boolean;
description "SF handles uplink and downlink traffic";
}
leaf nsh-aware {
type boolean;
description "Service Function can handle Network Service Headers";
}
container dpl {
description "Data Plane Locators from the Service Function";
uses sfc-sl:data-plane-locator;
}
}
}
当编译我得到的错误,说类型饱和:服务抽象类定义没有找到,我真的不明白这一点。任何想法??
感谢
好吧,我想我想通了: 为了把引用作为一个类型的模块,你需要在该模块内创建一个typedef。我的情况就是这样。 – Ricardo
你能告诉我我需要在我的ubuntu系统上安装哪些工具来编译和测试yang模块? –