blob: a15230d7cc7388c4db7c5fa50ddc1d178d8d60d8 [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 {
William Kurkiandaa6bb22019-03-07 12:26:28 -05006 "importPath":"github.com/opencord/voltha-protos/go/",
sslobodrd6e07e72019-01-31 16:07:20 -05007 "service":"VolthaService",
8 "package":"voltha"
sslobodr1d1e50b2019-03-14 09:17:40 -04009 },
10 {
David Bainbridge142516e2019-04-19 01:34:58 +000011 "importPath":"github.com/opencord/voltha-protos/go/",
sslobodr1d1e50b2019-03-14 09:17:40 -040012 "service":"Configuration",
13 "package":"afrouter"
sslobodrd6e07e72019-01-31 16:07:20 -050014 }
15 ],
16 "imports": [
Kent Hagerman1b9c7062019-05-07 16:46:01 -040017 "github.com/golang/protobuf/ptypes/empty",
18 "github.com/opencord/voltha-protos/go/common"
sslobodrd6e07e72019-01-31 16:07:20 -050019 ],
20 "protoDesc":"voltha.pb",
21 "protoSubst": [
22 {
23 "from":"google.protobuf.Empty",
24 "to":"empty.Empty"
25 }
26 ],
sslobodr1d1e50b2019-03-14 09:17:40 -040027 "clients": {
28 "imports": [
Kent Hagerman1b9c7062019-05-07 16:46:01 -040029 "github.com/golang/protobuf/ptypes/empty",
30 "github.com/opencord/voltha-protos/go/openflow_13",
31 "github.com/opencord/voltha-protos/go/common"
sslobodr1d1e50b2019-03-14 09:17:40 -040032 ],
33 "endpoints": [
34 {
35 "name":"client",
36 "port":"5000"
37 },
38 {
39 "name":"stats",
40 "port":"55554"
41 }
42 ]
43 },
44 "servers": {
45 "imports": [
Kent Hagerman1b9c7062019-05-07 16:46:01 -040046 "github.com/golang/protobuf/ptypes/empty",
47 "github.com/opencord/voltha-protos/go/openflow_13",
48 "github.com/opencord/voltha-protos/go/omci",
49 "github.com/opencord/voltha-protos/go/common"
sslobodr1d1e50b2019-03-14 09:17:40 -040050 ],
51 "endpoints": [
sslobodrd6e07e72019-01-31 16:07:20 -050052 {
53 "name":"core11",
54 "port":"5011"
55 },
56 {
57 "name":"core12",
58 "port":"5012"
59 },
60 {
61 "name":"core21",
62 "port":"5021"
63 },
64 {
65 "name":"core22",
66 "port":"5022"
67 },
68 {
69 "name":"core31",
70 "port":"5031"
71 },
72 {
73 "name":"core32",
74 "port":"5032"
75 }
sslobodr1d1e50b2019-03-14 09:17:40 -040076 ]
77 }
sslobodrd6e07e72019-01-31 16:07:20 -050078 },
79 "tests":[
sslobodr1d1e50b2019-03-14 09:17:40 -040080 {{range $k,$v := .CrTests}}
sslobodrd6e07e72019-01-31 16:07:20 -050081 {
sslobodrd9daabf2019-02-05 13:14:21 -050082 "name":"Test CreateDevice",
sslobodrd6e07e72019-01-31 16:07:20 -050083 "send": {
84 "client":"client",
85 "method":"CreateDevice",
sslobodrd9daabf2019-02-05 13:14:21 -050086 "param":"{Type:\"simulated_olt\"}",
sslobodr13182842019-02-08 14:40:30 -050087 "expect":"{Id:\"abcd1234{{$k}}\",Type:\"simulated_olt\"}",
sslobodrd6e07e72019-01-31 16:07:20 -050088 "_meta":""
89 },
90 "servers": [
91 {
sslobodr13182842019-02-08 14:40:30 -050092 "name":"core{{$v.Core}}1",
sslobodrd6e07e72019-01-31 16:07:20 -050093 "meta": [
94 {
95 "key":"voltha_serial_number",
sslobodr1d1e50b2019-03-14 09:17:40 -040096 "value":"{{$v.SerNo}}"
sslobodrd6e07e72019-01-31 16:07:20 -050097 }
sslobodrd9daabf2019-02-05 13:14:21 -050098 ]
sslobodrd6e07e72019-01-31 16:07:20 -050099 },
100 {
sslobodr13182842019-02-08 14:40:30 -0500101 "name":"core{{$v.Core}}2",
sslobodrd9daabf2019-02-05 13:14:21 -0500102 "meta": [
103 {
104 "key":"voltha_serial_number",
sslobodr1d1e50b2019-03-14 09:17:40 -0400105 "value":"{{$v.SerNo}}"
106 }
107 ]
108 }
109 ]
110 },
111 {{end}}
112 {{range $k,$v := .GetTests}}
113 {
114 "name":"Test EnableDevice",
115 "send": {
116 "client":"client",
117 "_method":"GetDevice",
118 "method":"EnableDevice",
119 "param":"{Id:\"abcd1234{{$k}}\"}",
120 "expect":"{}",
121 "_expect":"{Id:\"abcd1234{{$k}}\",Type:\"simulated_olt\"}",
122 "_meta":""
123 },
124 "servers": [
125 {
126 "name":"core{{$v.Core}}1",
127 "meta": [
128 {
129 "key":"voltha_serial_number",
130 "value":"{{$v.SerNo}}"
131 }
132 ]
133 },
134 {
135 "name":"core{{$v.Core}}2",
136 "meta": [
137 {
138 "key":"voltha_serial_number",
139 "value":"{{$v.SerNo}}"
sslobodrd9daabf2019-02-05 13:14:21 -0500140 }
141 ]
142 }
143 ]
144 },
sslobodr13182842019-02-08 14:40:30 -0500145 {{end}}
sslobodrd9daabf2019-02-05 13:14:21 -0500146 {
147 "name":"Test GetDevice",
148 "send": {
149 "client":"client",
150 "method":"GetDevice",
sslobodr13182842019-02-08 14:40:30 -0500151 "param":"{Id:\"abcd12340\"}",
152 "expect":"{Id:\"abcd12340\",Type:\"simulated_olt\"}",
sslobodrd9daabf2019-02-05 13:14:21 -0500153 "_meta":""
154 },
155 "servers": [
156 {
157 "name":"core11",
sslobodrd6e07e72019-01-31 16:07:20 -0500158 "meta": [
159 {
160 "key":"voltha_serial_number",
sslobodr1d1e50b2019-03-14 09:17:40 -0400161 "value":"110000"
sslobodrd6e07e72019-01-31 16:07:20 -0500162 }
sslobodrd9daabf2019-02-05 13:14:21 -0500163 ]
164 },
165 {
166 "name":"core12",
167 "meta": [
168 {
169 "key":"voltha_serial_number",
sslobodr1d1e50b2019-03-14 09:17:40 -0400170 "value":"110000"
sslobodrd9daabf2019-02-05 13:14:21 -0500171 }
172 ]
173 }
174 ]
175 },
176 {
177 "name":"Test Subscribe",
178 "send": {
179 "client":"client",
180 "method":"Subscribe",
181 "param":"{OfagentId:\"Agent007\"}",
182 "meta": [
183 {
184 "key":"voltha_backend_name",
185 "value":""
186 }
187 ],
188 "expect":"{OfagentId:\"Agent007\",VolthaId:\"core11\"}",
189 "expectMeta": [
190 {
191 "key":"voltha_backend_name",
sslobodr13182842019-02-08 14:40:30 -0500192 "value":"vcore1"
sslobodrd9daabf2019-02-05 13:14:21 -0500193 }
194 ]
195 },
196 "servers": [
197 {
198 "name":"core11",
199 "meta": [
200 {
201 "key":"voltha_serial_number",
sslobodr1d1e50b2019-03-14 09:17:40 -0400202 "value":"110001"
sslobodrd9daabf2019-02-05 13:14:21 -0500203 },
204 {
205 "key":"voltha_backend_name",
sslobodr13182842019-02-08 14:40:30 -0500206 "value":""
sslobodrd9daabf2019-02-05 13:14:21 -0500207 }
208 ]
Kent Hagerman1b9c7062019-05-07 16:46:01 -0400209 },
210 {
211 "name":"core12",
212 "meta": [
213 {
214 "key":"voltha_serial_number",
215 "value":"110001"
216 },
217 {
218 "key":"voltha_backend_name",
219 "value":""
220 }
221 ]
sslobodrd6e07e72019-01-31 16:07:20 -0500222 }
223 ]
sslobodr1d1e50b2019-03-14 09:17:40 -0400224 },
225 {
226 "_COMMENT":"If this test case fails, there could be a goroutine leak",
227 "name":"Get goroutine count",
228 "send": {
229 "client":"stats",
230 "method":"GetGoroutineCount",
231 "param":"{}",
232 "meta": [ ],
Kent Hagermanf6516dd2019-05-09 15:49:55 -0400233 "expect":"{Count:45}",
sslobodr1d1e50b2019-03-14 09:17:40 -0400234 "expectMeta": [ ]
235 },
236 "servers": [ ]
sslobodrd6e07e72019-01-31 16:07:20 -0500237 }
238 ]
239}