Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
khenaidoo | 5fc5cea | 2021-08-11 17:39:16 -0400 | [diff] [blame] | 3 | option go_package = "github.com/opencord/voltha-protos/v5/go/voltha"; |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 4 | option java_package = "org.opencord.voltha.device"; |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 5 | option java_outer_classname = "VolthaDevice"; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 6 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 7 | package device; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 8 | |
| 9 | import "google/protobuf/any.proto"; |
khenaidoo | 5fc5cea | 2021-08-11 17:39:16 -0400 | [diff] [blame] | 10 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 11 | import "voltha_protos/common.proto"; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 12 | import "voltha_protos/openflow_13.proto"; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 13 | |
| 14 | // A Device Type |
| 15 | message DeviceType { |
| 16 | |
| 17 | // Unique name for the device type |
| 18 | string id = 1; |
| 19 | |
William Kurkian | 6ea97f8 | 2019-03-13 15:51:55 -0400 | [diff] [blame] | 20 | // Unique vendor id for the device type applicable to ONU |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 21 | // 4 bytes of vendor id from ONU serial number |
| 22 | string vendor_id = 5; |
| 23 | |
| 24 | repeated string vendor_ids = 6; |
| 25 | |
| 26 | // Name of the adapter that handles device type |
khenaidoo | 5fc5cea | 2021-08-11 17:39:16 -0400 | [diff] [blame] | 27 | // Deprecated and replaced by adapterType |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 28 | string adapter = 2; |
| 29 | |
William Kurkian | 6ea97f8 | 2019-03-13 15:51:55 -0400 | [diff] [blame] | 30 | // Capabilities |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 31 | bool accepts_bulk_flow_update = 3; |
| 32 | bool accepts_add_remove_flow_updates = 4; |
| 33 | bool accepts_direct_logical_flows_update = 7; |
| 34 | |
khenaidoo | 5fc5cea | 2021-08-11 17:39:16 -0400 | [diff] [blame] | 35 | // Type of adapter that can handle this device type |
| 36 | string adapter_type = 8; |
| 37 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | // A plurality of device types |
| 41 | message DeviceTypes { |
| 42 | repeated DeviceType items = 1; |
| 43 | } |
| 44 | |
| 45 | message PmConfig { |
| 46 | enum PmType { |
| 47 | COUNTER = 0; |
| 48 | GAUGE = 1; |
| 49 | STATE = 2; |
| 50 | CONTEXT = 3; |
| 51 | } |
| 52 | string name = 1; |
| 53 | PmType type = 2; |
| 54 | bool enabled = 3; // Whether or not this metric makes it to Kafka |
| 55 | uint32 sample_freq = 4; // Sample rate in 10ths of a second |
| 56 | } |
| 57 | |
| 58 | message PmGroupConfig { |
| 59 | string group_name = 1; |
| 60 | uint32 group_freq = 2; // Frequency applicable to the grop |
| 61 | bool enabled = 3; // Enable/disable group level only |
| 62 | repeated PmConfig metrics = 4; |
| 63 | } |
| 64 | |
| 65 | message PmConfigs { |
| 66 | string id = 1; // To work around a chameleon POST bug |
| 67 | uint32 default_freq = 2; // Default sample rate |
| 68 | // Forces group names and group semantics |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 69 | bool grouped = 3; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 70 | // Allows Pm to set an individual sample frequency |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 71 | bool freq_override = 4; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 72 | repeated PmGroupConfig groups = 5; // The groups if grouped is true |
| 73 | repeated PmConfig metrics = 6; // The metrics themselves if grouped is false. |
Rohan Agrawal | 065c818 | 2020-06-29 11:05:32 +0000 | [diff] [blame] | 74 | uint32 max_skew = 7; //Default value is set to 5 seconds |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 75 | } |
| 76 | |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 77 | //Object representing an image |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 78 | message Image { |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 79 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 80 | string name = 1; // software patch name |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 81 | |
| 82 | // Version, this is the sole identifier of the image. it's the vendor specified OMCI version |
| 83 | // must be known at the time of initiating a download, activate, commit image on an onu. |
| 84 | string version = 2; |
| 85 | |
| 86 | // hash of the image to be verified against |
| 87 | // Deprecated in voltha 2.8, will be removed |
| 88 | uint32 hash = 3; |
| 89 | |
| 90 | // Deprecated in voltha 2.8, will be removed |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 91 | string install_datetime = 4; // combined date and time expressed in UTC. |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 92 | // use ISO 8601 format for date and time |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 93 | |
| 94 | // The active software image is one that is currently loaded and executing |
| 95 | // in the ONU or circuit pack. Under normal operation, one software image |
| 96 | // is always active while the other is inactive. Under no circumstances are |
| 97 | // both software images allowed to be active at the same time |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 98 | // Deprecated in voltha 2.8, will be removed |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 99 | bool is_active = 5; // True if the image is active |
| 100 | |
| 101 | // The committed software image is loaded and executed upon reboot of the |
| 102 | // ONU and/or circuit pack. During normal operation, one software image is |
| 103 | // always committed, while the other is uncommitted. |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 104 | // Deprecated in voltha 2.8, will be removed |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 105 | bool is_committed = 6; // True if the image is committed |
| 106 | |
| 107 | // A software image is valid if it has been verified to be an executable |
| 108 | // code image. The verification mechanism is not subject to standardization; |
| 109 | // however, it should include at least a data integrity (e.g., CRC) check of |
| 110 | // the entire code image. |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 111 | // Deprecated in voltha 2.8, will be removed |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 112 | bool is_valid = 7; // True if the image is valid |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 113 | |
| 114 | // URL where the image is available |
| 115 | // URL MUST be fully qualified, |
| 116 | // including filename, username and password |
| 117 | string url = 8; |
| 118 | |
| 119 | // Represents the vendor/device mfr |
| 120 | // Needs to match the vendor of the device the image will be installed on |
| 121 | // optional, if not matched no check will be performed |
| 122 | string vendor = 9; |
| 123 | |
| 124 | // Represents the ONU Image CRC value. |
| 125 | // Default to value 0 if not specified. |
| 126 | // If different then 0 it's used to verify the image retrieved from outside before sending it to the ONU. |
| 127 | // Calculation of this needs to be done according to ITU-T I.363.5 as per OMCI spec (section A.2.27) |
| 128 | uint32 crc32 = 10; |
| 129 | |
| 130 | //TODO augment with RecommendedWindowsSize, Timeout and other valuable attributes. |
| 131 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 132 | } |
| 133 | |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 134 | // Older version of the API please see DeviceImageDownloadRequest |
| 135 | // Deprecated in voltha 2.8, will be removed |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 136 | message ImageDownload { |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 137 | option deprecated = true; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 138 | enum ImageDownloadState { |
| 139 | DOWNLOAD_UNKNOWN = 0; |
| 140 | DOWNLOAD_SUCCEEDED = 1; |
| 141 | DOWNLOAD_REQUESTED = 2; |
| 142 | DOWNLOAD_STARTED = 3; |
| 143 | DOWNLOAD_FAILED = 4; |
| 144 | DOWNLOAD_UNSUPPORTED = 5; |
| 145 | DOWNLOAD_CANCELLED = 6; |
| 146 | } |
| 147 | |
| 148 | enum ImageDownloadFailureReason { |
| 149 | NO_ERROR = 0; |
| 150 | INVALID_URL = 1; |
| 151 | DEVICE_BUSY = 2; |
| 152 | INSUFFICIENT_SPACE = 3; |
| 153 | UNKNOWN_ERROR = 4; |
| 154 | CANCELLED = 5; |
| 155 | } |
| 156 | |
| 157 | enum ImageActivateState { |
| 158 | IMAGE_UNKNOWN = 0; |
| 159 | IMAGE_INACTIVE = 1; |
William Kurkian | 6ea97f8 | 2019-03-13 15:51:55 -0400 | [diff] [blame] | 160 | IMAGE_ACTIVATING = 2; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 161 | IMAGE_ACTIVE = 3; |
William Kurkian | 6ea97f8 | 2019-03-13 15:51:55 -0400 | [diff] [blame] | 162 | IMAGE_REVERTING = 4; |
| 163 | IMAGE_REVERTED = 5; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 164 | } |
| 165 | |
| 166 | // Device Identifier |
| 167 | string id = 1; |
| 168 | |
| 169 | // Image unique identifier |
| 170 | string name = 2; |
| 171 | |
| 172 | // URL where the image is available |
| 173 | // should include username password |
| 174 | string url = 3; |
| 175 | |
| 176 | // CRC of the image to be verified aginst |
| 177 | uint32 crc = 4; |
| 178 | |
| 179 | // Download state |
| 180 | ImageDownloadState download_state = 5; |
| 181 | |
| 182 | // Downloaded version |
| 183 | string image_version = 6; |
| 184 | |
| 185 | // Bytes downloaded |
| 186 | uint32 downloaded_bytes = 7; |
| 187 | |
| 188 | // Download failure reason |
| 189 | ImageDownloadFailureReason reason= 8; |
| 190 | |
| 191 | // Additional info |
| 192 | string additional_info = 9; |
| 193 | |
| 194 | // Save current configuration |
| 195 | bool save_config = 10; |
| 196 | |
| 197 | // Image local location |
| 198 | string local_dir = 11; |
| 199 | |
| 200 | // Image activation state |
| 201 | ImageActivateState image_state = 12; |
Kent Hagerman | 66e56b4 | 2020-07-09 14:30:23 -0400 | [diff] [blame] | 202 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 203 | // Image file size |
| 204 | uint32 file_size = 13; |
| 205 | } |
| 206 | |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 207 | // Deprecated in voltha 2.8, will be removed |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 208 | message ImageDownloads { |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 209 | option deprecated = true; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 210 | repeated ImageDownload items = 2; |
| 211 | } |
| 212 | |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 213 | message Images { |
| 214 | repeated Image image = 1; |
| 215 | } |
| 216 | |
| 217 | // OnuImage represents the OMCI information as per OMCI spec |
| 218 | // the information will be populates exactly as extracted from the device. |
| 219 | message OnuImage { |
| 220 | //image version |
| 221 | string version = 1; |
| 222 | bool isCommited = 2; |
| 223 | bool isActive = 3; |
| 224 | bool isValid = 4; |
| 225 | string productCode = 5; |
| 226 | // Hash is computed by the ONU and is optional as per OMCI spec (paragraph 9.1.4) |
| 227 | // No assumption should be made on the existence of this attribute at any time. |
| 228 | string hash = 6; |
| 229 | } |
| 230 | |
| 231 | message OnuImages { |
| 232 | repeated OnuImage items = 1; |
| 233 | } |
| 234 | |
| 235 | message DeviceImageState { |
| 236 | string device_id = 1; |
| 237 | ImageState imageState = 2; |
| 238 | } |
| 239 | |
| 240 | message ImageState { |
| 241 | enum ImageDownloadState { |
| 242 | DOWNLOAD_UNKNOWN = 0; |
| 243 | DOWNLOAD_SUCCEEDED = 1; |
| 244 | DOWNLOAD_REQUESTED = 2; |
| 245 | DOWNLOAD_STARTED = 3; |
| 246 | DOWNLOAD_FAILED = 4; |
| 247 | DOWNLOAD_UNSUPPORTED = 5; |
| 248 | DOWNLOAD_CANCELLING = 6; |
| 249 | DOWNLOAD_CANCELLED = 7; |
| 250 | } |
| 251 | |
| 252 | enum ImageFailureReason { |
| 253 | NO_ERROR = 0; |
| 254 | INVALID_URL = 1; |
| 255 | DEVICE_BUSY = 2; |
| 256 | INSUFFICIENT_SPACE = 3; // VOLTHA ONU ADAPTER has no more space to store images |
| 257 | UNKNOWN_ERROR = 4; // Used also for Checksum failure on ONU |
| 258 | CANCELLED_ON_REQUEST = 5; |
| 259 | CANCELLED_ON_ONU_STATE = 6; |
| 260 | VENDOR_DEVICE_MISMATCH = 7; |
| 261 | OMCI_TRANSFER_ERROR = 8; |
| 262 | IMAGE_REFUSED_BY_ONU = 9; |
| 263 | } |
| 264 | |
| 265 | enum ImageActivationState { |
| 266 | IMAGE_UNKNOWN = 0; |
| 267 | IMAGE_INACTIVE = 1; |
| 268 | IMAGE_ACTIVATING = 2; // Happens during Reboot of the ONU after activate call. |
| 269 | IMAGE_ACTIVE = 3; |
| 270 | IMAGE_COMMITTING = 4; |
| 271 | IMAGE_COMMITTED = 5; |
| 272 | IMAGE_ACTIVATION_ABORTING = 6; |
| 273 | IMAGE_ACTIVATION_ABORTED = 7; |
| 274 | IMAGE_COMMIT_ABORTING = 8; |
| 275 | IMAGE_COMMIT_ABORTED = 9; |
| 276 | IMAGE_DOWNLOADING = 10; |
| 277 | } |
| 278 | |
| 279 | // image version |
| 280 | string version = 1; |
| 281 | |
| 282 | // Download state |
| 283 | ImageDownloadState download_state = 2; |
| 284 | |
| 285 | // Image Operation Failure reason (use for both Download and Activate) |
| 286 | ImageFailureReason reason= 3; |
| 287 | |
| 288 | // Image activation state |
| 289 | ImageActivationState image_state = 4; |
| 290 | |
| 291 | } |
| 292 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 293 | message Port { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 294 | enum PortType { |
| 295 | UNKNOWN = 0; |
| 296 | ETHERNET_NNI = 1; |
| 297 | ETHERNET_UNI = 2; |
| 298 | PON_OLT = 3; |
| 299 | PON_ONU = 4; |
| 300 | VENET_OLT = 5; |
| 301 | VENET_ONU = 6; |
| 302 | } |
| 303 | |
| 304 | uint32 port_no = 1; // Device-unique port number |
| 305 | |
| 306 | string label = 2; // Arbitrary port label |
| 307 | |
| 308 | PortType type = 3; // Type of port |
| 309 | |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 310 | common.AdminState.Types admin_state = 5; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 311 | |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 312 | common.OperStatus.Types oper_status = 6; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 313 | |
| 314 | string device_id = 7; // Unique .id of device that owns this port |
| 315 | |
| 316 | message PeerPort { |
| 317 | string device_id = 1; |
| 318 | uint32 port_no = 2; |
| 319 | } |
| 320 | repeated PeerPort peers = 8; |
| 321 | |
| 322 | fixed64 rx_packets = 9; |
| 323 | fixed64 rx_bytes = 10; |
| 324 | fixed64 rx_errors = 11; |
| 325 | fixed64 tx_packets = 12; |
| 326 | fixed64 tx_bytes = 13; |
| 327 | fixed64 tx_errors = 14; |
| 328 | |
khenaidoo | ce41ea4 | 2020-06-09 18:10:16 -0400 | [diff] [blame] | 329 | // ofp_port represents the characteristics of a port, e.g. hardware |
| 330 | // address and supported features. This field is relevant only for |
| 331 | // UNI and NNI ports. For PON ports, it can be left empty. |
| 332 | openflow_13.ofp_port ofp_port = 15; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 333 | } |
| 334 | |
| 335 | message Ports { |
| 336 | repeated Port items = 1; |
| 337 | } |
| 338 | |
| 339 | // A Physical Device instance |
| 340 | message Device { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 341 | // Voltha's device identifier |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 342 | string id = 1 ; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 343 | |
| 344 | // Device type, refers to one of the registered device types |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 345 | string type = 2 ; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 346 | |
| 347 | // Is this device a root device. Each logical switch has one root |
| 348 | // device that is associated with the logical flow switch. |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 349 | bool root = 3 ; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 350 | |
| 351 | // Parent device id, in the device tree (for a root device, the parent_id |
| 352 | // is the logical_device.id) |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 353 | string parent_id = 4; |
| 354 | uint32 parent_port_no = 20; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 355 | |
| 356 | // Vendor, version, serial number, etc. |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 357 | string vendor = 5; |
| 358 | string model = 6; |
| 359 | string hardware_version = 7; |
| 360 | string firmware_version = 8; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 361 | // List of software on the device |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 362 | Images images = 9; |
| 363 | string serial_number = 10; |
| 364 | string vendor_id = 24; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 365 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 366 | // adapter is deprecated and replaced by adapter_endpoint |
| 367 | reserved 11; |
| 368 | //string adapter = 11; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 369 | |
khenaidoo | 5fc5cea | 2021-08-11 17:39:16 -0400 | [diff] [blame] | 370 | // Indicates how to reach the adapter instance that manages this device |
| 371 | string adapter_endpoint = 25; |
| 372 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 373 | // Device contact on vlan (if 0, no vlan) |
| 374 | uint32 vlan = 12; |
| 375 | |
| 376 | message ProxyAddress { |
| 377 | string device_id = 1; // Which device to use as proxy to this device |
| 378 | string device_type = 2; // The device type of the proxy device to use as the adapter name |
| 379 | uint32 channel_id = 3; // Sub-address within proxy |
| 380 | uint32 channel_group_id = 4; // Channel Group index |
| 381 | string channel_termination = 5; // Channel Termination name |
| 382 | uint32 onu_id = 6; // onu identifier; optional |
| 383 | uint32 onu_session_id = 7; // session identifier for the ONU; optional |
khenaidoo | 5fc5cea | 2021-08-11 17:39:16 -0400 | [diff] [blame] | 384 | string adapter_endpoint = 8; // endpoint of the adapter that handles the proxy device |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 385 | }; |
| 386 | |
William Kurkian | 6ea97f8 | 2019-03-13 15:51:55 -0400 | [diff] [blame] | 387 | // Device contact MAC address (format: "xx:xx:xx:xx:xx:xx") |
| 388 | string mac_address = 13; |
| 389 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 390 | oneof address { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 391 | |
| 392 | // Device contact IPv4 address (format: "a.b.c.d" or can use hostname too) |
| 393 | string ipv4_address = 14; |
| 394 | |
| 395 | // Device contact IPv6 address using the canonical string form |
| 396 | // ("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx") |
| 397 | string ipv6_address = 15; |
| 398 | |
| 399 | string host_and_port = 21; |
| 400 | |
| 401 | }; |
| 402 | string extra_args = 23; // Used to pass additional device specific arguments |
| 403 | |
| 404 | ProxyAddress proxy_address = 19; |
| 405 | |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 406 | common.AdminState.Types admin_state = 16; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 407 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 408 | common.OperStatus.Types oper_status = 17 ; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 409 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 410 | string reason = 22 ; // Used in FAILED state |
khenaidoo Nursimulu | e9ae045 | 2021-01-13 15:23:48 +0000 | [diff] [blame] | 411 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 412 | common.ConnectStatus.Types connect_status = 18 ; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 413 | |
| 414 | // TODO additional common attribute here |
| 415 | |
| 416 | // Device type specific attributes |
| 417 | google.protobuf.Any custom = 64; |
| 418 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 419 | // PmConfigs type |
| 420 | PmConfigs pm_configs = 131 ; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 421 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 422 | repeated ImageDownload image_downloads = 133; |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 423 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 424 | } |
| 425 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 426 | message DeviceImageDownloadRequest { |
| 427 | |
| 428 | // Device Id |
| 429 | // allows for operations on multiple devices. |
| 430 | repeated common.ID device_id = 1; |
| 431 | |
| 432 | //The image for the device containing all the information |
| 433 | Image image = 2; |
| 434 | |
| 435 | //Activate the image if the download to the device is successful |
| 436 | bool activateOnSuccess = 3; |
| 437 | |
| 438 | //Automatically commit the image if the activation on the device is successful |
| 439 | bool commitOnSuccess = 4; |
| 440 | } |
| 441 | |
| 442 | message DeviceImageRequest { |
| 443 | |
| 444 | //Device Id |
| 445 | //allows for operations on multiple adapters. |
| 446 | repeated common.ID device_id = 1; |
| 447 | |
| 448 | // Image Version, this is the sole identifier of the image. it's the vendor specified OMCI version |
| 449 | // must be known at the time of initiating a download, activate, commit image on an onu. |
| 450 | string version = 2; |
| 451 | |
| 452 | //Automatically commit the image if the activation on the device is successful |
| 453 | bool commitOnSuccess = 3; |
| 454 | } |
| 455 | |
| 456 | message DeviceImageResponse { |
| 457 | |
| 458 | //Image state for the different devices |
| 459 | repeated DeviceImageState device_image_states = 1; |
| 460 | } |
| 461 | |
| 462 | // Device Self Test Response |
| 463 | message SelfTestResponse { |
| 464 | |
| 465 | enum SelfTestResult { |
| 466 | SUCCESS = 0; |
| 467 | FAILURE = 1; |
| 468 | NOT_SUPPORTED = 2; |
| 469 | UNKNOWN_ERROR = 3; |
| 470 | } |
| 471 | SelfTestResult result = 1; |
| 472 | } |
| 473 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 474 | message Devices { |
| 475 | repeated Device items = 1; |
| 476 | } |
| 477 | |
| 478 | message SimulateAlarmRequest { |
| 479 | enum OperationType { |
| 480 | RAISE = 0; |
| 481 | CLEAR = 1; |
| 482 | } |
| 483 | // Device Identifier |
| 484 | string id = 1; |
| 485 | string indicator = 2; |
| 486 | string intf_id = 3; |
| 487 | string port_type_name = 4; |
| 488 | string onu_device_id = 5; |
| 489 | int32 inverse_bit_error_rate = 6; |
| 490 | int32 drift = 7; |
| 491 | int32 new_eqd = 8; |
| 492 | string onu_serial_number = 9; |
| 493 | OperationType operation = 10; |
| 494 | } |