- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.of()
方法的一些代码示例,展示了YangInstanceIdentifier.of()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangInstanceIdentifier.of()
方法的具体详情如下:
包路径:org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier
类名称:YangInstanceIdentifier
方法名:of
[英]Returns a new InstanceIdentifier with only one path argument of type NodeIdentifier with supplied QName.
[中]返回一个新的InstanceIdentifier,该InstanceIdentifier只包含一个带有QName的NodeIdentifier类型的路径参数。
代码示例来源:origin: io.fd.honeycomb.infra/test-tools
static YangInstanceIdentifier getRootInstanceIdentifier(final Class type) {
try {
return YangInstanceIdentifier.of(QName.class.cast(type.getField("QNAME").get(null)));
} catch (IllegalAccessException e) {
throw new IllegalStateException("Constant QNAME not accessible for type" + type, e);
} catch (NoSuchFieldException e) {
throw new IllegalStateException("Class " + type + " does not have QName defined", e);
}
}
代码示例来源:origin: io.fd.honeycomb.infra/test-tools
@Nonnull
@Override
public DataObject getNodeData(@Nonnull YangInstanceIdentifier yangInstanceIdentifier, @Nonnull String resourcePath) {
final InputStream resourceStream = this.getClass().getResourceAsStream(resourcePath);
checkState(resourceStream != null, "Resource %s not found", resourcePath);
final YangInstanceIdentifier nodeParent = getNodeParent(yangInstanceIdentifier).orElse(null);
final SchemaNode parentSchema = parentSchema(schemaContext(), serializer(), nodeParent, LOG);
// to be able to process containers in root of model
if (isRoot(yangInstanceIdentifier)) {
// if root ,read as root
final ContainerNode data = readJson(schemaContext(), resourceStream, parentSchema);
checkState(data.getValue().size() == 1, "Single root expected in %s", resourcePath);
//then extracts first child
final QName rootNodeType = data.getValue().iterator().next().getNodeType();
final YangInstanceIdentifier realIdentifier = YangInstanceIdentifier.of(rootNodeType);
return nodeBinding(serializer(), realIdentifier, data).getValue();
} else {
// reads just container
final YangInstanceIdentifier.NodeIdentifier nodeIdentifier = containerNodeIdentifier(yangInstanceIdentifier);
final ContainerNode data = readContainerEntryJson(schemaContext(), resourceStream, parentSchema, nodeIdentifier);
return nodeBinding(serializer(), yangInstanceIdentifier, data.getValue().iterator().next()).getValue();
}
}
代码示例来源:origin: org.opendaylight.controller/sal-broker-impl
private static AbstractDOMRpcRoutingTableEntry createRpcEntry(final SchemaContext context, final SchemaPath key, final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> implementations) {
final RpcDefinition rpcDef = findRpcDefinition(context, key);
if (rpcDef != null) {
final ContainerSchemaNode input = rpcDef.getInput();
if (input != null) {
for (DataSchemaNode c : input.getChildNodes()) {
for (UnknownSchemaNode extension : c.getUnknownSchemaNodes()) {
if (CONTEXT_REFERENCE.equals(extension.getNodeType())) {
final YangInstanceIdentifier keyId = YangInstanceIdentifier.of(c.getQName());
return new RoutedDOMRpcRoutingTableEntry(rpcDef, keyId, implementations);
}
}
}
}
return new GlobalDOMRpcRoutingTableEntry(rpcDef, implementations);
} else {
return new UnknownDOMRpcRoutingTableEntry(key, implementations);
}
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-bmp-impl
private void createEmptyMonitor() {
final DOMDataWriteTransaction wTx = this.domDataBroker.newWriteOnlyTransaction();
ensureParentExists(wTx, YangInstanceIdentifier.of(BmpMonitor.QNAME));
wTx.put(LogicalDatastoreType.OPERATIONAL,
YangInstanceIdentifier.builder().node(BmpMonitor.QNAME).node(Monitor.QNAME)
.nodeWithKey(Monitor.QNAME, MONITOR_ID_QNAME, this.monitorId.getValue()).build(),
ImmutableNodes.mapEntryBuilder(Monitor.QNAME, MONITOR_ID_QNAME, this.monitorId.getValue())
.addChild(ImmutableNodes.leafNode(MONITOR_ID_QNAME, this.monitorId.getValue()))
.addChild(ImmutableNodes.mapNodeBuilder(Router.QNAME).build())
.build());
try {
wTx.submit().checkedGet();
} catch (final TransactionCommitFailedException e) {
LOG.error("Failed to initiate BMP Monitor {}.", this.monitorId.getValue(), e);
}
}
我在一个模型中有两个属性: 叶协议(protocol), 离开港口。 我想说明: 如果 protocol = 'ssh' 则默认端口值为 22, 如果 protocol = 'http' 则默认端口值
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.YangIde
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.YangIde
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.YangIde
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
我是一名优秀的程序员,十分优秀!