BUG-48: Tunnel integration, part 1
[bgpcep.git] / topology / tunnel-api / src / main / yang / topology-tunnel-p2p.yang
1 module topology-tunnel-p2p {
2         yang-version 1;
3         namespace "urn:opendaylight:params:xml:ns:yang:topology:tunnel:p2p";
4         prefix "p2p";
5
6         import network-topology { prefix nt; revision-date 2013-10-21; }
7         import topology-tunnel { prefix tt; revision-date 2013-08-19; }
8
9         organization "Cisco Systems, Inc.";
10         contact "Robert Varga <rovarga@cisco.com>";
11
12         description
13                 "This module contains the point-to-point extensions to the
14                 base tunnel topology model.
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-08-19" {
24                 description
25                         "Initial revision.";
26                 reference "";
27         }
28
29         grouping tunnel-p2p-type {
30                 container p2p-tunnel {
31                         presence "indicates a link is a point-to-point tunnel";
32                 }
33         }
34
35         augment "/nt:network-topology/nt:topology/nt:link/tt:tunnel-types" {
36                 uses tunnel-p2p-type;
37         }
38
39         grouping tunnel-p2p-path-hops {
40                 leaf order {
41                         type uint32;
42                         mandatory true;
43                 }
44         }
45
46         grouping tunnel-p2p-path-cfg-attributes {
47                 list explicit-hops {
48                         uses tunnel-p2p-path-hops;
49                         key order;
50
51                         leaf loose {
52                                 type boolean;
53                                 mandatory true;
54                         }
55                 }
56         }
57
58         grouping tunnel-p2p-path-oper-attributes {
59                 list reported-hops {
60                         config false;
61                         uses tunnel-p2p-path-hops;
62                         key order;
63                 }
64         }
65
66         augment "/nt:network-topology/nt:topology/tt:paths" {
67                 when "../path-types/p2p-tunnel";
68                 uses tunnel-p2p-path-cfg-attributes;
69                 uses tunnel-p2p-path-oper-attributes;
70         }
71 }
72