Neutron_Bug4027_Tests.runTests(base);
}
- static HttpURLConnection HttpURLConnectionFactoryGet(URL url) throws Exception {
+ static HttpURLConnection httpURLConnectionFactoryGet(URL url) throws Exception {
HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
httpConn.setRequestMethod("GET");
httpConn.setRequestProperty("Content-Type", "application/json");
return httpConn;
}
- static HttpURLConnection HttpURLConnectionFactoryDelete(URL url) throws Exception {
+ static HttpURLConnection httpURLConnectionFactoryDelete(URL url) throws Exception {
HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
httpConn.setRequestMethod("DELETE");
httpConn.setRequestProperty("Content-Type", "application/json");
return httpConn;
}
- static HttpURLConnection HttpURLConnectionFactoryPost(URL url, String content) throws Exception {
+ static HttpURLConnection httpURLConnectionFactoryPost(URL url, String content) throws Exception {
HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
httpConn.setRequestMethod("POST");
httpConn.setRequestProperty("Content-Type", "application/json");
return httpConn;
}
- static HttpURLConnection HttpURLConnectionFactoryPut(URL url, String content) throws Exception {
+ static HttpURLConnection httpURLConnectionFactoryPut(URL url, String content) throws Exception {
HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
httpConn.setRequestMethod("PUT");
httpConn.setRequestProperty("Content-Type", "application/json");
static void test_create(String url_s, String content, String context) {
try {
URL url = new URL(url_s);
- HttpURLConnection httpConn = HttpURLConnectionFactoryPost(url, content);
+ HttpURLConnection httpConn = httpURLConnectionFactoryPost(url, content);
Assert.assertEquals(context, 201, httpConn.getResponseCode());
} catch (Exception e) {
e.printStackTrace(); // temporary, remove me
static void test_modify(String url_s, String content, String context) {
try {
URL url = new URL(url_s);
- HttpURLConnection httpConn = HttpURLConnectionFactoryPut(url, content);
+ HttpURLConnection httpConn = httpURLConnectionFactoryPut(url, content);
Assert.assertEquals(context, 200, httpConn.getResponseCode());
} catch (Exception e) {
e.printStackTrace(); // temporary, remove me
static void test_fetch(String url_s, int responseCode, String context) {
try {
URL url = new URL(url_s);
- HttpURLConnection httpConn = HttpURLConnectionFactoryGet(url);
+ HttpURLConnection httpConn = httpURLConnectionFactoryGet(url);
Assert.assertEquals(context, responseCode, httpConn.getResponseCode());
} catch (Exception e) {
e.printStackTrace(); // temporary, remove me
static void test_delete(String url_s, int responseCode, String context) {
try {
URL url = new URL(url_s);
- HttpURLConnection httpConn = HttpURLConnectionFactoryDelete(url);
+ HttpURLConnection httpConn = httpURLConnectionFactoryDelete(url);
Assert.assertEquals(context, responseCode, httpConn.getResponseCode());
} catch (Exception e) {
e.printStackTrace(); // temporary, remove me
test_delete(url_s, 404, context);
}
- static private String fetchResponse(String url_s, String context) {
+ private static String fetchResponse(String url_s, String context) {
StringBuffer response = new StringBuffer();
try {
URL url = new URL(url_s);
- HttpURLConnection httpConn = HttpURLConnectionFactoryGet(url);
+ HttpURLConnection httpConn = httpURLConnectionFactoryGet(url);
Assert.assertEquals(context, 200, httpConn.getResponseCode());
BufferedReader in = new BufferedReader(new InputStreamReader(httpConn.getInputStream()));
String inputLine;
+ "{\"remote_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\", "
+ "\"direction\": \"ingress\", \"remote_ip_prefix\": \"\", \"protocol\": \"\", "
+ "\"ethertype\": \"IPv6\", \"tenant_id\": \"4c1be4874f0048fc8205acffe2821cd3\", "
- + "\"port_range_max\": \"\", \"port_range_min\": \"\", \"id\": \"7ba1a85b-3e05-44b5-90dd-0c50fe01ac46\", "
+ + "\"port_range_max\": \"\", \"port_range_min\": \"\", "
+ + "\"id\": \"7ba1a85b-3e05-44b5-90dd-0c50fe01ac46\", "
+ "\"security_group_id\": \"111f2d2d-4fe3-4679-b43a-17857ce91cab\"}, {\"remote_group_id\": "
+ "\"111f2d2d-4fe3-4679-b43a-17857ce91cab\", \"direction\": \"ingress\", "
+ "\"remote_ip_prefix\": \"\", \"protocol\": \"\", \"ethertype\": \"IPv4\", "