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; |
bseeniva | d4072f6 | 2024-12-11 10:05:30 +0530 | [diff] [blame] | 277 | IMAGE_DOWNLOADING_ABORTED = 11; |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 278 | } |
| 279 | |
| 280 | // image version |
| 281 | string version = 1; |
| 282 | |
| 283 | // Download state |
| 284 | ImageDownloadState download_state = 2; |
| 285 | |
| 286 | // Image Operation Failure reason (use for both Download and Activate) |
| 287 | ImageFailureReason reason= 3; |
| 288 | |
| 289 | // Image activation state |
| 290 | ImageActivationState image_state = 4; |
| 291 | |
| 292 | } |
| 293 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 294 | message Port { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 295 | enum PortType { |
| 296 | UNKNOWN = 0; |
| 297 | ETHERNET_NNI = 1; |
| 298 | ETHERNET_UNI = 2; |
| 299 | PON_OLT = 3; |
| 300 | PON_ONU = 4; |
| 301 | VENET_OLT = 5; |
| 302 | VENET_ONU = 6; |
| 303 | } |
| 304 | |
| 305 | uint32 port_no = 1; // Device-unique port number |
| 306 | |
| 307 | string label = 2; // Arbitrary port label |
| 308 | |
| 309 | PortType type = 3; // Type of port |
| 310 | |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 311 | common.AdminState.Types admin_state = 5; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 312 | |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 313 | common.OperStatus.Types oper_status = 6; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 314 | |
| 315 | string device_id = 7; // Unique .id of device that owns this port |
| 316 | |
| 317 | message PeerPort { |
| 318 | string device_id = 1; |
| 319 | uint32 port_no = 2; |
| 320 | } |
| 321 | repeated PeerPort peers = 8; |
| 322 | |
| 323 | fixed64 rx_packets = 9; |
| 324 | fixed64 rx_bytes = 10; |
| 325 | fixed64 rx_errors = 11; |
| 326 | fixed64 tx_packets = 12; |
| 327 | fixed64 tx_bytes = 13; |
| 328 | fixed64 tx_errors = 14; |
| 329 | |
khenaidoo | ce41ea4 | 2020-06-09 18:10:16 -0400 | [diff] [blame] | 330 | // ofp_port represents the characteristics of a port, e.g. hardware |
| 331 | // address and supported features. This field is relevant only for |
| 332 | // UNI and NNI ports. For PON ports, it can be left empty. |
| 333 | openflow_13.ofp_port ofp_port = 15; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 334 | } |
| 335 | |
| 336 | message Ports { |
| 337 | repeated Port items = 1; |
| 338 | } |
| 339 | |
| 340 | // A Physical Device instance |
| 341 | message Device { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 342 | // Voltha's device identifier |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 343 | string id = 1 ; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 344 | |
| 345 | // Device type, refers to one of the registered device types |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 346 | string type = 2 ; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 347 | |
| 348 | // Is this device a root device. Each logical switch has one root |
| 349 | // device that is associated with the logical flow switch. |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 350 | bool root = 3 ; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 351 | |
| 352 | // Parent device id, in the device tree (for a root device, the parent_id |
| 353 | // is the logical_device.id) |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 354 | string parent_id = 4; |
| 355 | uint32 parent_port_no = 20; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 356 | |
| 357 | // Vendor, version, serial number, etc. |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 358 | string vendor = 5; |
| 359 | string model = 6; |
| 360 | string hardware_version = 7; |
| 361 | string firmware_version = 8; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 362 | // List of software on the device |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 363 | Images images = 9; |
| 364 | string serial_number = 10; |
| 365 | string vendor_id = 24; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 366 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 367 | // adapter is deprecated and replaced by adapter_endpoint |
| 368 | reserved 11; |
| 369 | //string adapter = 11; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 370 | |
khenaidoo | 5fc5cea | 2021-08-11 17:39:16 -0400 | [diff] [blame] | 371 | // Indicates how to reach the adapter instance that manages this device |
| 372 | string adapter_endpoint = 25; |
| 373 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 374 | // Device contact on vlan (if 0, no vlan) |
| 375 | uint32 vlan = 12; |
| 376 | |
| 377 | message ProxyAddress { |
| 378 | string device_id = 1; // Which device to use as proxy to this device |
| 379 | string device_type = 2; // The device type of the proxy device to use as the adapter name |
| 380 | uint32 channel_id = 3; // Sub-address within proxy |
| 381 | uint32 channel_group_id = 4; // Channel Group index |
| 382 | string channel_termination = 5; // Channel Termination name |
| 383 | uint32 onu_id = 6; // onu identifier; optional |
| 384 | uint32 onu_session_id = 7; // session identifier for the ONU; optional |
khenaidoo | 5fc5cea | 2021-08-11 17:39:16 -0400 | [diff] [blame] | 385 | 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] | 386 | }; |
| 387 | |
William Kurkian | 6ea97f8 | 2019-03-13 15:51:55 -0400 | [diff] [blame] | 388 | // Device contact MAC address (format: "xx:xx:xx:xx:xx:xx") |
| 389 | string mac_address = 13; |
| 390 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 391 | oneof address { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 392 | |
| 393 | // Device contact IPv4 address (format: "a.b.c.d" or can use hostname too) |
| 394 | string ipv4_address = 14; |
| 395 | |
| 396 | // Device contact IPv6 address using the canonical string form |
| 397 | // ("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx") |
| 398 | string ipv6_address = 15; |
| 399 | |
| 400 | string host_and_port = 21; |
| 401 | |
| 402 | }; |
| 403 | string extra_args = 23; // Used to pass additional device specific arguments |
| 404 | |
| 405 | ProxyAddress proxy_address = 19; |
| 406 | |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 407 | common.AdminState.Types admin_state = 16; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 408 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 409 | common.OperStatus.Types oper_status = 17 ; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 410 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 411 | string reason = 22 ; // Used in FAILED state |
khenaidoo Nursimulu | e9ae045 | 2021-01-13 15:23:48 +0000 | [diff] [blame] | 412 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 413 | common.ConnectStatus.Types connect_status = 18 ; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 414 | |
| 415 | // TODO additional common attribute here |
| 416 | |
| 417 | // Device type specific attributes |
| 418 | google.protobuf.Any custom = 64; |
| 419 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 420 | // PmConfigs type |
| 421 | PmConfigs pm_configs = 131 ; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 422 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 423 | repeated ImageDownload image_downloads = 133; |
Andrea Campanella | 9e94e8a | 2021-01-19 15:21:25 +0100 | [diff] [blame] | 424 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 425 | } |
| 426 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 427 | message DeviceImageDownloadRequest { |
| 428 | |
| 429 | // Device Id |
| 430 | // allows for operations on multiple devices. |
| 431 | repeated common.ID device_id = 1; |
| 432 | |
| 433 | //The image for the device containing all the information |
| 434 | Image image = 2; |
| 435 | |
| 436 | //Activate the image if the download to the device is successful |
| 437 | bool activateOnSuccess = 3; |
| 438 | |
| 439 | //Automatically commit the image if the activation on the device is successful |
| 440 | bool commitOnSuccess = 4; |
| 441 | } |
| 442 | |
| 443 | message DeviceImageRequest { |
| 444 | |
| 445 | //Device Id |
| 446 | //allows for operations on multiple adapters. |
| 447 | repeated common.ID device_id = 1; |
| 448 | |
| 449 | // Image Version, this is the sole identifier of the image. it's the vendor specified OMCI version |
| 450 | // must be known at the time of initiating a download, activate, commit image on an onu. |
| 451 | string version = 2; |
| 452 | |
| 453 | //Automatically commit the image if the activation on the device is successful |
| 454 | bool commitOnSuccess = 3; |
| 455 | } |
| 456 | |
| 457 | message DeviceImageResponse { |
| 458 | |
| 459 | //Image state for the different devices |
| 460 | repeated DeviceImageState device_image_states = 1; |
| 461 | } |
| 462 | |
| 463 | // Device Self Test Response |
| 464 | message SelfTestResponse { |
| 465 | |
| 466 | enum SelfTestResult { |
| 467 | SUCCESS = 0; |
| 468 | FAILURE = 1; |
| 469 | NOT_SUPPORTED = 2; |
| 470 | UNKNOWN_ERROR = 3; |
| 471 | } |
| 472 | SelfTestResult result = 1; |
| 473 | } |
| 474 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 475 | message Devices { |
| 476 | repeated Device items = 1; |
| 477 | } |
| 478 | |
| 479 | message SimulateAlarmRequest { |
| 480 | enum OperationType { |
| 481 | RAISE = 0; |
| 482 | CLEAR = 1; |
| 483 | } |
| 484 | // Device Identifier |
| 485 | string id = 1; |
| 486 | string indicator = 2; |
| 487 | string intf_id = 3; |
| 488 | string port_type_name = 4; |
| 489 | string onu_device_id = 5; |
| 490 | int32 inverse_bit_error_rate = 6; |
| 491 | int32 drift = 7; |
| 492 | int32 new_eqd = 8; |
| 493 | string onu_serial_number = 9; |
| 494 | OperationType operation = 10; |
| 495 | } |