import org.opendaylight.transportpce.common.network.RequestProcessor;
import org.opendaylight.transportpce.pce.constraints.PceConstraints;
import org.opendaylight.transportpce.pce.constraints.PceConstraintsCalc;
import org.opendaylight.transportpce.common.network.RequestProcessor;
import org.opendaylight.transportpce.pce.constraints.PceConstraints;
import org.opendaylight.transportpce.pce.constraints.PceConstraintsCalc;
import org.opendaylight.transportpce.pce.utils.JsonUtil;
import org.opendaylight.transportpce.pce.utils.PceTestData;
import org.opendaylight.transportpce.test.AbstractTest;
import org.opendaylight.transportpce.pce.utils.JsonUtil;
import org.opendaylight.transportpce.pce.utils.PceTestData;
import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.path.description.AToZDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.path.description.ZToADirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.path.description.atoz.direction.AToZ;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.path.description.atoz.direction.AToZBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.path.description.atoz.direction.AToZKey;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.path.description.ztoa.direction.ZToA;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.path.description.ztoa.direction.ZToABuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.path.description.ztoa.direction.ZToAKey;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.pce.resource.Resource;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.pce.resource.ResourceBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.pce.resource.resource.resource.TerminationPoint;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev200629.pce.resource.resource.resource.TerminationPointBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZKey;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToA;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToABuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToAKey;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.Resource;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.ResourceBuilder;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPoint;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPointBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network;
private GnpyUtilitiesImpl gnpyUtilitiesImpl;
private NetworkTransactionImpl networkTransaction;
private static HttpServer httpServer;
private GnpyUtilitiesImpl gnpyUtilitiesImpl;
private NetworkTransactionImpl networkTransaction;
private static HttpServer httpServer;
+ @Before
+ public void initConsumer() {
+ gnpyConsumer = new GnpyConsumerImpl("http://localhost:9998", "mylogin", "mypassword",
+ getDataStoreContextUtil().getBindingDOMCodecServices());
+ }
+
@BeforeClass
public static void init() {
// here we cannot use JerseyTest as we already extends AbstractTest
final ResourceConfig rc = new ResourceConfig(GnpyStub.class);
@BeforeClass
public static void init() {
// here we cannot use JerseyTest as we already extends AbstractTest
final ResourceConfig rc = new ResourceConfig(GnpyStub.class);
throws InterruptedException, ExecutionException {
InstanceIdentifier<Network> nwInstanceIdentifier = InstanceIdentifier.builder(Networks.class)
.child(Network.class, new NetworkKey(new NetworkId(networkId))).build();
throws InterruptedException, ExecutionException {
InstanceIdentifier<Network> nwInstanceIdentifier = InstanceIdentifier.builder(Networks.class)
.child(Network.class, new NetworkKey(new NetworkId(networkId))).build();
dataWriteTransaction.put(LogicalDatastoreType.CONFIGURATION, nwInstanceIdentifier, network);
dataWriteTransaction.commit().get();
}
dataWriteTransaction.put(LogicalDatastoreType.CONFIGURATION, nwInstanceIdentifier, network);
dataWriteTransaction.commit().get();
}
public void askNewPathFromGnpyNullResultTest() throws Exception {
gnpyUtilitiesImpl = new GnpyUtilitiesImpl(networkTransaction,
PceTestData.getGnpyPCERequest("XPONDER-1", "XPONDER-2"),
public void askNewPathFromGnpyNullResultTest() throws Exception {
gnpyUtilitiesImpl = new GnpyUtilitiesImpl(networkTransaction,
PceTestData.getGnpyPCERequest("XPONDER-1", "XPONDER-2"),
public void askNewPathFromGnpyTest() throws Exception {
gnpyUtilitiesImpl = new GnpyUtilitiesImpl(networkTransaction,
PceTestData.getGnpyPCERequest("XPONDER-3", "XPONDER-4"),
public void askNewPathFromGnpyTest() throws Exception {
gnpyUtilitiesImpl = new GnpyUtilitiesImpl(networkTransaction,
PceTestData.getGnpyPCERequest("XPONDER-3", "XPONDER-4"),
PceConstraintsCalc constraints = new PceConstraintsCalc(PceTestData.getPCE_simpletopology_test1_request(),
networkTransaction);
PceConstraints pceHardConstraints = constraints.getPceHardConstraints();
PceConstraintsCalc constraints = new PceConstraintsCalc(PceTestData.getPCE_simpletopology_test1_request(),
networkTransaction);
PceConstraints pceHardConstraints = constraints.getPceHardConstraints();
gnpyUtilitiesImpl = new GnpyUtilitiesImpl(networkTransaction,
PceTestData.getGnpyPCERequest("XPONDER-1", "XPONDER-2"),
gnpyUtilitiesImpl = new GnpyUtilitiesImpl(networkTransaction,
PceTestData.getGnpyPCERequest("XPONDER-1", "XPONDER-2"),
PceConstraintsCalc constraints = new PceConstraintsCalc(PceTestData.getPCE_simpletopology_test1_request(),
networkTransaction);
PceConstraints pceHardConstraints = constraints.getPceHardConstraints();
PceConstraintsCalc constraints = new PceConstraintsCalc(PceTestData.getPCE_simpletopology_test1_request(),
networkTransaction);
PceConstraints pceHardConstraints = constraints.getPceHardConstraints();