BUG 2353 : Handle binary, bits and instanceidentifier types in NodeIdentifiers
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / resources / Common.proto
1 package org.opendaylight.controller.mdsal;
2
3 option java_package = "org.opendaylight.controller.protobuff.messages.common";
4 option java_outer_classname = "NormalizedNodeMessages";
5
6
7 message Attribute{
8   required string name =1;
9   optional string value=2;
10   optional string type=3;
11 }
12
13 message PathArgumentAttribute{
14     optional QName name =1;
15     optional string value=2;
16     optional int32 type=3;
17     // Specific values
18     optional InstanceIdentifier instanceIdentifierValue = 4; // intValueType = YangInstanceIdentifier
19     repeated string bitsValue = 5; // intValueType = Bits
20     optional bytes bytesValue = 6;
21
22 }
23
24
25 message QName {
26     optional string value=1; // @deprecated
27     optional int32 namespace=2;
28     optional int32 revision=3;
29     optional int32 localName=4;
30 }
31
32 message PathArgument {
33   optional string value=1; // @deprecated
34   optional string type=2; // @deprecated
35
36   optional QName nodeType=3;
37
38   repeated PathArgumentAttribute attribute=4;
39   repeated Attribute attributes=5; // @deprecated For backward compatibility (see InstanceIdentifierUtils)
40   optional int32 intType = 6;
41 }
42
43 message InstanceIdentifier {
44   repeated PathArgument arguments=1;
45   
46   // A list of string codes which can be used for any repeated strings in the path args. This is
47   // optional - an InstanceIdentifier may be encoded as part of another message, eg NormalizedNode,
48   // that contains the codes. 
49   repeated string code = 2;
50 }
51
52 message Node{
53   optional string path = 1; // @deprecated(use pathArgument)
54   optional string type = 2; // @deprecated(use intType)
55   optional PathArgument pathArgument = 3;
56   optional int32 intType = 4;
57
58   repeated Attribute attributes = 5;
59
60   repeated Node child = 6;
61
62   optional string value = 7;
63   optional string valueType = 8; // @deprecated(use intValueType)
64   optional int32 intValueType = 9; // instead of valueType
65
66   // Specific values
67   optional InstanceIdentifier instanceIdentifierValue = 10; // intValueType = YangInstanceIdentifier
68   repeated string bitsValue = 11; // intValueType = Bits
69
70   repeated string code = 12; // A list of string codes which can be used for any repeated strings in the NormalizedNode
71
72   optional bytes bytesValue = 13;
73 }
74
75 message Container{
76   required string parentPath =1 ;
77   optional Node normalizedNode=2;
78 }
79
80 message NodeMapEntry{
81   required InstanceIdentifier instanceIdentifierPath =1;
82   optional Node normalizedNode=2;
83 }
84
85 message NodeMap{
86 repeated NodeMapEntry mapEntries=1;
87 }