c6a17146a53d49eff9fcc79e814201f6ff856fab
[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 network-topology-programming { prefix tp; revision-date 2013-11-02; }
8
9     organization "Cisco Systems, Inc.";
10     contact "Robert Varga <rovarga@cisco.com>";
11
12     description
13         "This module contains the programming extensions for tunnel
14         topologies.
15
16         Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
17
18         This program and the accompanying materials are made available
19         under the terms of the Eclipse Public License v1.0 which
20         accompanies this distribution, and is available at
21         http://www.eclipse.org/legal/epl-v10.html";
22
23     revision "2013-09-30" {
24         description
25             "Initial revision.";
26         reference "";
27     }
28
29     grouping base-tunnel-input {
30         uses tp:topology-instruction-input;
31
32         leaf link-id {
33             type nt:link-id;
34             mandatory true;
35         }
36     }
37
38     grouping base-tunnel-output {
39         uses tp:topology-instruction-output;
40     }
41
42     grouping create-tunnel-input {
43         uses tp:topology-instruction-input;
44     }
45
46     grouping create-tunnel-output {
47         uses base-tunnel-output;
48
49         leaf link-id {
50             type nt:link-id;
51             mandatory true;
52         }
53     }
54
55     grouping destroy-tunnel-input {
56         uses base-tunnel-input;
57     }
58
59     grouping destroy-tunnel-output {
60         uses base-tunnel-output;
61     }
62
63     grouping tp-reference {
64         leaf node {
65             type nt:node-ref;
66             mandatory true;
67         }
68         leaf tp {
69             type nt:tp-ref;
70             mandatory true;
71         }
72     }
73
74     grouping create-p2p-tunnel-input {
75         uses create-tunnel-input;
76
77         container destination {
78             uses tp-reference;
79         }
80         container source {
81             uses tp-reference;
82         }
83     }
84
85     grouping create-p2p-tunnel-output {
86         uses create-tunnel-output;
87     }
88 }
89