/*
 * Copyright (C) 2015 IBM, Inc.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */

package org.opendaylight.neutron.e2etest;

import java.io.OutputStreamWriter;

import java.lang.Thread;

import java.net.HttpURLConnection;
import java.net.URL;

import org.junit.Assert;

public class NeutronSecurityRuleTests {
    String base;

    public NeutronSecurityRuleTests(String base) {
        this.base = base;
    }

    public void securityRule_collection_get_test() {
        String url = base + "/security-group-rules";
        ITNeutronE2E.test_fetch(url, "Security Rule Collection GET failed");
    }

    public static void runTests(String base) {
        NeutronSecurityRuleTests securityRule_tester = new NeutronSecurityRuleTests(base);
        securityRule_tester.securityRule_collection_get_test();
    }
}

@@ -793,186 +793,1786 @@
 lic 
-static void runTests(String base) %7B%0A        NeutronSecurityRuleTests securityRule_tester = new NeutronSecurityRuleTests(base);%0A        securityRule_tester.securityRule_collection
+void singleton_sr_create_test() %7B%0A        String url = base + %22/security-group-rules%22;%0A        String content = %22 %7B%5C%22security_group_rule%5C%22: %22 +%0A            %22%7B%5C%22remote_group_id%5C%22: null, %5C%22direction%5C%22: %5C%22ingress%5C%22, %22 +%0A            %22%5C%22remote_ip_prefix%5C%22: null, %5C%22protocol%5C%22: %5C%22tcp%5C%22, %22 +%0A            %22%5C%22ethertype%5C%22: %5C%22IPv6%5C%22, %5C%22tenant_id%5C%22: %22 +%0A            %22%5C%2200f340c7c3b34ab7be1fc690c05a0275%5C%22, %5C%22port_range_max%5C%22: 77, %22 +%0A            %22%5C%22port_range_min%5C%22: 77, %22 +%0A            %22%5C%22id%5C%22: %5C%229b4be7fa-e56e-40fb-9516-1f0fa9185669%5C%22, %22 +%0A            %22%5C%22security_group_id%5C%22: %22 +%0A            %22%5C%22b60490fe-60a5-40be-af63-1d641381b784%5C%22%7D%7D%22;%0A        ITNeutronE2E.test_create(url, content, %22Security Rule Singleton Post Failed%22);%0A    %7D%0A%0A    public void sr_element_get_test() %7B%0A        String url = base + %22/security-group-rules/9b4be7fa-e56e-40fb-9516-1f0fa9185669%22;%0A        ITNeutronE2E.test_fetch(url, true, %22Security Rule Element Get Failed%22);%0A    %7D%0A%0A    public void sr_delete_test() %7B%0A        String url = base + %22/security-group-rules/9b4be7fa-e56e-40fb-9516-1f0fa9185669%22;%0A        ITNeutronE2E.test_delete(url, %22Security Rule Delete Failed%22);%0A    %7D%0A%0A    public void sr_element_negative_get_test() %7B%0A        String url = base + %22/security-group-rules/9b4be7fa-e56e-40fb-9516-1f0fa9185669%22;%0A        ITNeutronE2E.test_fetch(url, false, %22Security Rule Element Negative Get Failed%22);%0A    %7D%0A%0A    public static void runTests(String base) %7B%0A        NeutronSecurityRuleTests securityRule_tester = new NeutronSecurityRuleTests(base);%0A        securityRule_tester.securityRule_collection_get_test();%0A        securityRule_tester.singleton_sr_create_test();%0A        securityRule_tester.sr_element_get_test();%0A        securityRule_tester.sr_delete_test();%0A        securityRule_tester.sr_element_negative
 _get

Add IT cases for Security Rules