27c52c5bb8403b24f878a922a746ca1566b1a356
[transportpce.git] / api / src / main / yang / org-transportpce-common-types@2017-09-07.yang
1 module org-transportpce-common-types {
2     namespace "http://org/transportpce/common-types";
3     prefix org-transportpce-common-types;
4
5     import org-openroadm-resource-types {
6         prefix org-openroadm-resource-types;
7         revision-date 2016-10-14;
8     }
9     import org-openroadm-pm-types {
10         prefix org-openroadm-pm-types;
11         revision-date 2016-10-14;
12     }
13
14     revision "2017-09-07" {
15         description "Initial revision of TransportPCE common-types";
16     }
17
18     grouping olm-renderer-input {
19         leaf service-name {
20             type string;
21         }
22         leaf wave-number {
23             type uint32;
24         }
25         list nodes {
26             ordered-by user;
27             key "node-id";
28             leaf node-id {
29                 type string;
30                 description "Gloabally unique identifier
31                     for the node";
32             }
33             leaf src-tp {
34                 type string;
35                 description "Source termination point ";
36                 mandatory true;
37             }
38             leaf dest-tp {
39                 type string;
40                 description "Destination termination point ";
41                 mandatory true;
42             }
43         }
44         description
45             "Type to be used by OLM and Renderer RPCs";
46     }
47
48     grouping olm-get-pm-input {
49         leaf node-id {
50             type string;
51             description "Gloabally unique identifier
52                 for the node";
53             mandatory true;
54         }
55         leaf resource-type {
56             type org-openroadm-resource-types:resource-type-enum;
57             description "Type of the PM resource";
58             mandatory true;
59         }
60         container resource-identifier {
61             leaf resource-name {
62                 type string;
63                 description "Identifier of particular resource of given type";
64                 mandatory true;
65             }
66             leaf circuit-pack-name {
67                 when "../../resource-type = 'port'";
68                 type string;
69                 description "In case resource type is port, then particular resource is identified by port-name
70                     (resource-name) and circuit-pack-name (this leaf).";
71                 mandatory true;
72
73             }
74         }
75         leaf granularity {
76             type org-openroadm-pm-types:pm-granularity;
77             description "Granularity of PM bin can be
78                 notApplicable,15min,24Hour";
79             mandatory true;
80         }
81     }
82
83     grouping node-interfaces {
84         list node-interface {
85             key node-id;
86             leaf node-id {
87                 type string;
88             }
89             leaf-list och-interface-id {
90                 type string;
91             }
92             leaf-list otu-interface-id {
93                 type string;
94             }
95             leaf-list odu-interface-id {
96                 type string;
97             }
98             leaf-list eth-interface-id {
99                 type string;
100             }
101             leaf-list connection-id {
102                 type string;
103             }
104         }
105    }
106
107 }