Add model of graceful-restart capability
[bgpcep.git] / pcep / tunnel-api / src / main / yang / topology-tunnel-pcep.yang
1 module topology-tunnel-pcep {
2         // vi: set et smarttab sw=4 tabstop=4:
3         yang-version 1;
4         namespace "urn:opendaylight:params:xml:ns:yang:topology:tunnel:pcep";
5         prefix "pceptun";
6
7         import ieee754 { prefix ieee754; revision-date 2013-08-19; }
8         import network-topology { prefix nt; revision-date 2013-10-21; }
9         import pcep-types { prefix pcep; revision-date 2013-10-05; }
10         import rsvp { prefix rsvp; revision-date 2013-08-20; }
11         import topology-tunnel { prefix tt; revision-date 2013-08-19; }
12         import topology-tunnel-p2p { prefix p2p; revision-date 2013-08-19; }
13
14         organization "Cisco Systems, Inc.";
15         contact "Robert Varga <rovarga@cisco.com>";
16
17         description
18                 "This module contains the PCEP extensions to base tunnel
19                 topology model.
20
21                 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.";
22
23         revision "2013-08-20" {
24                 description
25                         "Initial revision.";
26                 reference "";
27         }
28
29         typedef administrative-status {
30                 type enumeration {
31                         enum active;
32                         enum inactive;
33                 }
34                 reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3";
35         }
36
37         grouping tunnel-pcep-type {
38                 container pcep-tunnel {
39                         presence "indicates a link is a PCEP tunnel";
40                 }
41         }
42
43         augment "/nt:network-topology/nt:topology/nt:link/tt:tunnel-types" {
44                 uses tunnel-pcep-type;
45         }
46
47         grouping tunnel-pcep-link-attributes {
48                 leaf administrative-status {
49                         type administrative-status;
50                 }
51
52                 leaf operational-status {
53                         type pcep:operational-status;
54                         config false;
55                 }
56
57                 leaf class-type {
58                         type pcep:class-type;
59                 }
60
61                 leaf bandwidth {
62                         type ieee754:float32;
63                 }
64         }
65
66         grouping tunnel-pcep-path-attributes {
67                 leaf administrative-status {
68                         type administrative-status;
69                 }
70
71                 leaf operational-status {
72                         type pcep:operational-status;
73                         config false;
74                 }
75         }
76
77         augment "/nt:network-topology/nt:topology/nt:link" {
78                 when "../../tunnel-types/pcep-tunnel";
79                 uses tunnel-pcep-link-attributes;
80         }
81
82         augment "/nt:network-topology/nt:topology/tt:paths" {
83                 when "../../tunnel-types/pcep-tunnel";
84                 uses tunnel-pcep-path-attributes;
85         }
86
87         augment "/nt:network-topology/nt:topology/tt:paths/p2p:explicit-hops" {
88                 when "../../tunnel-types/pcep-tunnel";
89                 uses rsvp:explicit-route-subobjects;
90         }
91
92         augment "/nt:network-topology/nt:topology/tt:paths/p2p:reported-hops" {
93                 when "../../tunnel-types/pcep-tunnel";
94                 uses rsvp:record-route-subobjects;
95         }
96 }
97