blob: f907e5d0f5f48bfa921912b272e6c0924bc59713 [file] [log] [blame]
srikanth116e6e82014-08-19 07:22:37 -07001#
2# Copyright (c) 2013 Big Switch Networks, Inc.
3#
4# Licensed under the Eclipse Public License, Version 1.0 (the
5# "License"); you may not use this file except in compliance with the
6# License. You may obtain a copy of the License at
7#
8# http://www.eclipse.org/legal/epl-v10.html
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13# implied. See the License for the specific language governing
14# permissions and limitations under the License.
15#
16
17# This i data file for testing Rest APIs
18# This file is read by RestApiTests.py
19
20test_dpid="11:22:33:44:55:66:77:01"
21test_dpid2="11:22:33:44:55:66:77:01"
22test_mac ="11:22:33:44:55:01"
23test_vns_id ="test_vns_id_1"
24test_flow_entry_name = "test_flow_entry_name"
25test_vns_acl_name = "test_vns_acl"
26test_syncd_config_id = "test_syncd_config_id"
27test_syncd_transport_config_test_data="test_sync_transport_config_id"
28test_syncd_transport_config_name = "test_syncd_transport_cfg_name"
29test_vns_interface_rule_name = "test_vns_intf_rule_name"
30test_vns_interface_name = "test_vns_intf_name"
31test_vns_interface_acl_direction = "in"
32test_vns_interface_acl_id = "test_vns_interface_acl_id"
33test_vns_acl_name_id = test_vns_id+"|"+test_vns_acl_name
34test_vns_acl_entry_type = "ip"
35test_acl_entry_seq_no = "10"
36test_vns_acl_entry_id = test_vns_acl_name_id+"|"+test_acl_entry_seq_no
37test_vns_acl_entry_src_ip="11.22.33.44"
38test_vns_acl_entry_action="deny"
39test_vns_acl_entry_type="deny"
40test_tag_name = "test_tag_name"
41test_tag_value = "test_tag_value"
42test_tag_id = test_vns_id+"|"+test_tag_name+"|"+test_tag_value
43test_tag_mapping_id = test_tag_id+"|"+test_mac
44
45model_switch_test_data={"path":"model/switch", "data":{"dpid":test_dpid}, "id":"dpid"}
46model_host_test_data ={"path":"model/host", "data":{"mac":test_mac}, "id":"mac"}
47model_flow_entry_test_data = {"path":"model/flow-entry", "data":{"switch":test_dpid, "name":test_flow_entry_name}, "id":"name"}
48model_vns_definition_test_data = {"path":"model/vns-definition", "data":{"id":test_vns_id}, "id":"id"}
49model_vns_acl_test_data = {"path":"model/vns-access-list", "data":{"vns":test_vns_id, "name":test_vns_acl_name_id}, "id":"name"}
50model_host_network_address_test_data = {"path":"model/host-network-address", \
51 "data":{"id":"ea:81:27:2a:6b:6b-10.0.0.1"}, "id":"id"}
52model_syncd_config_test_data = {"path":"model/syncd-config", "data":{"id":test_syncd_config_id}, "id":"id"}
53model_tag_test_data = {"path":"model/tag", "data":{"id":test_tag_id, \
54 "name":"tagname", "value":"tagvalue", "namespace":test_vns_id}, "id":"id"}
55model_tag_mapping_test_data = {"path":"model/tag-mapping", "data":{"id": test_tag_mapping_id, \
56 "tag": test_tag_id, "type": "host", "host": test_mac}, "id":"id"}
57model_syncd_transport_config_test_data = {"path":"model/syncd-transport-config",
58 "data":{"id":"test_syncd_transport_config_test_data", "type":"random1", "args":"test_args", \
59 "config":test_syncd_config_id, "target-cluster":"Testcluster", "name":test_syncd_transport_config_name}, "id":"id"}
60model_syncd_progress_info_test_data = {"path":"model/syncd-progress-info", "data":{"id":test_syncd_config_id}, "id":"id"}
61model_vns_interface_rule_test_data ={"path":"model/vns-interface-rule", \
62 "data":{"id":test_vns_id+"|"+test_vns_interface_rule_name, "vns":test_vns_id}, "id":"id"}
63model_vns_interface_acl_test_data = {"path":"model/vns-interface-access-list", "data":{"id":test_vns_interface_acl_id, \
64 "in-out":test_vns_interface_acl_direction, "vns-interface":test_vns_interface_name, "vns-access-list":test_vns_acl_name_id}, "id":"id"}
65model_vns_acl_entry_test_data = {"path":"model/vns-access-list-entry", \
66 "data":{"id":test_vns_acl_entry_id, "src-ip":test_vns_acl_entry_src_ip, \
67 "action":test_vns_acl_entry_action, "vns-access-list":test_vns_acl_name_id, "type":test_vns_acl_entry_type}, "id":"id"}
68
69test_index=0
70rest_api_test_data = {}
71rest_api_test_data[test_index] = model_switch_test_data ; test_index += 1
72rest_api_test_data[test_index] = model_host_test_data; test_index += 1
73rest_api_test_data[test_index] = model_flow_entry_test_data; test_index += 1
74rest_api_test_data[test_index] = model_vns_definition_test_data; test_index += 1
75rest_api_test_data[test_index] = model_vns_acl_test_data; test_index += 1
76rest_api_test_data[test_index] = model_host_network_address_test_data; test_index += 1
77rest_api_test_data[test_index] = model_syncd_config_test_data; test_index += 1
78rest_api_test_data[test_index] = model_tag_test_data; test_index += 1
79rest_api_test_data[test_index] = model_tag_mapping_test_data; test_index += 1
80rest_api_test_data[test_index] = model_syncd_transport_config_test_data; test_index += 1
81rest_api_test_data[test_index] = model_syncd_progress_info_test_data; test_index += 1
82rest_api_test_data[test_index] = model_vns_interface_rule_test_data; test_index += 1
83rest_api_test_data[test_index] = model_vns_interface_acl_test_data; test_index += 1
84rest_api_test_data[test_index] = model_vns_acl_entry_test_data; test_index += 1