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"` |
selvamuthukumaran_c | 4a78f3d | 2019-05-22 06:13:57 +0000 | [diff] [blame] | 54 | TechnologyProfileID int `json:"tech_profile_id"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | type subscribers struct { |
| 58 | Subscribers []*subscriber `json:"items"` |
| 59 | } |
| 60 | |
| 61 | /* |
Matteo Scandolo | 6067656 | 2019-03-15 14:56:25 -0700 | [diff] [blame] | 62 | XOS BandwidthProfile format |
| 63 | */ |
| 64 | type bandwidthprofile struct { |
| 65 | Name string `json:"name"` |
| 66 | Cir int `json:"cir"` |
| 67 | Cbs int `json:"cbs"` |
| 68 | Eir int `json:"eir"` |
| 69 | Ebs int `json:"ebs"` |
| 70 | Air int `json:"air"` |
| 71 | } |
| 72 | |
| 73 | type bandwidthprofiles struct { |
| 74 | Profiles []*bandwidthprofile `json:"items"` |
| 75 | } |
| 76 | |
| 77 | /* |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 78 | { |
| 79 | "id" : "10.1.1.1:9191", |
| 80 | "hardwareIdentifier" : "de:ad:be:ef:ba:11", |
| 81 | "uplinkPort" : 128 |
| 82 | } |
| 83 | */ |
| 84 | /* |
| 85 | ONOS SADIS device format |
| 86 | */ |
| 87 | type sadisDevice struct { |
Matteo Scandolo | a79e608 | 2018-08-21 14:16:47 -0700 | [diff] [blame] | 88 | ID string `json:"id"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 89 | HardwareID string `json:"hardwareIdentifier"` |
Matteo Scandolo | a79e608 | 2018-08-21 14:16:47 -0700 | [diff] [blame] | 90 | Uplink int `json:"uplinkPort"` |
Matteo Scandolo | 3f330cd | 2018-08-31 07:29:35 -0700 | [diff] [blame] | 91 | IPAddress string `json:"ipAddress"` |
| 92 | NasID string `json:"nasId"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | /* |
| 96 | XOS vOLT device format |
| 97 | */ |
| 98 | type oltDevice struct { |
Matteo Scandolo | 5be70a1 | 2018-10-16 10:57:57 -0700 | [diff] [blame] | 99 | Uplink string `json:"uplink"` |
| 100 | Host string `json:"host"` |
| 101 | Port int `json:"port"` |
| 102 | NasID string `json:"nas_id"` |
| 103 | SerialNumber string `json:"serial_number"` |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 104 | } |
| 105 | |
| 106 | type oltDevices struct { |
| 107 | OltDevices []*oltDevice `json:"items"` |
| 108 | } |
Matteo Scandolo | 6067656 | 2019-03-15 14:56:25 -0700 | [diff] [blame] | 109 | |
| 110 | /* |
| 111 | ONOS SADIS bandwidth profile format |
| 112 | */ |
| 113 | |
| 114 | type sadisBandwidthProfile struct { |
| 115 | ID string `json:"id"` |
| 116 | Cir int `json:"cir"` |
| 117 | Cbs int `json:"cbs"` |
| 118 | Eir int `json:"eir"` |
| 119 | Ebs int `json:"ebs"` |
| 120 | Air int `json:"air"` |
| 121 | } |