ServiceHandler Update
[transportpce.git] / api / src / main / yang / service_path / transportpce-pce.yang
1 module transportpce-pce {
2   namespace "http://org/transportpce/B-interface/pce";
3   prefix transportpce-pce;
4
5   import ietf-yang-types {
6     prefix yang;
7   }
8   import transportpce-routing-constraints {
9     prefix transportpce-routing-constraints;
10     revision-date 2017-10-17;
11   }
12   import org-openroadm-common-service-types {
13     prefix org-openroadm-common-service-types;
14   }
15   import transportpce-common-service-path-types {
16     prefix transportpce-common-service-path-types;
17     revision-date 2017-10-16;
18   }
19   import transportpce-pathDescription {
20     prefix transportpce-pathDescription;
21     revision-date 2017-10-17;
22   }
23   import transportpce-pathDescription {
24     prefix transportpce-pathDescription;
25   }
26
27   organization
28     "transportPCE";
29   contact
30     "transportPCE committers - ODL";
31   description
32     "YANG definitions of B interface (transportPCE). Adapted from service definition (openroadm)
33      Copyright © 2017 Orange, Inc. and others.  All rights reserved.
34
35      openroadm copyright:
36       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
37       AT&T Intellectual Property.  All other rights reserved.
38
39       Redistribution and use in source and binary forms, with or without modification,
40       are permitted provided that the following conditions are met:
41
42       * Redistributions of source code must retain the above copyright notice, this
43         list of conditions and the following disclaimer.
44       * Redistributions in binary form must reproduce the above copyright notice,
45         this list of conditions and the following disclaimer in the documentation and/or
46         other materials provided with the distribution.
47       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
48         contributors may be used to endorse or promote products derived from this software
49         without specific prior written permission.
50
51       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
52       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
53       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
54       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
55       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
56       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
57       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
58       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
59       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
60       POSSIBILITY OF SUCH DAMAGE";
61
62   revision 2017-10-17 {
63     description
64       "Version 1.6";
65   }
66
67   rpc path-computation-request {
68     input {
69       leaf service-name {
70         type string;
71         description
72           "Identifier for the service to be created in
73            the ROADM network, e.g., CLFI, CLCI, etc. This is reported against the service, but may not get reflected in the service in the network.";
74         mandatory true;
75       }
76       leaf resource-reserve {
77            type boolean;
78            description
79                 "indicates if resources (from local PCE topology) must be reserved until further notice (cancel-resource-reserve or topology update)";
80            mandatory true;
81       }
82       uses transportpce-common-service-path-types:service-handler-header;
83       container service-a-end {
84         uses transportpce-common-service-path-types:service-endpoint-sp;
85       }
86       container service-z-end {
87         uses transportpce-common-service-path-types:service-endpoint-sp;
88       }
89       uses transportpce-routing-constraints:routing-constraints-sp;
90     }
91     output {
92       uses org-openroadm-common-service-types:configuration-response-common;
93       uses transportpce-common-service-path-types:response-parameters-sp;
94     }
95   }
96
97   rpc cancel-resource-reserve {
98     input {
99       leaf service-name {
100         type string;
101         mandatory true;
102       }
103       uses transportpce-common-service-path-types:service-handler-header;
104     }
105     output {
106       uses org-openroadm-common-service-types:configuration-response-common;
107     }
108   }
109
110 notification service-path-rpc-result {
111     description
112       "This Notification indicates result of  service RPC";
113     leaf notification-type {
114       type transportpce-common-service-path-types:service-path-notification-types;
115     }
116     container path-description {
117            uses transportpce-pathDescription:path-description;
118     }
119     uses transportpce-common-service-path-types:rpc-response-status-ex;
120     uses org-openroadm-common-service-types:service-notification-result;
121   }
122
123   grouping stubpce-path-description {
124       leaf path-name {
125           type string;
126           description
127             "Identifier for the pathDescription to be created in
128              the ROADM network, e.g., CLFI, CLCI, etc.";
129           mandatory true;
130         }
131       uses transportpce-pathDescription:path-description;
132   }
133
134   container path-description-list {
135     description
136       "List of pathDescription. Can only be created, deleted, modified, etc. using special RPCs.";
137     list pathDescriptions {
138       key "path-name";
139       uses stubpce-path-description;
140     }
141   }
142 }