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