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 |
khenaidoo | 4d4802d | 2018-10-04 21:59:49 -0400 | [diff] [blame] | 45 | ENABLED = 2; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 46 | |
| 47 | // The device is disabled and shall not perform its intended forwarding |
| 48 | // functions other than being available for re-activation. |
khenaidoo | 4d4802d | 2018-10-04 21:59:49 -0400 | [diff] [blame] | 49 | DISABLED = 3; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 50 | |
khenaidoo | 4d4802d | 2018-10-04 21:59:49 -0400 | [diff] [blame] | 51 | // The device is in the state of image download |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 52 | DOWNLOADING_IMAGE = 4; |
| 53 | |
khenaidoo | 4d4802d | 2018-10-04 21:59:49 -0400 | [diff] [blame] | 54 | // The device is marked to be deleted |
| 55 | DELETED = 5; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 56 | } |
| 57 | } |
| 58 | |
| 59 | message OperStatus { |
| 60 | option (yang_child_rule) = MOVE_TO_PARENT_LEVEL; |
| 61 | |
| 62 | // Operational Status |
| 63 | enum OperStatus { |
| 64 | |
| 65 | // The status of the device is unknown at this point |
| 66 | UNKNOWN = 0; |
| 67 | |
| 68 | // The device has been discovered, but not yet activated |
| 69 | DISCOVERED = 1; |
| 70 | |
| 71 | // The device is being activated (booted, rebooted, upgraded, etc.) |
| 72 | ACTIVATING = 2; |
| 73 | |
| 74 | // Service impacting tests are being conducted |
| 75 | TESTING = 3; |
| 76 | |
| 77 | // The device is up and active |
| 78 | ACTIVE = 4; |
| 79 | |
| 80 | // The device has failed and cannot fulfill its intended role |
| 81 | FAILED = 5; |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | message ConnectStatus { |
| 86 | option (yang_child_rule) = MOVE_TO_PARENT_LEVEL; |
| 87 | |
| 88 | // Connectivity Status |
| 89 | enum ConnectStatus { |
| 90 | |
| 91 | // The device connectivity status is unknown |
| 92 | UNKNOWN = 0; |
| 93 | |
| 94 | // The device cannot be reached by Voltha |
| 95 | UNREACHABLE = 1; |
| 96 | |
| 97 | // There is live communication between device and Voltha |
| 98 | REACHABLE = 2; |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | message OperationResp { |
| 103 | option (yang_child_rule) = MOVE_TO_PARENT_LEVEL; |
| 104 | |
| 105 | enum OperationReturnCode { |
| 106 | OPERATION_SUCCESS = 0; |
| 107 | OPERATION_FAILURE = 1; |
| 108 | OPERATION_UNSUPPORTED = 2; |
| 109 | } |
| 110 | // Return code |
| 111 | OperationReturnCode code = 1; |
| 112 | |
| 113 | // Additional Info |
| 114 | string additional_info = 2; |
| 115 | } |
| 116 | |
| 117 | |