sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 1 | { |
| 2 | "environment":{ |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 3 | "cmdLine":"afrouter -config arouter_test.json -grpclog", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 4 | "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":[ |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 56 | {{range $k,$v := .}} |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 57 | { |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 58 | "name":"Test CreateDevice", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 59 | "send": { |
| 60 | "client":"client", |
| 61 | "method":"CreateDevice", |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 62 | "param":"{Type:\"simulated_olt\"}", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 63 | "expect":"{Id:\"abcd1234{{$k}}\",Type:\"simulated_olt\"}", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 64 | "_meta":"" |
| 65 | }, |
| 66 | "servers": [ |
| 67 | { |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 68 | "name":"core{{$v.Core}}1", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 69 | "meta": [ |
| 70 | { |
| 71 | "key":"voltha_serial_number", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 72 | "value":"{{$k}}" |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 73 | } |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 74 | ] |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 75 | }, |
| 76 | { |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 77 | "name":"core{{$v.Core}}2", |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 78 | "meta": [ |
| 79 | { |
| 80 | "key":"voltha_serial_number", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 81 | "value":"{{$k}}" |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 82 | } |
| 83 | ] |
| 84 | } |
| 85 | ] |
| 86 | }, |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 87 | {{end}} |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 88 | { |
| 89 | "name":"Test GetDevice", |
| 90 | "send": { |
| 91 | "client":"client", |
| 92 | "method":"GetDevice", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 93 | "param":"{Id:\"abcd12340\"}", |
| 94 | "expect":"{Id:\"abcd12340\",Type:\"simulated_olt\"}", |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 95 | "_meta":"" |
| 96 | }, |
| 97 | "servers": [ |
| 98 | { |
| 99 | "name":"core11", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 100 | "meta": [ |
| 101 | { |
| 102 | "key":"voltha_serial_number", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 103 | "value":"10000" |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 104 | } |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 105 | ] |
| 106 | }, |
| 107 | { |
| 108 | "name":"core12", |
| 109 | "meta": [ |
| 110 | { |
| 111 | "key":"voltha_serial_number", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 112 | "value":"10000" |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 113 | } |
| 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", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 134 | "value":"vcore1" |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 135 | } |
| 136 | ] |
| 137 | }, |
| 138 | "servers": [ |
| 139 | { |
| 140 | "name":"core11", |
| 141 | "meta": [ |
| 142 | { |
| 143 | "key":"voltha_serial_number", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 144 | "value":"10001" |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 145 | }, |
| 146 | { |
| 147 | "key":"voltha_backend_name", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 148 | "value":"" |
sslobodr | d9daabf | 2019-02-05 13:14:21 -0500 | [diff] [blame] | 149 | } |
| 150 | ] |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 151 | } |
| 152 | ] |
| 153 | } |
| 154 | ] |
| 155 | } |