Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
Matteo Scandolo | b3c08ae | 2020-10-14 13:15:43 -0700 | [diff] [blame] | 3 | option go_package = "github.com/opencord/voltha-protos/v4/go/common"; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 4 | |
William Kurkian | 12fc0af | 2019-04-18 14:27:45 -0400 | [diff] [blame] | 5 | package common; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 6 | |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 7 | option java_package = "org.opencord.voltha"; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 8 | |
| 9 | // Convey a resource identifier |
| 10 | message ID { |
| 11 | string id = 1; |
| 12 | } |
| 13 | |
| 14 | // Represents a list of IDs |
| 15 | message IDs { |
| 16 | repeated ID items = 1; |
| 17 | } |
| 18 | |
| 19 | enum TestModeKeys { |
| 20 | api_test=0; |
| 21 | } |
| 22 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 23 | message AdminState { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 24 | // Administrative State |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 25 | enum Types { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 26 | |
| 27 | // The administrative state of the device is unknown |
| 28 | UNKNOWN = 0; |
| 29 | |
| 30 | // The device is pre-provisioned into Voltha, but not contacted by it |
| 31 | PREPROVISIONED = 1; |
| 32 | |
| 33 | // The device is enabled for activation and operation |
| 34 | ENABLED = 2; |
| 35 | |
| 36 | // The device is disabled and shall not perform its intended forwarding |
| 37 | // functions other than being available for re-activation. |
| 38 | DISABLED = 3; |
| 39 | |
| 40 | // The device is in the state of image download |
| 41 | DOWNLOADING_IMAGE = 4; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 42 | } |
| 43 | } |
| 44 | |
| 45 | message OperStatus { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 46 | // Operational Status |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 47 | enum Types { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 48 | |
| 49 | // The status of the device is unknown at this point |
| 50 | UNKNOWN = 0; |
| 51 | |
| 52 | // The device has been discovered, but not yet activated |
| 53 | DISCOVERED = 1; |
| 54 | |
| 55 | // The device is being activated (booted, rebooted, upgraded, etc.) |
| 56 | ACTIVATING = 2; |
| 57 | |
| 58 | // Service impacting tests are being conducted |
| 59 | TESTING = 3; |
| 60 | |
| 61 | // The device is up and active |
| 62 | ACTIVE = 4; |
| 63 | |
| 64 | // The device has failed and cannot fulfill its intended role |
| 65 | FAILED = 5; |
Maninder | 4ed97f5 | 2021-03-15 10:14:55 +0530 | [diff] [blame] | 66 | |
| 67 | // The device is reconciling |
| 68 | RECONCILING = 6; |
Maninder | a4b9e55 | 2021-06-16 17:33:04 +0530 | [diff] [blame^] | 69 | |
| 70 | // The device is in reconciling failed |
| 71 | RECONCILING_FAILED = 7; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 72 | } |
| 73 | } |
| 74 | |
| 75 | message ConnectStatus { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 76 | // Connectivity Status |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 77 | enum Types { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 78 | |
| 79 | // The device connectivity status is unknown |
| 80 | UNKNOWN = 0; |
| 81 | |
| 82 | // The device cannot be reached by Voltha |
| 83 | UNREACHABLE = 1; |
| 84 | |
| 85 | // There is live communication between device and Voltha |
| 86 | REACHABLE = 2; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | message OperationResp { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 91 | enum OperationReturnCode { |
| 92 | OPERATION_SUCCESS = 0; |
| 93 | OPERATION_FAILURE = 1; |
| 94 | OPERATION_UNSUPPORTED = 2; |
Maninder | 2f9d63e | 2021-02-08 11:42:19 +0530 | [diff] [blame] | 95 | OPERATION_IN_PROGRESS = 3; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 96 | } |
| 97 | // Return code |
| 98 | OperationReturnCode code = 1; |
| 99 | |
| 100 | // Additional Info |
| 101 | string additional_info = 2; |
divyadesai | d11cf31 | 2020-02-26 12:23:31 +0000 | [diff] [blame] | 102 | } |
Dinesh Belwalkar | ed6da5e | 2020-02-25 11:23:57 -0800 | [diff] [blame] | 103 | message ValueType { |
| 104 | enum Type { |
| 105 | EMPTY = 0; |
| 106 | DISTANCE = 1; |
| 107 | } |
| 108 | } |
| 109 | message ValueSpecifier { |
| 110 | string id = 1; |
| 111 | ValueType.Type value = 2; |
| 112 | } |
| 113 | |
| 114 | message ReturnValues { |
| 115 | uint32 Set = 1; // Specifies what values are |
| 116 | // set/valid in return |
| 117 | |
| 118 | uint32 Unsupported = 2; // Specifies requested values not |
| 119 | // supported by the device |
| 120 | |
| 121 | uint32 Error = 3; // Specifies requested values not |
| 122 | // fetched because of error |
| 123 | |
| 124 | uint32 Distance = 4; // Value of distance Set includes |
| 125 | // DISTANCE |
| 126 | |
| 127 | } |