blob: c8d040e239097e544ff5ff8b32dfcfff72828d3d [file] [log] [blame]
sslobodrd6e07e72019-01-31 16:07:20 -05001{
2 "environment":{
sslobodr1d1e50b2019-03-14 09:17:40 -04003 "cmdLine":"afrouter -config arouter_test.json -logLevel 1",
sslobodrd6e07e72019-01-31 16:07:20 -05004 "protoFiles": [
5 {
6 "importPath":"github.com/opencord/voltha-go/protos/",
7 "service":"VolthaService",
8 "package":"voltha"
sslobodr1d1e50b2019-03-14 09:17:40 -04009 },
10 {
11 "importPath":"github.com/opencord/voltha-go/protos/",
12 "service":"Configuration",
13 "package":"afrouter"
sslobodrd6e07e72019-01-31 16:07:20 -050014 }
15 ],
16 "imports": [
sslobodr1d1e50b2019-03-14 09:17:40 -040017 "github.com/golang/protobuf/ptypes/empty"
sslobodrd6e07e72019-01-31 16:07:20 -050018 ],
19 "protoDesc":"voltha.pb",
20 "protoSubst": [
21 {
22 "from":"google.protobuf.Empty",
23 "to":"empty.Empty"
24 }
25 ],
sslobodr1d1e50b2019-03-14 09:17:40 -040026 "clients": {
27 "imports": [
28 "github.com/golang/protobuf/ptypes/empty",
29 "github.com/opencord/voltha-go/protos/openflow_13"
30 ],
31 "endpoints": [
32 {
33 "name":"client",
34 "port":"5000"
35 },
36 {
37 "name":"stats",
38 "port":"55554"
39 }
40 ]
41 },
42 "servers": {
43 "imports": [
44 "github.com/golang/protobuf/ptypes/empty",
45 "github.com/opencord/voltha-go/protos/openflow_13"
46 ],
47 "endpoints": [
sslobodrd6e07e72019-01-31 16:07:20 -050048 {
49 "name":"core11",
50 "port":"5011"
51 },
52 {
53 "name":"core12",
54 "port":"5012"
55 },
56 {
57 "name":"core21",
58 "port":"5021"
59 },
60 {
61 "name":"core22",
62 "port":"5022"
63 },
64 {
65 "name":"core31",
66 "port":"5031"
67 },
68 {
69 "name":"core32",
70 "port":"5032"
71 }
sslobodr1d1e50b2019-03-14 09:17:40 -040072 ]
73 }
sslobodrd6e07e72019-01-31 16:07:20 -050074 },
75 "tests":[
sslobodr1d1e50b2019-03-14 09:17:40 -040076 {{range $k,$v := .CrTests}}
sslobodrd6e07e72019-01-31 16:07:20 -050077 {
sslobodrd9daabf2019-02-05 13:14:21 -050078 "name":"Test CreateDevice",
sslobodrd6e07e72019-01-31 16:07:20 -050079 "send": {
80 "client":"client",
81 "method":"CreateDevice",
sslobodrd9daabf2019-02-05 13:14:21 -050082 "param":"{Type:\"simulated_olt\"}",
sslobodr13182842019-02-08 14:40:30 -050083 "expect":"{Id:\"abcd1234{{$k}}\",Type:\"simulated_olt\"}",
sslobodrd6e07e72019-01-31 16:07:20 -050084 "_meta":""
85 },
86 "servers": [
87 {
sslobodr13182842019-02-08 14:40:30 -050088 "name":"core{{$v.Core}}1",
sslobodrd6e07e72019-01-31 16:07:20 -050089 "meta": [
90 {
91 "key":"voltha_serial_number",
sslobodr1d1e50b2019-03-14 09:17:40 -040092 "value":"{{$v.SerNo}}"
sslobodrd6e07e72019-01-31 16:07:20 -050093 }
sslobodrd9daabf2019-02-05 13:14:21 -050094 ]
sslobodrd6e07e72019-01-31 16:07:20 -050095 },
96 {
sslobodr13182842019-02-08 14:40:30 -050097 "name":"core{{$v.Core}}2",
sslobodrd9daabf2019-02-05 13:14:21 -050098 "meta": [
99 {
100 "key":"voltha_serial_number",
sslobodr1d1e50b2019-03-14 09:17:40 -0400101 "value":"{{$v.SerNo}}"
102 }
103 ]
104 }
105 ]
106 },
107 {{end}}
108 {{range $k,$v := .GetTests}}
109 {
110 "name":"Test EnableDevice",
111 "send": {
112 "client":"client",
113 "_method":"GetDevice",
114 "method":"EnableDevice",
115 "param":"{Id:\"abcd1234{{$k}}\"}",
116 "expect":"{}",
117 "_expect":"{Id:\"abcd1234{{$k}}\",Type:\"simulated_olt\"}",
118 "_meta":""
119 },
120 "servers": [
121 {
122 "name":"core{{$v.Core}}1",
123 "meta": [
124 {
125 "key":"voltha_serial_number",
126 "value":"{{$v.SerNo}}"
127 }
128 ]
129 },
130 {
131 "name":"core{{$v.Core}}2",
132 "meta": [
133 {
134 "key":"voltha_serial_number",
135 "value":"{{$v.SerNo}}"
sslobodrd9daabf2019-02-05 13:14:21 -0500136 }
137 ]
138 }
139 ]
140 },
sslobodr13182842019-02-08 14:40:30 -0500141 {{end}}
sslobodrd9daabf2019-02-05 13:14:21 -0500142 {
143 "name":"Test GetDevice",
144 "send": {
145 "client":"client",
146 "method":"GetDevice",
sslobodr13182842019-02-08 14:40:30 -0500147 "param":"{Id:\"abcd12340\"}",
148 "expect":"{Id:\"abcd12340\",Type:\"simulated_olt\"}",
sslobodrd9daabf2019-02-05 13:14:21 -0500149 "_meta":""
150 },
151 "servers": [
152 {
153 "name":"core11",
sslobodrd6e07e72019-01-31 16:07:20 -0500154 "meta": [
155 {
156 "key":"voltha_serial_number",
sslobodr1d1e50b2019-03-14 09:17:40 -0400157 "value":"110000"
sslobodrd6e07e72019-01-31 16:07:20 -0500158 }
sslobodrd9daabf2019-02-05 13:14:21 -0500159 ]
160 },
161 {
162 "name":"core12",
163 "meta": [
164 {
165 "key":"voltha_serial_number",
sslobodr1d1e50b2019-03-14 09:17:40 -0400166 "value":"110000"
sslobodrd9daabf2019-02-05 13:14:21 -0500167 }
168 ]
169 }
170 ]
171 },
172 {
173 "name":"Test Subscribe",
174 "send": {
175 "client":"client",
176 "method":"Subscribe",
177 "param":"{OfagentId:\"Agent007\"}",
178 "meta": [
179 {
180 "key":"voltha_backend_name",
181 "value":""
182 }
183 ],
184 "expect":"{OfagentId:\"Agent007\",VolthaId:\"core11\"}",
185 "expectMeta": [
186 {
187 "key":"voltha_backend_name",
sslobodr13182842019-02-08 14:40:30 -0500188 "value":"vcore1"
sslobodrd9daabf2019-02-05 13:14:21 -0500189 }
190 ]
191 },
192 "servers": [
193 {
194 "name":"core11",
195 "meta": [
196 {
197 "key":"voltha_serial_number",
sslobodr1d1e50b2019-03-14 09:17:40 -0400198 "value":"110001"
sslobodrd9daabf2019-02-05 13:14:21 -0500199 },
200 {
201 "key":"voltha_backend_name",
sslobodr13182842019-02-08 14:40:30 -0500202 "value":""
sslobodrd9daabf2019-02-05 13:14:21 -0500203 }
204 ]
sslobodrd6e07e72019-01-31 16:07:20 -0500205 }
206 ]
sslobodr1d1e50b2019-03-14 09:17:40 -0400207 },
208 {
209 "_COMMENT":"If this test case fails, there could be a goroutine leak",
210 "name":"Get goroutine count",
211 "send": {
212 "client":"stats",
213 "method":"GetGoroutineCount",
214 "param":"{}",
215 "meta": [ ],
216 "expect":"{Count:39}",
217 "expectMeta": [ ]
218 },
219 "servers": [ ]
sslobodrd6e07e72019-01-31 16:07:20 -0500220 }
221 ]
222}