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 | 6067656 | 2019-03-15 14:56:25 -0700 | [diff] [blame] | 30 | ID string `json:"id"` |
| 31 | CTag int16 `json:"cTag"` |
| 32 | STag int16 `json:"sTag"` |
| 33 | NasPortID string `json:"nasPortId"` |
| 34 | CircuitID string `json:"circuitId"` |
| 35 | RemoteID string `json:"remoteId"` |
| 36 | UpstreamBandwidthProfile string `json:"upstreamBandwidthProfile"` |
| 37 | DownstreamBandwidthProfile string `json:"downstreamBandwidthProfile"` |
Matteo Scandolo | 04428fd | 2019-04-17 14:22:30 -0700 | [diff] [blame] | 38 | TechnologyProfileID int `json:"technologyProfileId"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | /* |
| 42 | XOS RCORD subscriber format |
| 43 | */ |
| 44 | type subscriber struct { |
Matteo Scandolo | 6067656 | 2019-03-15 14:56:25 -0700 | [diff] [blame] | 45 | ID int `json:"id"` |
| 46 | CTag int16 `json:"c_tag"` |
| 47 | STag int16 `json:"s_tag"` |
| 48 | OnuSerialNumber string `json:"onu_device"` |
| 49 | NasPortID string `json:"nas_port_id"` |
| 50 | CircuitID string `json:"circuit_id"` |
| 51 | RemoteID string `json:"remote_id"` |
| 52 | UpstreamBandwidthProfile int `json:"upstream_bps_id"` |
| 53 | DownstreamBandwidthProfile int `json:"downstream_bps_id"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 54 | } |
| 55 | |
| 56 | type subscribers struct { |
| 57 | Subscribers []*subscriber `json:"items"` |
| 58 | } |
| 59 | |
| 60 | /* |
Matteo Scandolo | 6067656 | 2019-03-15 14:56:25 -0700 | [diff] [blame] | 61 | XOS BandwidthProfile format |
| 62 | */ |
| 63 | type bandwidthprofile struct { |
| 64 | Name string `json:"name"` |
| 65 | Cir int `json:"cir"` |
| 66 | Cbs int `json:"cbs"` |
| 67 | Eir int `json:"eir"` |
| 68 | Ebs int `json:"ebs"` |
| 69 | Air int `json:"air"` |
| 70 | } |
| 71 | |
| 72 | type bandwidthprofiles struct { |
| 73 | Profiles []*bandwidthprofile `json:"items"` |
| 74 | } |
| 75 | |
| 76 | /* |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 77 | { |
| 78 | "id" : "10.1.1.1:9191", |
| 79 | "hardwareIdentifier" : "de:ad:be:ef:ba:11", |
| 80 | "uplinkPort" : 128 |
| 81 | } |
| 82 | */ |
| 83 | /* |
| 84 | ONOS SADIS device format |
| 85 | */ |
| 86 | type sadisDevice struct { |
Matteo Scandolo | a79e608 | 2018-08-21 14:16:47 -0700 | [diff] [blame] | 87 | ID string `json:"id"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 88 | HardwareID string `json:"hardwareIdentifier"` |
Matteo Scandolo | a79e608 | 2018-08-21 14:16:47 -0700 | [diff] [blame] | 89 | Uplink int `json:"uplinkPort"` |
Matteo Scandolo | 3f330cd | 2018-08-31 07:29:35 -0700 | [diff] [blame] | 90 | IPAddress string `json:"ipAddress"` |
| 91 | NasID string `json:"nasId"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 92 | } |
| 93 | |
| 94 | /* |
| 95 | XOS vOLT device format |
| 96 | */ |
| 97 | type oltDevice struct { |
Matteo Scandolo | 5be70a1 | 2018-10-16 10:57:57 -0700 | [diff] [blame] | 98 | Uplink string `json:"uplink"` |
| 99 | Host string `json:"host"` |
| 100 | Port int `json:"port"` |
| 101 | NasID string `json:"nas_id"` |
| 102 | SerialNumber string `json:"serial_number"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 103 | } |
| 104 | |
| 105 | type oltDevices struct { |
| 106 | OltDevices []*oltDevice `json:"items"` |
| 107 | } |
Matteo Scandolo | 6067656 | 2019-03-15 14:56:25 -0700 | [diff] [blame] | 108 | |
| 109 | /* |
| 110 | ONOS SADIS bandwidth profile format |
| 111 | */ |
| 112 | |
| 113 | type sadisBandwidthProfile struct { |
| 114 | ID string `json:"id"` |
| 115 | Cir int `json:"cir"` |
| 116 | Cbs int `json:"cbs"` |
| 117 | Eir int `json:"eir"` |
| 118 | Ebs int `json:"ebs"` |
| 119 | Air int `json:"air"` |
| 120 | } |