import static java.util.Objects.requireNonNull;
import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableList;
import com.google.common.util.concurrent.ListenableFuture;
import java.time.Instant;
import java.time.ZoneId;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
-import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
/**
* Facade of mounted netconf device.
*/
ListenerRegistration<DOMNotificationListener> registerNotificationListener(final DOMNotificationListener listener,
final SchemaPath notificationPath) {
- return notificationService.registerNotificationListener(listener,
- Absolute.of(ImmutableList.copyOf(notificationPath.getPathFromRoot())));
+ return notificationService.registerNotificationListener(listener, notificationPath.asAbsolute());
}
}
import com.google.common.annotations.Beta;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
this.contextTree = DataSchemaContextTree.from(schemaContext);
this.mappedRpcs = Maps.uniqueIndex(schemaContext.getOperations(), SchemaNode::getQName);
- this.actions = Maps.uniqueIndex(getActions(schemaContext),
- action -> Absolute.of(ImmutableList.copyOf(action.getPath().getPathFromRoot())));
+ this.actions = Maps.uniqueIndex(getActions(schemaContext), action -> action.getPath().asAbsolute());
// RFC6020 normal notifications
this.mappedNotifications = Multimaps.index(schemaContext.getNotifications(),
if (nestedNotificationInfo != null) {
return new NetconfDeviceTreeNotification(content,
// FIXME: improve this to cache the path
- Absolute.of(ImmutableList.copyOf(mostRecentNotification.getPath().getPathFromRoot())),
+ mostRecentNotification.getPath().asAbsolute(),
stripped.getKey(), nestedNotificationInfo.domDataTreeIdentifier);
}
import static org.opendaylight.netconf.sal.connect.netconf.util.NetconfMessageTransformUtil.toId;
import static org.opendaylight.netconf.util.NetconfUtil.NETCONF_DATA_QNAME;
-import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import java.io.IOException;
List<ActionDefinition> actions = NetconfMessageTransformer.getActions(ACTION_SCHEMA);
assertEquals(schemaPaths.size(), actions.size());
for (ActionDefinition actionDefinition : actions) {
- Absolute path = Absolute.of(ImmutableList.copyOf(actionDefinition.getPath().getPathFromRoot()));
+ Absolute path = actionDefinition.getPath().asAbsolute();
assertTrue(schemaPaths.remove(path));
}
}