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