Clean up IT and address Bug 3812
[neutron.git] / integration / test / src / test / java / org / opendaylight / neutron / e2etest / NeutronLoadBalancerTests.java
1 /*
2  * Copyright (C) 2015 IBM, Inc.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.neutron.e2etest;
10
11 import java.io.OutputStreamWriter;
12
13 import java.lang.Thread;
14
15 import java.net.HttpURLConnection;
16 import java.net.URL;
17
18 import org.junit.Assert;
19
20 public class NeutronLoadBalancerTests {
21     String base;
22
23     public NeutronLoadBalancerTests(String base) {
24         this.base = base;
25     }
26
27     public void loadBalancer_collection_get_test() {
28         String url = base + "/lbaas/loadbalancers";
29         ITNeutronE2E.test_fetch(url, "Load Balancer Collection GET failed");
30     }
31
32     //TODO handle SB check
33     public void singleton_loadbalancer_create_test() {
34         String url = base + "/lbaas/loadbalancers";
35         String content = "{ \"loadbalancer\": { " +
36             "\"admin_state_up\": true, " +
37             "\"description\": \"simple lb\", " +
38             "\"id\": \"a36c20d0-18e9-42ce-88fd-82a35977ee8c\", " +
39             "\"listeners\": [], " +
40             "\"name\": \"loadbalancer1\", " +
41             "\"operating_status\": \"ONLINE\", " +
42             "\"provisioning_status\": \"ACTIVE\", " +
43             "\"tenant_id\": \"b7c1a69e88bf4b21a8148f787aef2081\", " +
44             "\"vip_address\": \"10.0.0.4\", " +
45             "\"vip_subnet_id\": \"013d3059-87a4-45a5-91e9-d721068ae0b2\" } }";
46         ITNeutronE2E.test_create(url, content, "Singleton Load Balancer Post Failed NB");
47     }
48 }