Bump models to match draft-clemm-netmod-yang-network-topo-01
[bgpcep.git] / programming / tunnel-api / src / main / yang / topology-tunnel-programming.yang
1 module topology-tunnel-programming {
2         yang-version 1;
3         namespace "urn:opendaylight:params:xml:ns:yang:topology:tunnel:programming";
4         prefix "ttp";
5
6         import network-topology { prefix nt; revision-date 2013-10-21; }
7         import topology-tunnel { prefix tt; revision-date 2013-08-19; }
8         import programming { prefix pgm; revision-date 2013-09-30; }
9
10         organization "Cisco Systems, Inc.";
11         contact "Robert Varga <rovarga@cisco.com>";
12
13         description
14                 "This module contains the programming extensions for tunnel
15                 topologies.
16
17                 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
18
19                 This program and the accompanying materials are made available
20                 under the terms of the Eclipse Public License v1.0 which
21                 accompanies this distribution, and is available at
22                 http://www.eclipse.org/legal/epl-v10.html";
23
24         revision "2013-09-30" {
25                 description
26                         "Initial revision.";
27                 reference "";
28         }
29
30         identity attach-path-instruction {
31                 base pgm:instruction-type;
32         }
33
34         identity create-path-instruction {
35                 base pgm:instruction-type;
36         }
37
38         identity destroy-path-instruction {
39                 base pgm:instruction-type;
40         }
41
42         identity detach-path-instruction {
43                 base pgm:instruction-type;
44         }
45
46         augment "/pgm:submit-instruction/pgm:input/pgm:arguments" {
47                 when "../type = attach-path-instruction";
48
49                 case attach-path {
50                         container attach-path {
51                                 leaf link-id {
52                                         type nt:link-id;
53                                         mandatory true;
54                                 }
55                                 leaf path-id {
56                                         type tt:path-id;
57                                         mandatory true;
58                                 }
59                         }
60                 }
61         }
62
63         augment "/pgm:submit-instruction/pgm:input/pgm:arguments" {
64                 when "../type = create-path-instruction";
65
66                 case create-path {
67                         container create-path {
68                                 leaf path-id {
69                                         type tt:path-id;
70                                         mandatory true;
71                                 }
72                         }
73                 }
74         }
75
76         augment "/pgm:submit-instruction/pgm:input/pgm:arguments" {
77                 when "../type = destroy-path-instruction";
78
79                 case destroy-path {
80                         container destroy-path {
81                                 leaf path-id {
82                                         type tt:path-id;
83                                         mandatory true;
84                                 }
85                         }
86                 }
87         }
88
89         augment "/pgm:submit-instruction/pgm:input/pgm:arguments" {
90                 when "../type = detach-path-instruction";
91
92                 case detach-path {
93                         container detach-path {
94                                 leaf link-id {
95                                         type nt:link-id;
96                                         mandatory true;
97                                 }
98                                 leaf path-id {
99                                         type tt:path-id;
100                                         mandatory true;
101                                 }
102                         }
103                 }
104         }
105
106         identity create-tunnel-instruction {
107                 base pgm:instruction-type;
108         }
109
110         identity destroy-tunnel-instruction {
111                 base pgm:instruction-type;
112         }
113
114         augment "/pgm:submit-instruction/pgm:input/pgm:arguments" {
115                 when "../type = create-tunnel-instruction";
116
117                 case create-tunnel {
118                         container create-tunnel {
119                                 leaf link-id {
120                                         type nt:link-id;
121                                         mandatory true;
122                                 }
123                         }
124                 }
125         }
126
127         augment "/pgm:submit-instruction/pgm:input/pgm:arguments" {
128                 when "../type = destroy-tunnel-instruction";
129
130                 case destroy-tunnel {
131                         container destroy-tunnel {
132                                 leaf link-id {
133                                         type nt:link-id;
134                                         mandatory true;
135                                 }
136                         }
137                 }
138         }
139 }
140