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 | |
| 20 | option go_package = "github.com/opencord/voltha-go/protos/common"; |
| 21 | |
| 22 | package voltha; |
| 23 | |
| 24 | import "google/protobuf/descriptor.proto"; |
| 25 | |
| 26 | message ChildNode { |
| 27 | string key = 1; |
| 28 | } |
| 29 | |
| 30 | enum Access { |
| 31 | |
| 32 | // read-write, stored attribute |
| 33 | CONFIG = 0; |
| 34 | |
| 35 | // read-only field, stored with the model, covered by its hash |
| 36 | READ_ONLY = 1; |
| 37 | |
| 38 | // A read-only attribute that is not stored in the model, not covered |
| 39 | // by its hash, its value is filled real-time upon each request. |
| 40 | REAL_TIME = 2; |
| 41 | |
| 42 | } |
| 43 | |
| 44 | extend google.protobuf.FieldOptions { |
| 45 | |
| 46 | // If present, it indicates that this field is stored as external child node |
| 47 | // or children nodes in Voltha's internal configuration tree. |
| 48 | // If the field is a container field and if the option specifies a key |
| 49 | // the child objects will be addressible by that key. |
| 50 | ChildNode child_node = 7761772; |
| 51 | |
| 52 | // This annotation can be used to indicate that a field is read-only, |
| 53 | // from the perspective of NBI access. Backend plugins and system |
| 54 | // internals can update the field but the update requests through the |
| 55 | // NBI will ignore for instance a field that is marked as read-only (RO). |
| 56 | Access access = 7761773; |
| 57 | } |