import com.google.common.collect.Sets;
import com.google.common.util.concurrent.Uninterruptibles;
import com.typesafe.config.ConfigFactory;
-import java.net.URI;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import org.opendaylight.mdsal.dom.api.DOMActionInstance;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
-import org.opendaylight.yangtools.yang.model.api.SchemaPath;
+import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
final int nRoutes = 500;
final Collection<DOMActionInstance> added = new ArrayList<>(nRoutes);
for (int i = 0; i < nRoutes; i++) {
- QName type = QName.create(URI.create("/mockaction"), "mockaction" + routeIdCounter++);
- final DOMActionInstance routeId = DOMActionInstance.of(SchemaPath.create(true,
- type), LogicalDatastoreType.OPERATIONAL, YangInstanceIdentifier.create(new
- YangInstanceIdentifier.NodeIdentifier(type)));
+ QName type = QName.create("/mockaction", "mockaction" + routeIdCounter++);
+ final DOMActionInstance routeId = DOMActionInstance.of(Absolute.of(type), LogicalDatastoreType.OPERATIONAL,
+ YangInstanceIdentifier.create(new YangInstanceIdentifier.NodeIdentifier(type)));
added.add(routeId);
//Uninterruptibles.sleepUninterruptibly(50, TimeUnit.MILLISECONDS);
}
private List<DOMActionInstance> createRouteIds() {
- QName type = QName.create(URI.create("/mockaction"), "mockaction" + routeIdCounter++);
+ QName type = QName.create("/mockaction", "mockaction" + routeIdCounter++);
List<DOMActionInstance> routeIds = new ArrayList<>(1);
- routeIds.add(DOMActionInstance.of(SchemaPath.create(true, type),
- LogicalDatastoreType.OPERATIONAL, YangInstanceIdentifier.create(
- new YangInstanceIdentifier.NodeIdentifier(type))));
+ routeIds.add(DOMActionInstance.of(Absolute.of(type), LogicalDatastoreType.OPERATIONAL,
+ YangInstanceIdentifier.create(new YangInstanceIdentifier.NodeIdentifier(type))));
return routeIds;
}
}