Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 1 | // Copyright (c) 2015, Google Inc. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | // This file contains annotation definitions that can be used to describe |
| 16 | // a configuration tree. |
| 17 | |
| 18 | syntax = "proto3"; |
| 19 | |
Matteo Scandolo | b3c08ae | 2020-10-14 13:15:43 -0700 | [diff] [blame] | 20 | option go_package = "github.com/opencord/voltha-protos/v4/go/common"; |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 21 | option java_package = "org.opencord.voltha.common"; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 22 | |
| 23 | package voltha; |
| 24 | |
| 25 | import "google/protobuf/descriptor.proto"; |
| 26 | |
| 27 | message ChildNode { |
| 28 | string key = 1; |
| 29 | } |
| 30 | |
| 31 | enum Access { |
| 32 | |
| 33 | // read-write, stored attribute |
| 34 | CONFIG = 0; |
| 35 | |
| 36 | // read-only field, stored with the model, covered by its hash |
| 37 | READ_ONLY = 1; |
| 38 | |
| 39 | // A read-only attribute that is not stored in the model, not covered |
| 40 | // by its hash, its value is filled real-time upon each request. |
| 41 | REAL_TIME = 2; |
| 42 | |
| 43 | } |
| 44 | |
| 45 | extend google.protobuf.FieldOptions { |
| 46 | |
| 47 | // If present, it indicates that this field is stored as external child node |
| 48 | // or children nodes in Voltha's internal configuration tree. |
| 49 | // If the field is a container field and if the option specifies a key |
| 50 | // the child objects will be addressible by that key. |
| 51 | ChildNode child_node = 7761772; |
| 52 | |
| 53 | // This annotation can be used to indicate that a field is read-only, |
| 54 | // from the perspective of NBI access. Backend plugins and system |
| 55 | // internals can update the field but the update requests through the |
| 56 | // NBI will ignore for instance a field that is marked as read-only (RO). |
| 57 | Access access = 7761773; |
| 58 | } |