Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 1 | // Copyright 2018 Open Networking Foundation |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | package main |
| 15 | |
| 16 | /* |
| 17 | { |
| 18 | "id": "PONSIM", |
| 19 | "cTag": 333, |
| 20 | "sTag": 444, |
| 21 | "nasPortId": "PON 1/1/03/1:1.1.1", |
| 22 | "circuitId": "foo", |
| 23 | "remoteId": "bar" |
| 24 | } |
| 25 | */ |
| 26 | /* |
| 27 | ONOS SADIS subscriber format |
| 28 | */ |
| 29 | type sadisSubscriber struct { |
Matteo Scandolo | a79e608 | 2018-08-21 14:16:47 -0700 | [diff] [blame] | 30 | ID string `json:"id"` |
| 31 | CTag int16 `json:"cTag"` |
| 32 | STag int16 `json:"sTag"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 33 | NasPortID string `json:"nasPortId"` |
| 34 | CircuitID string `json:"circuitId"` |
Matteo Scandolo | a79e608 | 2018-08-21 14:16:47 -0700 | [diff] [blame] | 35 | RemoteID string `json:"remoteId"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | /* |
| 39 | XOS RCORD subscriber format |
| 40 | */ |
| 41 | type subscriber struct { |
Matteo Scandolo | a79e608 | 2018-08-21 14:16:47 -0700 | [diff] [blame] | 42 | CTag int16 `json:"c_tag"` |
| 43 | STag int16 `json:"s_tag"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 44 | OnuSerialNumber string `json:"onu_device"` |
Matteo Scandolo | a79e608 | 2018-08-21 14:16:47 -0700 | [diff] [blame] | 45 | NasPortID string `json:"nas_port_id"` |
| 46 | CircuitID string `json:"circuit_id"` |
| 47 | RemoteID string `json:"remote_id"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | type subscribers struct { |
| 51 | Subscribers []*subscriber `json:"items"` |
| 52 | } |
| 53 | |
| 54 | /* |
| 55 | { |
| 56 | "id" : "10.1.1.1:9191", |
| 57 | "hardwareIdentifier" : "de:ad:be:ef:ba:11", |
| 58 | "uplinkPort" : 128 |
| 59 | } |
| 60 | */ |
| 61 | /* |
| 62 | ONOS SADIS device format |
| 63 | */ |
| 64 | type sadisDevice struct { |
Matteo Scandolo | a79e608 | 2018-08-21 14:16:47 -0700 | [diff] [blame] | 65 | ID string `json:"id"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 66 | HardwareID string `json:"hardwareIdentifier"` |
Matteo Scandolo | a79e608 | 2018-08-21 14:16:47 -0700 | [diff] [blame] | 67 | Uplink int `json:"uplinkPort"` |
Matteo Scandolo | 3f330cd | 2018-08-31 07:29:35 -0700 | [diff] [blame^] | 68 | IPAddress string `json:"ipAddress"` |
| 69 | NasID string `json:"nasId"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | /* |
| 73 | XOS vOLT device format |
| 74 | */ |
| 75 | type oltDevice struct { |
| 76 | Uplink string `json:"uplink"` |
Matteo Scandolo | a79e608 | 2018-08-21 14:16:47 -0700 | [diff] [blame] | 77 | Host string `json:"host"` |
| 78 | Port int `json:"port"` |
Matteo Scandolo | 3f330cd | 2018-08-31 07:29:35 -0700 | [diff] [blame^] | 79 | NasID string `json:"nas_id"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 80 | } |
| 81 | |
| 82 | type oltDevices struct { |
| 83 | OltDevices []*oltDevice `json:"items"` |
| 84 | } |