ActionRoutingTable table = localData();
Set<String> routedAction = new HashSet<>(table.getItems().size());
for (DOMActionInstance route : table.getItems()) {
- if (route.getType().getLastComponent() != null) {
- final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create(
- new NodeIdentifier(route.getType().getLastComponent()));
- if (!actionPath.isEmpty()) {
- routedAction.add(ROUTE_CONSTANT + actionPath + NAME_CONSTANT + route.getType());
- }
+ final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create(new NodeIdentifier(
+ route.getType().lastNodeIdentifier()));
+ if (!actionPath.isEmpty()) {
+ routedAction.add(ROUTE_CONSTANT + actionPath + NAME_CONSTANT + route.getType());
}
}
Collection<DOMActionInstance> routes = table.getItems();
Map<String, String> actionMap = new HashMap<>(routes.size());
for (DOMActionInstance route : routes) {
- if (route.getType().getLastComponent() != null) {
- final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create(
- new NodeIdentifier(route.getType().getLastComponent()));
- if (!actionPath.isEmpty()) {
- String routeString = actionPath.toString();
- if (routeString.contains(routeName)) {
- actionMap.put(ROUTE_CONSTANT + routeString + NAME_CONSTANT + route.getType(), address);
- }
+ final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create(new NodeIdentifier(
+ route.getType().lastNodeIdentifier()));
+ if (!actionPath.isEmpty()) {
+ String routeString = actionPath.toString();
+ if (routeString.contains(routeName)) {
+ actionMap.put(ROUTE_CONSTANT + routeString + NAME_CONSTANT + route.getType(), address);
}
}
}
Collection<DOMActionInstance> routes = table.getItems();
Map<String, String> actionMap = new HashMap<>(routes.size());
for (DOMActionInstance route : routes) {
- if (route.getType().getLastComponent() != null) {
- final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create(
- new NodeIdentifier(route.getType().getLastComponent()));
- if (!actionPath.isEmpty()) {
- String type = route.getType().toString();
- if (type.contains(name)) {
- actionMap.put(ROUTE_CONSTANT + actionPath + NAME_CONSTANT + type, address);
- }
+ final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create(new NodeIdentifier(
+ route.getType().lastNodeIdentifier()));
+ if (!actionPath.isEmpty()) {
+ String type = route.getType().toString();
+ if (type.contains(name)) {
+ actionMap.put(ROUTE_CONSTANT + actionPath + NAME_CONSTANT + type, address);
}
}
}