45a68bdb56b34067726fcfd5fac15421e6dc21f1
[transportpce.git] / ordmodels / network / src / main / yang / transportpce-topology@2020-10-19.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 2020-05-29;
17       }
18
19     organization
20         "TransportPCE team";
21     contact
22         "TransportPCE team";
23
24     revision 2020-10-19 {
25         description "Update to 7.1.0 Openroadm network and common models";
26     }
27     revision 2020-01-29 {
28         description "Add transportpce augmentation to manage otn-link-type in otn-topology";
29     }
30     revision 2020-01-23 {
31         description "Add transportpce augmentation for otn-topology";
32     }
33     revision 2019-06-25 {
34         description "Initial revision";
35     }
36
37     typedef otn-link-type {
38       type enumeration {
39         enum "OTU4" {
40           value 0;
41         }
42         enum "ODU4" {
43           value 1;
44         }
45         enum "ODTU4" {
46           value 2;
47         }
48         enum "ODU2e" {
49           value 3;
50         }
51         enum "ODU0" {
52           value 4;
53         }
54       }
55     }
56
57     augment "/nd:networks/nd:network/nd:node/nwt:termination-point" {
58         when "../../nd:network-types/cnet:openroadm-common-network/openroadm-topology or ../../nd:network-types/cnet:openroadm-common-network/otn-topology";
59         description
60           "Defines associated logical-connection-point for XPDR port.";
61         leaf associated-connection-map-port {
62           when
63             "../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-NETWORK'";
64           type string;
65           description
66             "The xpdr port connectable regarding the device connection-map";
67         }
68     }
69
70     augment "/nd:networks/nd:network/nwt:link" {
71         when "../nd:network-types/cnet:openroadm-common-network/otn-topology";
72         description
73           "Defines more accurate otn link types to differentiate otn links in otn-topology";
74         leaf otn-link-type {
75           when
76             "../cnet:link-type = 'OTN-LINK'";
77           type otn-link-type;
78           description
79               "type of otn link, to help link management inside transportpce";
80           }
81     }
82 }