本文整理了Java中org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.toString()
方法的一些代码示例,展示了YangInstanceIdentifier.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangInstanceIdentifier.toString()
方法的具体详情如下:
包路径:org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier
类名称:YangInstanceIdentifier
方法名:toString
暂无
代码示例来源:origin: org.opendaylight.controller/sal-distributed-datastore
@Override
public void delete(PathArgument child) {
try {
output.write("\nDELETE -> ".getBytes());
output.write(current().node(child).toString().getBytes());
output.writeByte('\n');
} catch(IOException e) {
Throwables.propagate(e);
}
}
代码示例来源:origin: org.opendaylight.controller/sal-distributed-datastore
private void outputPathAndNode(String name, PathArgument child, NormalizedNode<?, ?> data) {
try {
output.writeByte('\n');
output.write(name.getBytes());
output.write(" -> ".getBytes());
output.write(current().node(child).toString().getBytes());
output.write(": \n".getBytes());
NormalizedNodeXMLOutput.toStream(output, data);
output.writeByte('\n');
} catch(IOException | XMLStreamException e) {
Throwables.propagate(e);
}
}
}
代码示例来源:origin: org.opendaylight.controller/sal-distributed-datastore
@Override
public void onComplete(Throwable failure, Object result) {
if(failure != null) {
LOG.error("Failed to register DataChangeListener {} at path {}",
listener, path.toString(), failure);
} else {
RegisterChangeListenerReply reply = (RegisterChangeListenerReply) result;
setListenerRegistrationActor(actorContext.actorSelection(
reply.getListenerRegistrationPath()));
}
}
}, actorContext.getClientDispatcher());
代码示例来源:origin: org.opendaylight.bgpcep/bgp-bmp-impl
private BmpRibInWriter(final YangInstanceIdentifier tablesRoot, final DOMTransactionChain chain, final RIBExtensionConsumerContext ribExtensions,
final Set<TablesKey> tableTypes, final BindingCodecTree tree) {
this.chain = chain;
final DOMDataWriteTransaction tx = this.chain.newWriteOnlyTransaction();
this.tables = createTableInstance(tableTypes, tablesRoot, tx, ribExtensions, tree).build();
LOG.debug("New RIB table {} structure installed.", tablesRoot.toString());
tx.submit();
}
代码示例来源:origin: org.opendaylight.controller/sal-distributed-datastore
@Override
public void onComplete(final Throwable failure, final Object result) {
if (failure != null) {
LOG.error("Failed to register DataTreeChangeListener {} at path {}",
getInstance(), path.toString(), failure);
} else {
RegisterDataTreeChangeListenerReply reply = (RegisterDataTreeChangeListenerReply) result;
setListenerRegistrationActor(actorContext.actorSelection(
reply.getListenerRegistrationPath()));
}
}
}, actorContext.getClientDispatcher());
代码示例来源:origin: opendaylight/controller
/**
* Search if the routing table route String contains routeName.
*/
private static Map<String,String> getRpcMemberMapByRoute(final RoutingTable table, final String routeName,
final String address) {
Set<DOMRpcIdentifier> routes = table.getRoutes();
Map<String, String> rpcMap = new HashMap<>(routes.size());
for (DOMRpcIdentifier route : routes) {
if (!route.getContextReference().isEmpty()) {
String routeString = route.getContextReference().toString();
if (routeString.contains(routeName)) {
rpcMap.put(ROUTE_CONSTANT + routeString + NAME_CONSTANT + route.getType(), address);
}
}
}
return rpcMap;
}
代码示例来源:origin: org.opendaylight.aaa/aaa-authz-service
private static AuthorizationResponseType checkAuthorization(ActionType actionType,
Authentication authentication, LogicalDatastoreType logicalDatastoreType,
YangInstanceIdentifier yangInstanceIdentifier) {
for (Policies policy : AuthzServiceImpl.listPolicies) {
// Action type is compared as string, since its type is string in
// the config yang. Comparison is case insensitive
if (authentication.roles().contains(policy.getRole().getValue())
&& (policy.getResource().getValue().equals(WILDCARD_TOKEN) || policy
.getResource().getValue().equals(yangInstanceIdentifier.toString()))
&& (policy.getAction().toLowerCase()
.equals(ActionType.Any.name().toLowerCase()) || actionType.name()
.toLowerCase().equals(policy.getAction().toLowerCase()))) {
return AuthorizationResponseType.Authorized;
}
}
// For helium release we unauthorize other requests.
return AuthorizationResponseType.NotAuthorized;
}
代码示例来源:origin: opendaylight/controller
private static int countNodes(final NormalizedNode<?,?> normalizedNode, final String namespaceFilter) {
if (normalizedNode == null) {
return 0;
}
final AtomicInteger count = new AtomicInteger();
new NormalizedNodeNavigator((level, parentPath, normalizedNode1) -> {
if (!(normalizedNode1.getIdentifier() instanceof AugmentationIdentifier)) {
if (normalizedNode1.getIdentifier().getNodeType().getNamespace().toString().contains(namespaceFilter)) {
count.incrementAndGet();
}
}
}).navigate(YangInstanceIdentifier.EMPTY.toString(), normalizedNode);
return count.get();
}
内容来源于网络,如有侵权,请联系作者删除!