gpt4 book ai didi

org.opendaylight.controller.netconf.util.capability.YangModuleCapability类的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 02:23:31 35 4
gpt4 key购买 nike

本文整理了Java中org.opendaylight.controller.netconf.util.capability.YangModuleCapability类的一些代码示例,展示了YangModuleCapability类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangModuleCapability类的具体详情如下:
包路径:org.opendaylight.controller.netconf.util.capability.YangModuleCapability
类名称: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;
}

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com