fix/rename transportpce-network-topology YANG file
[transportpce.git] / ordmodels / network / src / main / yang / transportpce-topology@2020-01-29.yang
1 module transportpce-topology {
2     yang-version 1.1;
3     namespace "http://transportpce/topology";
4     prefix "transportpce-topology";
5
6     import ietf-network {
7         prefix nd;
8         revision-date 2018-02-26;
9       }
10     import ietf-network-topology {
11         prefix nwt;
12         revision-date 2018-02-26;
13       }
14     import org-openroadm-common-network {
15         prefix cnet;
16         revision-date 2018-11-30;
17       }
18
19     organization
20         "TransportPCE team";
21     contact
22         "TransportPCE team";
23
24     revision 2020-01-29 {
25         description "Add transportpce augmentation to manage otn-link-type in otn-topology";
26     }
27     revision 2020-01-23 {
28         description "Add transportpce augmentation for otn-topology";
29     }
30     revision 2019-06-25 {
31         description "Initial revision";
32     }
33
34     typedef otn-link-type {
35       type enumeration {
36         enum "OTU4" {
37           value 0;
38         }
39         enum "ODU4" {
40           value 1;
41         }
42         enum "ODTU4" {
43           value 2;
44         }
45         enum "ODU2e" {
46           value 3;
47         }
48         enum "ODU0" {
49           value 4;
50         }
51       }
52     }
53
54     augment "/nd:networks/nd:network/nd:node/nwt:termination-point" {
55         when "../../nd:network-types/cnet:openroadm-common-network/openroadm-topology or ../../nd:network-types/cnet:openroadm-common-network/otn-topology";
56         description
57           "Defines associated logical-connection-point for XPDR port.";
58         leaf associated-connection-map-port {
59           when
60             "../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-NETWORK'";
61           type string;
62           description
63             "The xpdr port connectable regarding the device connection-map";
64         }
65     }
66
67     augment "/nd:networks/nd:network/nwt:link" {
68         when "../nd:network-types/cnet:openroadm-common-network/otn-topology";
69         description
70           "Defines more accurate otn link types to differentiate otn links in otn-topology";
71         leaf otn-link-type {
72           when
73             "../cnet:link-type = 'OTN-LINK'";
74           type otn-link-type;
75           description
76               "type of otn link, to help link management inside transportpce";
77           }
78     }
79 }