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", |
| 33 | "GetCoreInstance", |
| 34 | "EnableLogicalDevicePort", |
| 35 | "DisableLogicalDevicePort", |
| 36 | "EnableDevice", |
| 37 | "DisableDevice", |
| 38 | "RebootDevice", |
| 39 | "DeleteDevice", |
| 40 | "DownloadImage", |
| 41 | "CancelImageDownload", |
| 42 | "ActivateImageUpdate", |
| 43 | "RevertImageUpdate", |
| 44 | "UpdateDevicePmConfigs", |
| 45 | "CreateAlarmFilter", |
| 46 | "UpdateAlarmFilter", |
| 47 | "DeleteAlarmFilter", |
| 48 | "SelfTest"], |
| 49 | "_COMMENT":"If a method is northbound affinity binding then association is used to route", |
| 50 | "_COMMENT":"but affinity is not set southbound but only based on the response", |
| 51 | "_COMMENT":"Methods here MUST be specified above, this overrides thier default beahvior", |
| 52 | "nb_binding_methods":["CreateDevice"], |
| 53 | "_TODO":"Overrides not implemented yet, config ignored", |
| 54 | "overrides": [ |
| 55 | {"methods":["abc","def"], "routing_field":"id"}, |
| 56 | {"methods":["ghi","jkl"]}, |
| 57 | {"method":"mno", "routing_field":"id"}, |
| 58 | {"method":"pqr"} |
| 59 | ] |
| 60 | }, |
| 61 | { |
| 62 | "name":"read_only", |
| 63 | "type":"round_robin", |
| 64 | "association":"round_robin", |
| 65 | "backend_cluster":"vcore", |
| 66 | "methods":[ "ListDevicePorts", |
| 67 | "ListDevicePmConfigs", |
| 68 | "GetImages", |
| 69 | "GetImageDownloadStatus", |
| 70 | "GetImageDownload", |
| 71 | "ListImageDownloads", |
| 72 | "ListDeviceFlows", |
| 73 | "ListDeviceFlowGroups", |
| 74 | "ListLogicalDeviceFlows", |
| 75 | "ListLogicalDeviceFlowGroups", |
| 76 | "ListDevices", |
| 77 | "GetDevice", |
| 78 | "GetDeviceType", |
| 79 | "GetDeviceGroup", |
| 80 | "GetLogicalDevice", |
| 81 | "GetAlarmFilter", |
| 82 | "ListLogicalDevicePorts", |
| 83 | "GetLogicalDevicePort" |
| 84 | ] |
| 85 | }, |
| 86 | { |
| 87 | "name":"dev_manager_ofagent", |
| 88 | "type":"binding", |
| 89 | "_association":"round_robin", |
| 90 | "binding": { |
| 91 | "type":"header", |
| 92 | "field":"voltha_backend_name", |
| 93 | "method":"Subscribe", |
| 94 | "association":"round_robin" |
| 95 | }, |
| 96 | "backend_cluster":"vcore", |
| 97 | "methods":["StreamPacketsOut", |
| 98 | "Subscribe", |
| 99 | "ListLogicalDevices", |
| 100 | "ListDeviceFlowGroups", |
| 101 | "ListLogicalDeviceFlowGroups", |
| 102 | "ListDeviceFlows", |
| 103 | "UpdateLogicalDeviceFlowTable", |
| 104 | "UpdateLogicalDeviceFlowGroupTable", |
| 105 | "ListLogicalDeviceFlows" |
| 106 | ], |
| 107 | "_TODO":"Overrides not implemented yet, config ignored", |
| 108 | "overrides": [ |
| 109 | {"methods":["abc","def"], "routing_field":"id"}, |
| 110 | {"methods":["ghi","jkl"]}, |
| 111 | {"method":"mno", "routing_field":"id"}, |
| 112 | {"method":"pqr"} |
| 113 | ] |
| 114 | } |
| 115 | ] |
| 116 | } |
| 117 | ], |
| 118 | "backend_clusters": [ |
| 119 | { |
| 120 | "name":"vcore", |
| 121 | "backends":[ { |
| 122 | "name":"vcore1", |
| 123 | "type":"active_active", |
| 124 | "association": { |
| 125 | "strategy":"serial_number", |
| 126 | "location":"header", |
| 127 | "_TODO":"The key below needs to be implemented, currently hard coded", |
| 128 | "key":"voltha_serial_number" |
| 129 | }, |
| 130 | "connections": [ { |
| 131 | "name":"vcore11", |
| 132 | "addr":"127.0.0.1", |
| 133 | "port":"5011" |
| 134 | }, |
| 135 | { |
| 136 | "name":"vcore12", |
| 137 | "addr":"127.0.0.1", |
| 138 | "port":"5012" |
| 139 | }] |
| 140 | }, |
| 141 | { |
| 142 | "name":"vcore2", |
| 143 | "type":"active_active", |
| 144 | "association": { |
| 145 | "strategy":"serial_number", |
sslobodr | 1318284 | 2019-02-08 14:40:30 -0500 | [diff] [blame] | 146 | "location":"header", |
| 147 | "key":"voltha_serial_number" |
sslobodr | d6e07e7 | 2019-01-31 16:07:20 -0500 | [diff] [blame] | 148 | }, |
| 149 | "connections": [ { |
| 150 | "name":"vcore21", |
| 151 | "addr":"127.0.0.1", |
| 152 | "port":"5021" |
| 153 | }, |
| 154 | { |
| 155 | "name":"vcore22", |
| 156 | "addr":"127.0.0.1", |
| 157 | "port":"5022" |
| 158 | }] |
| 159 | }, |
| 160 | { |
| 161 | "name":"vcore3", |
| 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":"vcore31", |
| 170 | "addr":"127.0.0.1", |
| 171 | "port":"5031" |
| 172 | }, |
| 173 | { |
| 174 | "name":"vcore32", |
| 175 | "addr":"127.0.0.1", |
| 176 | "port":"5032" |
| 177 | }] |
| 178 | }] |
| 179 | } |
| 180 | ], |
| 181 | "api": { |
| 182 | "_comment":"If this isn't defined then no api is available for dynamic configuration and queries", |
| 183 | "address":"", |
| 184 | "port":55554 |
| 185 | } |
| 186 | } |