sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 1 | { |
| 2 | "servers": [ |
| 3 | { |
| 4 | "name": "grpc_command", |
| 5 | "port": 5000, |
| 6 | "address":"", |
| 7 | "type": "grpc", |
| 8 | "routers": [ |
| 9 | { |
| 10 | "_TODO":"Suport a router list, remove the package and service from the router", |
| 11 | "package":"voltha", |
| 12 | "service":"VolthaService", |
| 13 | "router":"vcore" |
| 14 | } |
| 15 | ] |
| 16 | } |
| 17 | ], |
| 18 | "routers": [ |
| 19 | { |
| 20 | "name":"vcore", |
| 21 | "package": "voltha", |
| 22 | "service": "VolthaService", |
| 23 | "routes": [ |
| 24 | { |
| 25 | "name":"dev_manager", |
| 26 | "proto_descriptor":"voltha.pb", |
| 27 | "type":"rpc_affinity_message", |
| 28 | "association":"round_robin", |
| 29 | "routing_field": "id", |
| 30 | "backend_cluster":"vcore", |
| 31 | "_COMMENT":"Methods are naturally southbound affinity binding unless otherwise specified below", |
| 32 | "methods":[ "CreateDevice", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 33 | "EnableLogicalDevicePort", |
| 34 | "DisableLogicalDevicePort", |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 35 | "UpdateLogicalDeviceFlowTable", |
| 36 | "UpdateLogicalDeviceFlowGroupTable", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 37 | "EnableDevice", |
| 38 | "DisableDevice", |
| 39 | "RebootDevice", |
| 40 | "DeleteDevice", |
| 41 | "DownloadImage", |
| 42 | "CancelImageDownload", |
| 43 | "ActivateImageUpdate", |
| 44 | "RevertImageUpdate", |
| 45 | "UpdateDevicePmConfigs", |
| 46 | "CreateAlarmFilter", |
| 47 | "UpdateAlarmFilter", |
| 48 | "DeleteAlarmFilter", |
| 49 | "SelfTest"], |
| 50 | "_COMMENT":"If a method is northbound affinity binding then association is used to route", |
| 51 | "_COMMENT":"but affinity is not set southbound but only based on the response", |
| 52 | "_COMMENT":"Methods here MUST be specified above, this overrides thier default beahvior", |
| 53 | "nb_binding_methods":["CreateDevice"], |
| 54 | "_TODO":"Overrides not implemented yet, config ignored", |
| 55 | "overrides": [ |
| 56 | {"methods":["abc","def"], "routing_field":"id"}, |
| 57 | {"methods":["ghi","jkl"]}, |
| 58 | {"method":"mno", "routing_field":"id"}, |
| 59 | {"method":"pqr"} |
| 60 | ] |
| 61 | }, |
| 62 | { |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 63 | "name":"control", |
| 64 | "type":"round_robin", |
| 65 | "association":"round_robin", |
| 66 | "backend_cluster":"vcore", |
| 67 | "methods":[ |
| 68 | "UpdateLogLevel" |
| 69 | ] |
| 70 | }, |
| 71 | { |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 72 | "name":"read_only", |
| 73 | "type":"round_robin", |
| 74 | "association":"round_robin", |
| 75 | "backend_cluster":"vcore", |
| 76 | "methods":[ "ListDevicePorts", |
| 77 | "ListDevicePmConfigs", |
| 78 | "GetImages", |
| 79 | "GetImageDownloadStatus", |
| 80 | "GetImageDownload", |
| 81 | "ListImageDownloads", |
| 82 | "ListDeviceFlows", |
| 83 | "ListDeviceFlowGroups", |
| 84 | "ListLogicalDeviceFlows", |
| 85 | "ListLogicalDeviceFlowGroups", |
| 86 | "ListDevices", |
| 87 | "GetDevice", |
| 88 | "GetDeviceType", |
| 89 | "GetDeviceGroup", |
| 90 | "GetLogicalDevice", |
| 91 | "GetAlarmFilter", |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 92 | "ListLogicalDevices", |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 93 | "ListLogicalDevicePorts", |
sslobodr | 1d1e50b | 2019-03-14 09:17:40 -0400 | [diff] [blame] | 94 | "GetLogicalDevicePort", |
| 95 | "GetVoltha", |
| 96 | "ListCoreInstances", |
| 97 | "ListAdapters", |
| 98 | "ListDeviceIds", |
| 99 | "ListDeviceTypes", |
| 100 | "ListDeviceGroups", |
| 101 | "ListAlarmFilters", |
| 102 | "GetCoreInstance" |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 103 | ] |
| 104 | }, |
| 105 | { |
| 106 | "name":"dev_manager_ofagent", |
| 107 | "type":"binding", |
| 108 | "_association":"round_robin", |
| 109 | "binding": { |
| 110 | "type":"header", |
| 111 | "field":"voltha_backend_name", |
| 112 | "method":"Subscribe", |
| 113 | "association":"round_robin" |
| 114 | }, |
| 115 | "backend_cluster":"vcore", |
| 116 | "methods":["StreamPacketsOut", |
| 117 | "Subscribe", |
| 118 | "ListLogicalDevices", |
| 119 | "ListDeviceFlowGroups", |
| 120 | "ListLogicalDeviceFlowGroups", |
| 121 | "ListDeviceFlows", |
| 122 | "UpdateLogicalDeviceFlowTable", |
| 123 | "UpdateLogicalDeviceFlowGroupTable", |
| 124 | "ListLogicalDeviceFlows" |
| 125 | ], |
| 126 | "_TODO":"Overrides not implemented yet, config ignored", |
| 127 | "overrides": [ |
| 128 | {"methods":["abc","def"], "routing_field":"id"}, |
| 129 | {"methods":["ghi","jkl"]}, |
| 130 | {"method":"mno", "routing_field":"id"}, |
| 131 | {"method":"pqr"} |
| 132 | ] |
| 133 | } |
| 134 | ] |
| 135 | } |
| 136 | ], |
| 137 | "backend_clusters": [ |
| 138 | { |
| 139 | "name":"vcore", |
| 140 | "backends":[ { |
| 141 | "name":"vcore1", |
| 142 | "type":"active_active", |
| 143 | "association": { |
| 144 | "strategy":"serial_number", |
| 145 | "location":"header", |
| 146 | "_TODO":"The key below needs to be implemented, currently hard coded", |
| 147 | "key":"voltha_serial_number" |
| 148 | }, |
| 149 | "connections": [ { |
| 150 | "name":"vcore11", |
| 151 | "addr":"127.0.0.1", |
| 152 | "port":"5011" |
| 153 | }, |
| 154 | { |
| 155 | "name":"vcore12", |
| 156 | "addr":"127.0.0.1", |
| 157 | "port":"5012" |
| 158 | }] |
| 159 | }, |
| 160 | { |
| 161 | "name":"vcore2", |
| 162 | "type":"active_active", |
| 163 | "association": { |
| 164 | "strategy":"serial_number", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 165 | "location":"header", |
| 166 | "key":"voltha_serial_number" |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 167 | }, |
| 168 | "connections": [ { |
| 169 | "name":"vcore21", |
| 170 | "addr":"127.0.0.1", |
| 171 | "port":"5021" |
| 172 | }, |
| 173 | { |
| 174 | "name":"vcore22", |
| 175 | "addr":"127.0.0.1", |
| 176 | "port":"5022" |
| 177 | }] |
| 178 | }, |
| 179 | { |
| 180 | "name":"vcore3", |
| 181 | "type":"active_active", |
| 182 | "association": { |
| 183 | "strategy":"serial_number", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 184 | "location":"header", |
| 185 | "key":"voltha_serial_number" |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 186 | }, |
| 187 | "connections": [ { |
| 188 | "name":"vcore31", |
| 189 | "addr":"127.0.0.1", |
| 190 | "port":"5031" |
| 191 | }, |
| 192 | { |
| 193 | "name":"vcore32", |
| 194 | "addr":"127.0.0.1", |
| 195 | "port":"5032" |
| 196 | }] |
| 197 | }] |
| 198 | } |
| 199 | ], |
| 200 | "api": { |
| 201 | "_comment":"If this isn't defined then no api is available for dynamic configuration and queries", |
| 202 | "address":"", |
| 203 | "port":55554 |
| 204 | } |
| 205 | } |