Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 3 | option go_package = "github.com/opencord/voltha-protos/v3/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 | |
| 23 | message LogLevel { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 24 | // Logging verbosity level |
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 | DEBUG = 0; |
| 27 | INFO = 1; |
| 28 | WARNING = 2; |
| 29 | ERROR = 3; |
| 30 | CRITICAL = 4; |
| 31 | FATAL = 5; |
| 32 | } |
| 33 | } |
| 34 | |
Scott Baker | 99af94e | 2019-08-20 10:45:06 -0700 | [diff] [blame] | 35 | message Logging { |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 36 | common.LogLevel.Types level = 1; |
Scott Baker | 99af94e | 2019-08-20 10:45:06 -0700 | [diff] [blame] | 37 | string package_name = 2; |
| 38 | string component_name = 3; |
| 39 | } |
| 40 | |
| 41 | // For GetLogLevels(), select component to query |
| 42 | message LoggingComponent { |
| 43 | string component_name = 1; |
| 44 | } |
| 45 | |
| 46 | // For returning multiple log levels |
| 47 | message Loggings { |
| 48 | repeated Logging items = 1; |
| 49 | } |
| 50 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 51 | message AdminState { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 52 | // Administrative State |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 53 | enum Types { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 54 | |
| 55 | // The administrative state of the device is unknown |
| 56 | UNKNOWN = 0; |
| 57 | |
| 58 | // The device is pre-provisioned into Voltha, but not contacted by it |
| 59 | PREPROVISIONED = 1; |
| 60 | |
| 61 | // The device is enabled for activation and operation |
| 62 | ENABLED = 2; |
| 63 | |
| 64 | // The device is disabled and shall not perform its intended forwarding |
| 65 | // functions other than being available for re-activation. |
| 66 | DISABLED = 3; |
| 67 | |
| 68 | // The device is in the state of image download |
| 69 | DOWNLOADING_IMAGE = 4; |
| 70 | |
| 71 | // The device is marked to be deleted |
| 72 | DELETED = 5; |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | message OperStatus { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 77 | // Operational Status |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 78 | enum Types { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 79 | |
| 80 | // The status of the device is unknown at this point |
| 81 | UNKNOWN = 0; |
| 82 | |
| 83 | // The device has been discovered, but not yet activated |
| 84 | DISCOVERED = 1; |
| 85 | |
| 86 | // The device is being activated (booted, rebooted, upgraded, etc.) |
| 87 | ACTIVATING = 2; |
| 88 | |
| 89 | // Service impacting tests are being conducted |
| 90 | TESTING = 3; |
| 91 | |
| 92 | // The device is up and active |
| 93 | ACTIVE = 4; |
| 94 | |
| 95 | // The device has failed and cannot fulfill its intended role |
| 96 | FAILED = 5; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | message ConnectStatus { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 101 | // Connectivity Status |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 102 | enum Types { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 103 | |
| 104 | // The device connectivity status is unknown |
| 105 | UNKNOWN = 0; |
| 106 | |
| 107 | // The device cannot be reached by Voltha |
| 108 | UNREACHABLE = 1; |
| 109 | |
| 110 | // There is live communication between device and Voltha |
| 111 | REACHABLE = 2; |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | message OperationResp { |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 116 | enum OperationReturnCode { |
| 117 | OPERATION_SUCCESS = 0; |
| 118 | OPERATION_FAILURE = 1; |
| 119 | OPERATION_UNSUPPORTED = 2; |
| 120 | } |
| 121 | // Return code |
| 122 | OperationReturnCode code = 1; |
| 123 | |
| 124 | // Additional Info |
| 125 | string additional_info = 2; |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 126 | } |