本文整理了Java中org.opendaylight.controller.netconf.util.capability.YangModuleCapability
类的一些代码示例,展示了YangModuleCapability
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangModuleCapability
类的具体详情如下:
包路径:org.opendaylight.controller.netconf.util.capability.YangModuleCapability
类名称:YangModuleCapability
[英]Yang model representing capability.
[中]杨模型代表能力。
代码示例来源:origin: org.opendaylight.controller/config-netconf-connector
@Override
public Uri apply(final Module input) {
return new Uri(new YangModuleCapability(input, input.getSource()).getCapabilityUri());
}
};
代码示例来源:origin: org.opendaylight.controller/mdsal-netconf-connector
private static Optional<YangModuleCapability> moduleToCapability(final Module module) {
final String source = module.getSource();
if(source !=null) {
return Optional.of(new YangModuleCapability(module, source));
} else {
LOG.warn("Missing source for module {}. This module will not be available from netconf server",
module);
}
return Optional.absent();
}
代码示例来源:origin: org.opendaylight.controller/netconf-util
public YangModuleCapability(final Module module, final String moduleContent) {
super(toCapabilityURI(module));
this.content = moduleContent;
this.moduleName = module.getName();
this.moduleNamespace = module.getNamespace().toString();
this.revision = SimpleDateFormatUtil.getRevisionFormat().format(module.getRevision());
}
代码示例来源:origin: org.opendaylight.controller/config-netconf-connector
@Override
public Capability apply(final Module module) {
return new YangModuleCapability(module, module.getSource());
}
};
代码示例来源:origin: org.opendaylight.controller/config-netconf-connector
public static Set<Capability> setupCapabilities(final YangStoreContext yangStoreSnapshot) {
Set<Capability> capabilities = new HashSet<>();
// [RFC6241] 8.3. Candidate Configuration Capability
capabilities.add(new BasicCapability("urn:ietf:params:netconf:capability:candidate:1.0"));
// TODO rollback on error not supported EditConfigXmlParser:100
// [RFC6241] 8.5. Rollback-on-Error Capability
// capabilities.add(new BasicCapability("urn:ietf:params:netconf:capability:rollback-on-error:1.0"));
Set<Module> modules = yangStoreSnapshot.getModules();
for (Module module : modules) {
capabilities.add(new YangModuleCapability(module, yangStoreSnapshot.getModuleSource(module)));
}
return capabilities;
}
内容来源于网络,如有侵权,请联系作者删除!