X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnorthbound%2Fintegrationtest%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnorthbound%2Fintegrationtest%2FNorthboundIT.java;h=cabfb0ee5a1e98e27194cb244f445ca8ba3ca40d;hp=9c63f5e5aaaec452653004b04f57d5f6b72ee6b9;hb=91d7c1ee52322acad08e9f81228ac36b3aa684f5;hpb=454f93d530edea269105cebd0020d0bf1aa75c79 diff --git a/opendaylight/northbound/integrationtest/src/test/java/org/opendaylight/controller/northbound/integrationtest/NorthboundIT.java b/opendaylight/northbound/integrationtest/src/test/java/org/opendaylight/controller/northbound/integrationtest/NorthboundIT.java index 9c63f5e5aa..cabfb0ee5a 100644 --- a/opendaylight/northbound/integrationtest/src/test/java/org/opendaylight/controller/northbound/integrationtest/NorthboundIT.java +++ b/opendaylight/northbound/integrationtest/src/test/java/org/opendaylight/controller/northbound/integrationtest/NorthboundIT.java @@ -62,7 +62,7 @@ public class NorthboundIT { private IUserManager userManager = null; private IInventoryListener invtoryListener = null; private IListenTopoUpdates topoUpdates = null; - + private static final String baseUrlPrefix = "http://127.0.0.1:8080/controller/nb/v2/"; private final Boolean debugMsg = false; private String stateToString(int state) { @@ -267,7 +267,7 @@ public class NorthboundIT { @Test public void testSubnetsNorthbound() throws JSONException, ConstructionException { System.out.println("Starting Subnets JAXB client."); - String baseURL = "http://127.0.0.1:8080/controller/nb/v2/subnetservice/"; + String baseURL = baseUrlPrefix + "subnetservice/"; String name1 = "testSubnet1"; String subnet1 = "1.1.1.1/24"; @@ -410,7 +410,7 @@ public class NorthboundIT { @Test public void testStaticRoutingNorthbound() throws JSONException { System.out.println("Starting StaticRouting JAXB client."); - String baseURL = "http://127.0.0.1:8080/controller/nb/v2/staticroute/"; + String baseURL = baseUrlPrefix + "staticroute/"; String name1 = "testRoute1"; String prefix1 = "192.168.1.1/24"; @@ -491,7 +491,7 @@ public class NorthboundIT { @Test public void testSwitchManager() throws JSONException { System.out.println("Starting SwitchManager JAXB client."); - String baseURL = "http://127.0.0.1:8080/controller/nb/v2/switchmanager/default/"; + String baseURL = baseUrlPrefix + "switchmanager/default/"; // define Node/NodeConnector attributes for test int nodeId_1 = 51966; @@ -642,7 +642,7 @@ public class NorthboundIT { "SET_NW_SRC", "SET_NW_DST", "SET_NW_TOS", "SET_TP_SRC", "SET_TP_DST" }; System.out.println("Starting Statistics JAXB client."); - String baseURL = "http://127.0.0.1:8080/controller/nb/v2/statistics/default/"; + String baseURL = baseUrlPrefix + "statistics/default/"; String result = getJsonResult(baseURL + "flow"); JSONTokener jt = new JSONTokener(result); @@ -833,7 +833,7 @@ public class NorthboundIT { @Test public void testFlowProgrammer() throws JSONException { System.out.println("Starting FlowProgrammer JAXB client."); - String baseURL = "http://127.0.0.1:8080/controller/nb/v2/flowprogrammer/default/"; + String baseURL = baseUrlPrefix + "flowprogrammer/default/"; // Attempt to get a flow that doesn't exit. Should return 404 // status. String result = getJsonResult(baseURL + "node/STUB/51966/staticFlow/test1", "GET"); @@ -972,7 +972,7 @@ public class NorthboundIT { Integer nodeConnectorId_2 = 34; String vlan_2 = "123"; - String baseURL = "http://127.0.0.1:8080/controller/nb/v2/hosttracker/default"; + String baseURL = baseUrlPrefix + "hosttracker/default"; // test PUT method: addHost() JSONObject fc_json = new JSONObject(); @@ -1126,14 +1126,14 @@ public class NorthboundIT { } else { JSONObject ja = json.getJSONObject("hostConfig"); String na = ja.getString("networkAddress"); - return (na.equalsIgnoreCase(hostIp)) ? true : false; + return na.equalsIgnoreCase(hostIp); } } @Test public void testTopology() throws JSONException, ConstructionException { System.out.println("Starting Topology JAXB client."); - String baseURL = "http://127.0.0.1:8080/controller/nb/v2/topology/default"; + String baseURL = baseUrlPrefix + "topology/default"; // === test GET method for getTopology() short state_1 = State.EDGE_UP, state_2 = State.EDGE_DOWN;