blob: fc8ef1cb821936dce612b994d27133bcdb6da35b [file] [log] [blame]
sslobodrd6e07e72019-01-31 16:07:20 -05001{
2 "environment":{
sslobodr13182842019-02-08 14:40:30 -05003 "cmdLine":"afrouter -config arouter_test.json -grpclog",
sslobodrd6e07e72019-01-31 16:07:20 -05004 "protoFiles": [
5 {
6 "importPath":"github.com/opencord/voltha-go/protos/",
7 "service":"VolthaService",
8 "package":"voltha"
9 }
10 ],
11 "imports": [
12 "github.com/golang/protobuf/ptypes/empty",
13 "github.com/opencord/voltha-go/protos/openflow_13"
14 ],
15 "protoDesc":"voltha.pb",
16 "protoSubst": [
17 {
18 "from":"google.protobuf.Empty",
19 "to":"empty.Empty"
20 }
21 ],
22 "clients": [
23 {
24 "name":"client",
25 "port":"5000"
26 }
27 ],
28 "servers": [
29 {
30 "name":"core11",
31 "port":"5011"
32 },
33 {
34 "name":"core12",
35 "port":"5012"
36 },
37 {
38 "name":"core21",
39 "port":"5021"
40 },
41 {
42 "name":"core22",
43 "port":"5022"
44 },
45 {
46 "name":"core31",
47 "port":"5031"
48 },
49 {
50 "name":"core32",
51 "port":"5032"
52 }
53 ]
54 },
55 "tests":[
sslobodr13182842019-02-08 14:40:30 -050056 {{range $k,$v := .}}
sslobodrd6e07e72019-01-31 16:07:20 -050057 {
sslobodrd9daabf2019-02-05 13:14:21 -050058 "name":"Test CreateDevice",
sslobodrd6e07e72019-01-31 16:07:20 -050059 "send": {
60 "client":"client",
61 "method":"CreateDevice",
sslobodrd9daabf2019-02-05 13:14:21 -050062 "param":"{Type:\"simulated_olt\"}",
sslobodr13182842019-02-08 14:40:30 -050063 "expect":"{Id:\"abcd1234{{$k}}\",Type:\"simulated_olt\"}",
sslobodrd6e07e72019-01-31 16:07:20 -050064 "_meta":""
65 },
66 "servers": [
67 {
sslobodr13182842019-02-08 14:40:30 -050068 "name":"core{{$v.Core}}1",
sslobodrd6e07e72019-01-31 16:07:20 -050069 "meta": [
70 {
71 "key":"voltha_serial_number",
sslobodr13182842019-02-08 14:40:30 -050072 "value":"{{$k}}"
sslobodrd6e07e72019-01-31 16:07:20 -050073 }
sslobodrd9daabf2019-02-05 13:14:21 -050074 ]
sslobodrd6e07e72019-01-31 16:07:20 -050075 },
76 {
sslobodr13182842019-02-08 14:40:30 -050077 "name":"core{{$v.Core}}2",
sslobodrd9daabf2019-02-05 13:14:21 -050078 "meta": [
79 {
80 "key":"voltha_serial_number",
sslobodr13182842019-02-08 14:40:30 -050081 "value":"{{$k}}"
sslobodrd9daabf2019-02-05 13:14:21 -050082 }
83 ]
84 }
85 ]
86 },
sslobodr13182842019-02-08 14:40:30 -050087 {{end}}
sslobodrd9daabf2019-02-05 13:14:21 -050088 {
89 "name":"Test GetDevice",
90 "send": {
91 "client":"client",
92 "method":"GetDevice",
sslobodr13182842019-02-08 14:40:30 -050093 "param":"{Id:\"abcd12340\"}",
94 "expect":"{Id:\"abcd12340\",Type:\"simulated_olt\"}",
sslobodrd9daabf2019-02-05 13:14:21 -050095 "_meta":""
96 },
97 "servers": [
98 {
99 "name":"core11",
sslobodrd6e07e72019-01-31 16:07:20 -0500100 "meta": [
101 {
102 "key":"voltha_serial_number",
sslobodr13182842019-02-08 14:40:30 -0500103 "value":"10000"
sslobodrd6e07e72019-01-31 16:07:20 -0500104 }
sslobodrd9daabf2019-02-05 13:14:21 -0500105 ]
106 },
107 {
108 "name":"core12",
109 "meta": [
110 {
111 "key":"voltha_serial_number",
sslobodr13182842019-02-08 14:40:30 -0500112 "value":"10000"
sslobodrd9daabf2019-02-05 13:14:21 -0500113 }
114 ]
115 }
116 ]
117 },
118 {
119 "name":"Test Subscribe",
120 "send": {
121 "client":"client",
122 "method":"Subscribe",
123 "param":"{OfagentId:\"Agent007\"}",
124 "meta": [
125 {
126 "key":"voltha_backend_name",
127 "value":""
128 }
129 ],
130 "expect":"{OfagentId:\"Agent007\",VolthaId:\"core11\"}",
131 "expectMeta": [
132 {
133 "key":"voltha_backend_name",
sslobodr13182842019-02-08 14:40:30 -0500134 "value":"vcore1"
sslobodrd9daabf2019-02-05 13:14:21 -0500135 }
136 ]
137 },
138 "servers": [
139 {
140 "name":"core11",
141 "meta": [
142 {
143 "key":"voltha_serial_number",
sslobodr13182842019-02-08 14:40:30 -0500144 "value":"10001"
sslobodrd9daabf2019-02-05 13:14:21 -0500145 },
146 {
147 "key":"voltha_backend_name",
sslobodr13182842019-02-08 14:40:30 -0500148 "value":""
sslobodrd9daabf2019-02-05 13:14:21 -0500149 }
150 ]
sslobodrd6e07e72019-01-31 16:07:20 -0500151 }
152 ]
153 }
154 ]
155}