Skip to content

Commit

Permalink
Revert "Create a workaround for NETCONF-1218"
Browse files Browse the repository at this point in the history
This reverts commit 6b2b5cb.

Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
(cherry picked from commit 1498fce)
  • Loading branch information
ihrasko committed Jun 18, 2024
1 parent 3e9cd8e commit 054145b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ private void startLighty(final ControllerConfiguration controllerConfiguration,
throws ConfigurationException, ExecutionException, InterruptedException, TimeoutException,
ModuleStartupException {

//FIXME remove this after paths NETCONF-1218 is resolved.
restconfConfiguration.setRestconfServletContextPath("/rests");
restconfConfiguration.setHttpPort(8181);

//1. initialize and start Lighty controller (MD-SAL, Controller, YangTools, Akka)
LightyControllerBuilder lightyControllerBuilder = new LightyControllerBuilder();
this.lightyController = lightyControllerBuilder.from(controllerConfiguration).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class RestconfAppTest {
public static void init() {
restconfApp = new Main();
restconfApp.start();
restClient = new RestClient("http://localhost:8181/");
restClient = new RestClient("http://localhost:8888/");
}

/**
Expand All @@ -46,7 +46,7 @@ public static void init() {
@Test
public void simpleApplicationTest() throws IOException, InterruptedException {
HttpResponse<String> operations;
restClient.POST("rests/data/network-topology:network-topology/topology=topology-netconf",
restClient.POST("restconf/data/network-topology:network-topology/topology=topology-netconf",
"""
{
"netconf-topology:node": [
Expand All @@ -56,11 +56,11 @@ public void simpleApplicationTest() throws IOException, InterruptedException {
]
}""");

operations = restClient.GET("rests/operations");
operations = restClient.GET("restconf/operations");
Assert.assertEquals(operations.statusCode(), 200);
operations = restClient.GET("rests/data/network-topology:network-topology?content=config");
operations = restClient.GET("restconf/data/network-topology:network-topology?content=config");
Assert.assertEquals(operations.statusCode(), 200);
operations = restClient.GET("rests/data/network-topology:network-topology?content=nonconfig");
operations = restClient.GET("restconf/data/network-topology:network-topology?content=nonconfig");
Assert.assertEquals(operations.statusCode(), 200);
}

Expand Down

0 comments on commit 054145b

Please sign in to comment.