2 * Copyright (C) 2015 IBM, Inc.
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
9 package org.opendaylight.neutron.e2etest;
11 import java.io.OutputStreamWriter;
13 import java.lang.Thread;
15 import java.net.HttpURLConnection;
18 import org.junit.Assert;
20 public class NeutronLoadBalancerTests {
23 public NeutronLoadBalancerTests(String base) {
27 public void loadBalancer_collection_get_test() {
28 String url = base + "/lbaas/loadbalancers";
29 ITNeutronE2E.test_fetch(url, "Load Balancer Collection GET failed");
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");