-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathkinetic-object-stream.yang
More file actions
164 lines (157 loc) · 2.81 KB
/
kinetic-object-stream.yang
File metadata and controls
164 lines (157 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
module kinetic-object-stream {
namespace "urn:ietf:params:xml:ns:yang:kinetic-object-stream";
prefix kos;
organization
"Corenova Technologies, Inc.";
contact
"Peter K. Lee <peter@corenova.com>";
description
"The core module of KOS which provides custom language extensions for
modeling reactions and generators.";
revision 2018-03-10 {
description
"Initial revision.";
}
/*
* Custom YANG Language Extensions
*/
extension reactor {
argument "reactor-name";
}
extension reaction {
argument "function-name";
}
extension data {
argument "target-topic-identifier";
}
extension node {
argument "target-node-identifier";
}
extension extends {
argument "target-stream-identifier";
}
extension filter {
argument "filter-rule";
}
extension array {
argument "array-name";
}
extension private {
argument 'value';
description
"denote any arbitrary data node as being private (non-enumerable)";
}
/*
* Dependencies
*/
import ietf-yang-types {
prefix yang;
}
/*
* Features
*/
feature url {
reference "nodejs://url";
}
feature net {
reference "nodejs://net";
}
feature channel {
reference "kos://channel";
}
/*
* Identities
*/
identity protocol {
description "base identity for protocols";
}
identity kos {
base protocol;
}
identity nodejs {
base protocol;
}
/*
* Type Definitions
*/
typedef identifier {
type yang:yang-identifier;
}
typedef unique-identifier {
type yang:uuid;
}
typedef topic {
type string; // TODO: something better...
}
typedef reaction-identifier {
description
"A reference to a reaction node in the data model.";
type instance-identifier {
require-instance true;
}
}
/*
* Kinetic topics
*/
grouping process {
}
grouping program {
}
grouping schema {
}
grouping runtime {
anydata store;
}
grouping error {
leaf message {
type string;
}
anydata origin;
}
grouping node-list {
list node {
}
}
grouping link-list {
list link {
}
}
grouping flow {
leaf name {
type kos:identifier;
}
leaf-list steps {
type kos:reaction-identifier {
require-instance true;
}
}
}
grouping flow-list {
list flow {
key id;
leaf id {
type kos:unique-identifier;
mandatory true;
}
uses kos:flow;
}
}
/*
* Operational state data nodes
*/
container topology {
description
"Contains KOS network topology information.";
uses node-list;
uses link-list;
uses flow-list;
}
notification error {
leaf message;
anydata origin;
}
notification log {
leaf level;
leaf message;
}
}