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