khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
| 3 | option go_package = "github.com/opencord/voltha-go/protos/common"; |
| 4 | |
| 5 | package voltha; |
| 6 | |
| 7 | import "yang_options.proto"; |
| 8 | |
| 9 | // Convey a resource identifier |
| 10 | message ID { |
| 11 | string id = 1; |
| 12 | } |
| 13 | |
khenaidoo | bf6e7bb | 2018-08-14 22:27:29 -0400 | [diff] [blame] | 14 | enum TestModeKeys { |
| 15 | api_test=0; |
| 16 | } |
| 17 | |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 18 | message LogLevel { |
| 19 | option (yang_child_rule) = MOVE_TO_PARENT_LEVEL; |
| 20 | |
| 21 | // Logging verbosity level |
| 22 | enum LogLevel { |
| 23 | DEBUG = 0; |
| 24 | INFO = 1; |
| 25 | WARNING = 2; |
| 26 | ERROR = 3; |
| 27 | CRITICAL = 4; |
khenaidoo | bf6e7bb | 2018-08-14 22:27:29 -0400 | [diff] [blame] | 28 | FATAL = 5; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 29 | } |
| 30 | } |
| 31 | |
| 32 | message AdminState { |
| 33 | option (yang_child_rule) = MOVE_TO_PARENT_LEVEL; |
| 34 | |
| 35 | // Administrative State |
| 36 | enum AdminState { |
| 37 | |
| 38 | // The administrative state of the device is unknown |
| 39 | UNKNOWN = 0; |
| 40 | |
| 41 | // The device is pre-provisioned into Voltha, but not contacted by it |
| 42 | PREPROVISIONED = 1; |
| 43 | |
| 44 | // The device is enabled for activation and operation |
| 45 | ENABLED = 3; |
| 46 | |
| 47 | // The device is disabled and shall not perform its intended forwarding |
| 48 | // functions other than being available for re-activation. |
| 49 | DISABLED = 2; |
| 50 | |
| 51 | // The deive is in the state of image download |
| 52 | DOWNLOADING_IMAGE = 4; |
| 53 | |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | message OperStatus { |
| 58 | option (yang_child_rule) = MOVE_TO_PARENT_LEVEL; |
| 59 | |
| 60 | // Operational Status |
| 61 | enum OperStatus { |
| 62 | |
| 63 | // The status of the device is unknown at this point |
| 64 | UNKNOWN = 0; |
| 65 | |
| 66 | // The device has been discovered, but not yet activated |
| 67 | DISCOVERED = 1; |
| 68 | |
| 69 | // The device is being activated (booted, rebooted, upgraded, etc.) |
| 70 | ACTIVATING = 2; |
| 71 | |
| 72 | // Service impacting tests are being conducted |
| 73 | TESTING = 3; |
| 74 | |
| 75 | // The device is up and active |
| 76 | ACTIVE = 4; |
| 77 | |
| 78 | // The device has failed and cannot fulfill its intended role |
| 79 | FAILED = 5; |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | message ConnectStatus { |
| 84 | option (yang_child_rule) = MOVE_TO_PARENT_LEVEL; |
| 85 | |
| 86 | // Connectivity Status |
| 87 | enum ConnectStatus { |
| 88 | |
| 89 | // The device connectivity status is unknown |
| 90 | UNKNOWN = 0; |
| 91 | |
| 92 | // The device cannot be reached by Voltha |
| 93 | UNREACHABLE = 1; |
| 94 | |
| 95 | // There is live communication between device and Voltha |
| 96 | REACHABLE = 2; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | message OperationResp { |
| 101 | option (yang_child_rule) = MOVE_TO_PARENT_LEVEL; |
| 102 | |
| 103 | enum OperationReturnCode { |
| 104 | OPERATION_SUCCESS = 0; |
| 105 | OPERATION_FAILURE = 1; |
| 106 | OPERATION_UNSUPPORTED = 2; |
| 107 | } |
| 108 | // Return code |
| 109 | OperationReturnCode code = 1; |
| 110 | |
| 111 | // Additional Info |
| 112 | string additional_info = 2; |
| 113 | } |
| 114 | |
| 115 | |