Bug 3330 - Add System Tests for GBP 30/23930/2
authorRuijing Guo <ruijing.guo@intel.com>
Wed, 24 Jun 2015 07:35:07 +0000 (07:35 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 9 Jul 2015 00:46:17 +0000 (00:46 +0000)
Change-Id: I0219761e915c0f38bbc01a0e6f9a813c781e2d5a
Signed-off-by: Ruijing Guo <ruijing.guo@intel.com>
(cherry picked from commit 5f7142b8e00494564aa108286d481a2998b5d8ff)

test/csit/libraries/Utils.txt
test/csit/suites/groupbasedpolicy/GBP_Basic/010_gbp_endpoint.robot [new file with mode: 0644]
test/csit/suites/groupbasedpolicy/GBP_Basic/020_gbp_tenant.robot [new file with mode: 0644]
test/csit/suites/groupbasedpolicy/GBP_Basic/030_gbp_tunnel.robot [new file with mode: 0644]
test/csit/variables/Variables.py
test/csit/variables/gbp/register-endpoint.json [new file with mode: 0644]
test/csit/variables/gbp/tenant1.json [new file with mode: 0644]
test/csit/variables/gbp/tenants.json [new file with mode: 0644]
test/csit/variables/gbp/tunnel1.json [new file with mode: 0644]
test/csit/variables/gbp/tunnels.json [new file with mode: 0644]
test/csit/variables/gbp/unregister-endpoint.json [new file with mode: 0644]

index df47af1eaab92c938dcb7bf2eec045f55fcfc828..05950ea677ea48e515aca30b0bd9a0634a6ad743 100644 (file)
@@ -209,3 +209,9 @@ Add Elements To URI From File
     ${body}    OperatingSystem.Get File    ${data_file}
     ${resp}    RequestsLibrary.Put    session    ${dest_uri}    data=${body}    headers=${headers}
     Should Be Equal As Strings    ${resp.status_code}    200
+
+Post Elements To URI From File
+    [Arguments]    ${dest_uri}    ${data_file}
+    ${body}    OperatingSystem.Get File    ${data_file}
+    ${resp}    RequestsLibrary.Post    session    ${dest_uri}    data=${body}    headers=${headers}
+    Should Be Equal As Strings    ${resp.status_code}    200
diff --git a/test/csit/suites/groupbasedpolicy/GBP_Basic/010_gbp_endpoint.robot b/test/csit/suites/groupbasedpolicy/GBP_Basic/010_gbp_endpoint.robot
new file mode 100644 (file)
index 0000000..8b7e770
--- /dev/null
@@ -0,0 +1,20 @@
+*** Settings ***
+Documentation     Test suite for Group Based Policy, Operates functions from Restconf APIs.
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           RequestsLibrary
+Variables         ../../../variables/Variables.py
+Resource          ../../../libraries/Utils.txt
+
+*** Variables ***
+${REGISTER_ENDPOINT_FILE}  ../../../variables/gbp/register-endpoint.json
+${UNREGISTER_ENDPOINT_FILE}  ../../../variables/gbp/unregister-endpoint.json
+
+*** Test Cases ***
+Register and Unregister Endpoint
+    [Documentation]    Register and Unregister Endpoint from JSON file
+    Post Elements To URI From File    ${GBP_REGEP_API}  ${REGISTER_ENDPOINT_FILE}
+    Post Elements To URI From File  ${GBP_UNREGEP_API}  ${UNREGISTER_ENDPOINT_FILE}
diff --git a/test/csit/suites/groupbasedpolicy/GBP_Basic/020_gbp_tenant.robot b/test/csit/suites/groupbasedpolicy/GBP_Basic/020_gbp_tenant.robot
new file mode 100644 (file)
index 0000000..9ef94a9
--- /dev/null
@@ -0,0 +1,69 @@
+*** Settings ***
+Documentation     Test suite for GBP Tenants, Operates functions from Restconf APIs.
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           RequestsLibrary
+Variables         ../../../variables/Variables.py
+Resource          ../../../libraries/Utils.txt
+
+*** Variables ***
+${GBP_TENANTS_FILE}  ../../../variables/gbp/tenants.json
+
+${GBP_TENENT_ID}     f5c7d344-d1c7-4208-8531-2c2693657e12
+${GBP_TENANT1_API}    /restconf/config/policy:tenants/policy:tenant/${GBP_TENENT_ID}
+${GBP_TENANT1_FILE}  ../../../variables/gbp/tenant1.json
+
+
+*** Test Cases ***
+Add Tenants
+    [Documentation]    Add Tenants from JSON file
+    Add Elements To URI From File    ${GBP_TENANTS_API}    ${GBP_TENANTS_FILE}
+    ${body}    OperatingSystem.Get File    ${GBP_TENANTS_FILE}
+    ${jsonbody}    To Json    ${body}
+    ${resp}    RequestsLibrary.Get    session    ${GBP_TENANTS_API}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    Lists Should be Equal    ${jsonbody}    ${result}
+
+Delete All Tenants
+    [Documentation]    Delete all Tenants
+    Add Elements To URI From File    ${GBP_TENANTS_API}    ${GBP_TENANTS_FILE}
+    ${body}    OperatingSystem.Get File    ${GBP_TENANTS_FILE}
+    ${jsonbody}    To Json    ${body}
+    ${resp}    RequestsLibrary.Get    session    ${GBP_TENANTS_API}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Remove All Elements At URI    ${GBP_TENANTS_API}
+    ${resp}    RequestsLibrary.Get    session    ${GBP_TENANTS_API}
+    Should Be Equal As Strings    ${resp.status_code}    404
+
+Add one Tenant
+    [Documentation]    Add one Tenant from JSON file
+    Add Elements To URI From File    ${GBP_TENANT1_API}    ${GBP_TENANT1_FILE}
+    ${body}    OperatingSystem.Get File    ${GBP_TENANT1_FILE}
+    ${jsonbody}    To Json    ${body}
+    ${resp}    RequestsLibrary.Get    session    ${GBP_TENANT1_API}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    Lists Should be Equal    ${result}    ${jsonbody}
+
+Get A Non-existing Tenant
+    [Documentation]    Get A Non-existing Tenant
+    Remove All Elements At URI    ${GBP_TENANTS_API}
+    ${resp}    RequestsLibrary.Get    session    ${GBP_TENANT1_API}
+    Should Be Equal As Strings    ${resp.status_code}    404
+
+Delete one Tenant
+    [Documentation]    Delete one Tenant
+    Remove All Elements At URI    ${GBP_TENANTS_API}
+    Add Elements To URI From File    ${GBP_TENANT1_API}    ${GBP_TENANT1_FILE}
+    Remove All Elements At URI    ${GBP_TENANT1_API}
+    ${resp}    RequestsLibrary.Get    session    ${GBP_TENANTS_API}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Not Contain    ${resp.content}    ${GBP_TENENT_ID}
+
+Clean Datastore After Tests
+    [Documentation]    Clean All Tenants In Datastore After Tests
+    Remove All Elements At URI    ${GBP_TENANTS_API}
diff --git a/test/csit/suites/groupbasedpolicy/GBP_Basic/030_gbp_tunnel.robot b/test/csit/suites/groupbasedpolicy/GBP_Basic/030_gbp_tunnel.robot
new file mode 100644 (file)
index 0000000..e1b259f
--- /dev/null
@@ -0,0 +1,67 @@
+*** Settings ***
+Documentation     Test suite for GBP Tunnels, Operates functions from Restconf APIs.
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           SSHLibrary
+Library           Collections
+Library           OperatingSystem
+Library           RequestsLibrary
+Variables         ../../../variables/Variables.py
+Resource          ../../../libraries/Utils.txt
+
+*** Variables ***
+${GBP_TUNNELS_FILE}  ../../../variables/gbp/tunnels.json
+${GBP_TUNNEL_ID}     openflow:1
+${GBP_TUNNEL1_URL}    /restconf/config/opendaylight-inventory:nodes/opendaylight-inventory:node/${GBP_TUNNEL_ID}
+${GBP_TUNNEL1_FILE}  ../../../variables/gbp/tunnel1.json
+
+*** Test Cases ***
+Add Tunnels
+    [Documentation]    Add Tunnels from JSON file
+    Add Elements To URI From File    ${GBP_TUNNELS_API}    ${GBP_TUNNELS_FILE}
+    ${body}    OperatingSystem.Get File    ${GBP_TUNNELS_FILE}
+    ${jsonbody}    To Json    ${body}
+    ${resp}    RequestsLibrary.Get    session    ${GBP_TUNNELS_API}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    Lists Should be Equal    ${jsonbody}    ${result}
+
+Delete All Tunnels
+    [Documentation]    Delete all Tunnels
+    Add Elements To URI From File    ${GBP_TUNNELS_API}    ${GBP_TUNNELS_FILE}
+    ${body}    OperatingSystem.Get File    ${GBP_TUNNELS_FILE}
+    ${jsonbody}    To Json    ${body}
+    ${resp}    RequestsLibrary.Get    session    ${GBP_TUNNELS_API}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Remove All Elements At URI    ${GBP_TUNNELS_API}
+    ${resp}    RequestsLibrary.Get    session    ${GBP_TUNNELS_API}
+    Should Be Equal As Strings    ${resp.status_code}    404
+
+Add one Tunnel
+    [Documentation]    Add one Tunnel from JSON file
+    Add Elements To URI From File    ${GBP_TUNNEL1_URL}    ${GBP_TUNNEL1_FILE}
+    ${body}    OperatingSystem.Get File    ${GBP_TUNNEL1_FILE}
+    ${jsonbody}    To Json    ${body}
+    ${resp}    RequestsLibrary.Get    session    ${GBP_TUNNEL1_URL}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    ${result}    To JSON    ${resp.content}
+    Lists Should be Equal    ${result}    ${jsonbody}
+
+Get A Non-existing Tunnel
+    [Documentation]    Get A Non-existing Tunnel
+    Remove All Elements At URI    ${GBP_TUNNELS_API}
+    ${resp}    RequestsLibrary.Get    session    ${GBP_TUNNEL1_URL}
+    Should Be Equal As Strings    ${resp.status_code}    404
+
+Delete one Tunnel
+    [Documentation]    Delete one Tunnel
+    Remove All Elements At URI    ${GBP_TUNNELS_API}
+    Add Elements To URI From File    ${GBP_TUNNEL1_URL}    ${GBP_TUNNEL1_FILE}
+    Remove All Elements At URI    ${GBP_TUNNEL1_URL}
+    ${resp}    RequestsLibrary.Get    session    ${GBP_TUNNELS_API}
+    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Not Contain    ${resp.content}    ${GBP_TUNNEL_ID}
+
+Clean Datastore After Tests
+    [Documentation]    Clean All Tunnels In Datastore After Tests
+    Remove All Elements At URI    ${GBP_TUNNELS_API}
index 4025e504beabb93a03e3a75ae06d0c9c95898ab1..adeb71bdf04a2bb6d34b8505859177d842d93f85 100644 (file)
@@ -92,3 +92,8 @@ BASE_IP_1 = '75.75.0.0'
 CREATE_FULLYMESH_TOPOLOGY_FILE = "create_fullymesh.py"
 CREATE_FULLYMESH_TOPOLOGY_FILE_PATH = "libraries/MininetTopo/" +\
                                       CREATE_FULLYMESH_TOPOLOGY_FILE
+
+GBP_REGEP_API = "/restconf/operations/endpoint:register-endpoint"
+GBP_UNREGEP_API = "/restconf/operations/endpoint:unregister-endpoint"
+GBP_TENANTS_API = "/restconf/config/policy:tenants"
+GBP_TUNNELS_API = "/restconf/config/opendaylight-inventory:nodes"
diff --git a/test/csit/variables/gbp/register-endpoint.json b/test/csit/variables/gbp/register-endpoint.json
new file mode 100644 (file)
index 0000000..11703b9
--- /dev/null
@@ -0,0 +1,16 @@
+{
+    "input": {
+        "endpoint-group": "e593f05d-96be-47ad-acd5-ba81465680d5",
+        "l2-context": "70aeb9ea-4ca1-4fb9-9780-22b04b84a0d6",
+        "l3-address": [
+            {
+                "ip-address": "10.0.36.5",
+                "l3-context": "f2311f52-890f-4095-8b85-485ec8b92b3c"
+            }
+        ],
+        "mac-address": "00:00:00:00:36:05",
+        "ofoverlay:node-connector-id": "openflow:2:4",
+        "ofoverlay:node-id": "openflow:2",
+        "tenant": "f5c7d344-d1c7-4208-8531-2c2693657e12"
+    }
+}
diff --git a/test/csit/variables/gbp/tenant1.json b/test/csit/variables/gbp/tenant1.json
new file mode 100644 (file)
index 0000000..50993b3
--- /dev/null
@@ -0,0 +1,178 @@
+{
+    "tenant": {
+        "contract": [
+            {
+                "clause": [
+                    {
+                        "name": "allow-http-clause",
+                        "subject-refs": [
+                            "allow-http-subject",
+                            "allow-icmp-subject"
+                        ]
+                    }
+                ],
+                "id": "22282cca-9a13-4d0c-a67e-a933ebb0b0ae",
+                "subject": [
+                    {
+                        "name": "allow-http-subject",
+                        "rule": [
+                            {
+                                "classifier-ref": [
+                                    {
+                                        "direction": "in",
+                                        "name": "http-dest"
+                                    },
+                                    {
+                                        "direction": "out",
+                                        "name": "http-src"
+                                    }
+                                ],
+                                                    "action-ref": [
+                      {
+                        "name": "allow1",
+                        "order": 0
+                      }
+                    ],
+
+                                "name": "allow-http-rule"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "allow-icmp-subject",
+                        "rule": [
+                            {
+                                "classifier-ref": [
+                                    {
+                                        "name": "icmp"
+                                    }
+                                ],
+                                                    "action-ref": [
+                      {
+                        "name": "allow1",
+                        "order": 0
+                      }
+                    ],
+
+                                "name": "allow-icmp-rule"
+                            }
+                        ]
+                    }
+                ]
+            }
+        ],
+        "endpoint-group": [
+            {
+                "consumer-named-selector": [
+                    {
+                        "contract": [
+                            "22282cca-9a13-4d0c-a67e-a933ebb0b0ae"
+                        ],
+                        "name": "e593f05d-96be-47ad-acd5-ba81465680d5-1eaf9a67-a171-42a8-9282-71cf702f61dd-22282cca-9a13-4d0c-a67e-a933ebb0b0ae"
+                    }
+                ],
+                "id": "1eaf9a67-a171-42a8-9282-71cf702f61dd",
+                "network-domain": "d2779562-ebf1-45e6-93a4-78e2362bc418",
+                "provider-named-selector": []
+            },
+            {
+                "consumer-named-selector": [],
+                "id": "e593f05d-96be-47ad-acd5-ba81465680d5",
+                "network-domain": "2c71d675-693e-406f-899f-12a026eb55f1",
+                "provider-named-selector": [
+                    {
+                        "contract": [
+                            "22282cca-9a13-4d0c-a67e-a933ebb0b0ae"
+                        ],
+                        "name": "e593f05d-96be-47ad-acd5-ba81465680d5-1eaf9a67-a171-42a8-9282-71cf702f61dd-22282cca-9a13-4d0c-a67e-a933ebb0b0ae"
+                    }
+                ]
+            }
+        ],
+        "id": "f5c7d344-d1c7-4208-8531-2c2693657e12",
+        "l2-bridge-domain": [
+            {
+                "id": "7b796915-adf4-4356-b5ca-de005ac410c1",
+                "parent": "cbe0cc07-b8ff-451d-8171-9eef002a8e80"
+            }
+        ],
+        "l2-flood-domain": [
+            {
+                "id": "1ddde8d8-c2bc-48d7-8ce0-d78eb6ed4b5b",
+                "parent": "7b796915-adf4-4356-b5ca-de005ac410c1"
+            },
+            {
+                "id": "03f69af2-481c-4554-97d6-c4fedca5d126",
+                "parent": "7b796915-adf4-4356-b5ca-de005ac410c1"
+            }
+        ],
+        "l3-context": [
+            {
+                "id": "cbe0cc07-b8ff-451d-8171-9eef002a8e80"
+            }
+        ],
+        "name": "GBPPOC",
+        "subject-feature-instances": {
+            "classifier-instance": [
+                {
+                    "classifier-definition-id": "4250ab32-e8b8-445a-aebb-e1bd2cdd291f",
+                    "name": "http-dest",
+                    "parameter-value": [
+                        {
+                            "int-value": "6",
+                            "name": "proto"
+                        },
+                        {
+                            "int-value": "80",
+                            "name": "destport"
+                        }
+                    ]
+                },
+                {
+                    "classifier-definition-id": "4250ab32-e8b8-445a-aebb-e1bd2cdd291f",
+                    "name": "http-src",
+                    "parameter-value": [
+                        {
+                            "int-value": "6",
+                            "name": "proto"
+                        },
+                        {
+                            "int-value": "80",
+                            "name": "sourceport"
+                        }
+                    ]
+                },
+                {
+                    "classifier-definition-id": "79c6fdb2-1e1a-4832-af57-c65baf5c2335",
+                    "name": "icmp",
+                    "parameter-value": [
+                        {
+                            "int-value": "1",
+                            "name": "proto"
+                        }
+                    ]
+                }
+            ],
+          "action-instance": [
+            {
+              "name": "allow1",
+              "action-definition-id": "f942e8fd-e957-42b7-bd18-f73d11266d17"
+            }
+          ]
+        },
+        "subnet": [
+            {
+                "id": "d2779562-ebf1-45e6-93a4-78e2362bc418",
+                "ip-prefix": "10.0.35.1/24",
+                "parent": "1ddde8d8-c2bc-48d7-8ce0-d78eb6ed4b5b",
+                "virtual-router-ip": "10.0.35.1"
+            },
+            {
+                "id": "2c71d675-693e-406f-899f-12a026eb55f1",
+                "ip-prefix": "10.0.36.1/24",
+                "parent": "03f69af2-481c-4554-97d6-c4fedca5d126",
+                "virtual-router-ip": "10.0.36.1"
+            }
+        ]
+    }
+}
diff --git a/test/csit/variables/gbp/tenants.json b/test/csit/variables/gbp/tenants.json
new file mode 100644 (file)
index 0000000..df1cc78
--- /dev/null
@@ -0,0 +1,182 @@
+{
+"tenants": {
+
+    "tenant": [{
+        "contract": [
+            {
+                "clause": [
+                    {
+                        "name": "allow-http-clause",
+                        "subject-refs": [
+                            "allow-http-subject",
+                            "allow-icmp-subject"
+                        ]
+                    }
+                ],
+                "id": "22282cca-9a13-4d0c-a67e-a933ebb0b0ae",
+                "subject": [
+                    {
+                        "name": "allow-http-subject",
+                        "rule": [
+                            {
+                                "classifier-ref": [
+                                    {
+                                        "direction": "in",
+                                        "name": "http-dest"
+                                    },
+                                    {
+                                        "direction": "out",
+                                        "name": "http-src"
+                                    }
+                                ],
+                                                    "action-ref": [
+                      {
+                        "name": "allow1",
+                        "order": 0
+                      }
+                    ],
+
+                                "name": "allow-http-rule"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "allow-icmp-subject",
+                        "rule": [
+                            {
+                                "classifier-ref": [
+                                    {
+                                        "name": "icmp"
+                                    }
+                                ],
+                                                    "action-ref": [
+                      {
+                        "name": "allow1",
+                        "order": 0
+                      }
+                    ],
+
+                                "name": "allow-icmp-rule"
+                            }
+                        ]
+                    }
+                ]
+            }
+        ],
+        "endpoint-group": [
+            {
+                "consumer-named-selector": [
+                    {
+                        "contract": [
+                            "22282cca-9a13-4d0c-a67e-a933ebb0b0ae"
+                        ],
+                        "name": "e593f05d-96be-47ad-acd5-ba81465680d5-1eaf9a67-a171-42a8-9282-71cf702f61dd-22282cca-9a13-4d0c-a67e-a933ebb0b0ae"
+                    }
+                ],
+                "id": "1eaf9a67-a171-42a8-9282-71cf702f61dd",
+                "network-domain": "d2779562-ebf1-45e6-93a4-78e2362bc418",
+                "provider-named-selector": []
+            },
+            {
+                "consumer-named-selector": [],
+                "id": "e593f05d-96be-47ad-acd5-ba81465680d5",
+                "network-domain": "2c71d675-693e-406f-899f-12a026eb55f1",
+                "provider-named-selector": [
+                    {
+                        "contract": [
+                            "22282cca-9a13-4d0c-a67e-a933ebb0b0ae"
+                        ],
+                        "name": "e593f05d-96be-47ad-acd5-ba81465680d5-1eaf9a67-a171-42a8-9282-71cf702f61dd-22282cca-9a13-4d0c-a67e-a933ebb0b0ae"
+                    }
+                ]
+            }
+        ],
+        "id": "f5c7d344-d1c7-4208-8531-2c2693657e12",
+        "l2-bridge-domain": [
+            {
+                "id": "7b796915-adf4-4356-b5ca-de005ac410c1",
+                "parent": "cbe0cc07-b8ff-451d-8171-9eef002a8e80"
+            }
+        ],
+        "l2-flood-domain": [
+            {
+                "id": "1ddde8d8-c2bc-48d7-8ce0-d78eb6ed4b5b",
+                "parent": "7b796915-adf4-4356-b5ca-de005ac410c1"
+            },
+            {
+                "id": "03f69af2-481c-4554-97d6-c4fedca5d126",
+                "parent": "7b796915-adf4-4356-b5ca-de005ac410c1"
+            }
+        ],
+        "l3-context": [
+            {
+                "id": "cbe0cc07-b8ff-451d-8171-9eef002a8e80"
+            }
+        ],
+        "name": "GBPPOC",
+        "subject-feature-instances": {
+            "classifier-instance": [
+                {
+                    "classifier-definition-id": "4250ab32-e8b8-445a-aebb-e1bd2cdd291f",
+                    "name": "http-dest",
+                    "parameter-value": [
+                        {
+                            "int-value": "6",
+                            "name": "proto"
+                        },
+                        {
+                            "int-value": "80",
+                            "name": "destport"
+                        }
+                    ]
+                },
+                {
+                    "classifier-definition-id": "4250ab32-e8b8-445a-aebb-e1bd2cdd291f",
+                    "name": "http-src",
+                    "parameter-value": [
+                        {
+                            "int-value": "6",
+                            "name": "proto"
+                        },
+                        {
+                            "int-value": "80",
+                            "name": "sourceport"
+                        }
+                    ]
+                },
+                {
+                    "classifier-definition-id": "79c6fdb2-1e1a-4832-af57-c65baf5c2335",
+                    "name": "icmp",
+                    "parameter-value": [
+                        {
+                            "int-value": "1",
+                            "name": "proto"
+                        }
+                    ]
+                }
+            ],
+          "action-instance": [
+            {
+              "name": "allow1",
+              "action-definition-id": "f942e8fd-e957-42b7-bd18-f73d11266d17"
+            }
+          ]
+        },
+        "subnet": [
+            {
+                "id": "d2779562-ebf1-45e6-93a4-78e2362bc418",
+                "ip-prefix": "10.0.35.1/24",
+                "parent": "1ddde8d8-c2bc-48d7-8ce0-d78eb6ed4b5b",
+                "virtual-router-ip": "10.0.35.1"
+            },
+            {
+                "id": "2c71d675-693e-406f-899f-12a026eb55f1",
+                "ip-prefix": "10.0.36.1/24",
+                "parent": "03f69af2-481c-4554-97d6-c4fedca5d126",
+                "virtual-router-ip": "10.0.36.1"
+            }
+        ]
+    }]
+
+    }
+}
diff --git a/test/csit/variables/gbp/tunnel1.json b/test/csit/variables/gbp/tunnel1.json
new file mode 100644 (file)
index 0000000..272f7b4
--- /dev/null
@@ -0,0 +1,20 @@
+{
+    "node":
+      {
+        "id": "openflow:1",
+        "ofoverlay:tunnel": [
+          {
+            "tunnel-type": "overlay:tunnel-type-vxlan-gpe",
+            "node-connector-id": "openflow:1:1",
+            "ip": "192.168.50.70",
+            "port": 6633
+          },
+          {
+            "tunnel-type": "overlay:tunnel-type-vxlan",
+            "node-connector-id": "openflow:1:2",
+            "ip": "192.168.50.70",
+            "port": 4789
+          }
+        ]
+      }
+}
diff --git a/test/csit/variables/gbp/tunnels.json b/test/csit/variables/gbp/tunnels.json
new file mode 100644 (file)
index 0000000..e9c9b8f
--- /dev/null
@@ -0,0 +1,57 @@
+{
+  "nodes": {
+    "node": [
+      {
+        "id": "openflow:1",
+        "ofoverlay:tunnel": [
+          {
+            "tunnel-type": "overlay:tunnel-type-vxlan-gpe",
+            "node-connector-id": "openflow:1:1",
+            "ip": "192.168.50.70",
+            "port": 6633
+          },
+          {
+            "tunnel-type": "overlay:tunnel-type-vxlan",
+            "node-connector-id": "openflow:1:2",
+            "ip": "192.168.50.70",
+            "port": 4789
+          }
+        ]
+      },
+      {
+        "id": "openflow:2",
+        "ofoverlay:tunnel": [
+          {
+            "tunnel-type": "overlay:tunnel-type-vxlan-gpe",
+            "node-connector-id": "openflow:2:1",
+            "ip": "192.168.50.71",
+            "port": 6633
+          },
+          {
+            "tunnel-type": "overlay:tunnel-type-vxlan",
+            "node-connector-id": "openflow:2:2",
+            "ip": "192.168.50.71",
+            "port": 4789
+          }
+        ]
+      },
+      {
+        "id": "openflow:3",
+        "ofoverlay:tunnel": [
+          {
+            "tunnel-type": "overlay:tunnel-type-vxlan-gpe",
+            "node-connector-id": "openflow:3:1",
+            "ip": "192.168.50.72",
+            "port": 6633
+          },
+          {
+            "tunnel-type": "overlay:tunnel-type-vxlan",
+            "node-connector-id": "openflow:3:2",
+            "ip": "192.168.50.72",
+            "port": 4789
+          }
+        ]
+      }
+    ]
+  }
+}
diff --git a/test/csit/variables/gbp/unregister-endpoint.json b/test/csit/variables/gbp/unregister-endpoint.json
new file mode 100644 (file)
index 0000000..5bf0988
--- /dev/null
@@ -0,0 +1,10 @@
+{
+    "input": {
+        "l3": [
+            {
+                "ip-address": "10.0.36.5",
+                "l3-context": "f2311f52-890f-4095-8b85-485ec8b92b3c"
+            }
+        ]
+    }
+}