-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathyang-compiler.yang
81 lines (64 loc) · 1.86 KB
/
yang-compiler.yang
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
module yang-compiler {
prefix yc;
include yang-v1-extensions;
organization
"ClearPath Networks NFV R&D Group";
contact
"Web: <http://www.clearpathnet.com>
Code: <http://github.com/stormstack/yang-compiler>
Author: Peter K. Lee <mailto:plee@clearpathnet.com>";
description
"This module provides YANG v1 language based schema compilations.";
revision 2015-05-04 {
description "Initial revision";
reference "RFC-6020";
}
grouping compiler-rules {
description
"The compiler-rules specify parameters used during compile operation.";
list map {
description
"The map defines a list of modules and their source description. It is
referenced by the compiler to locate the module for retrieval
during include/import operation.";
key name;
leaf name { type string; }
leaf source { type string; }
}
list extensions {
leaf name { type string; mandatory true; }
leaf resolver { type binary; mandatory true; }
}
list importers {
leaf regexp { type regexp; }
leaf importer { type binary; }
ordered-by user;
}
list procedures {
leaf name { type string; mandatory true; }
leaf exec { type binary; mandatory true; }
}
}
grouping meta-module {
description
"The meta-module describes configuration structure for import/export operations.";
leaf name { type string; mandatory true; }
leaf source { type uri; }
leaf schema { type string; }
uses compiler-rules;
}
uses compiler-rules;
rpc import {
input { uses meta-module; }
output {
leaf message { type string; }
}
}
rpc export {
input {
leaf name { type string; mandatory true; }
leaf format { type string; default json; }
}
output { uses meta-module; }
}
}