add pceOtnNodeTest class
[transportpce.git] / api / src / main / yang / tapi@2018-09-28.yang
1 module tapi {
2   yang-version 1;
3   namespace "urn:opendaylight:params:xml:ns:yang:tapi";
4   prefix tapi;
5
6   import tapi-topology {
7     prefix tapi-topology;
8     revision-date 2018-12-10;
9   }
10   import org-openroadm-service {
11     prefix oor-service;
12     revision-date 2019-05-31;
13   }
14   import tapi-common {
15     prefix tapi-common;
16     revision-date 2018-12-10;
17   }
18   import org-openroadm-common-service-types {
19     prefix org-openroadm-common-service-types;
20     revision-date 2019-05-31;
21   }
22
23   organization
24     "transportPCE";
25   contact
26     "transportPCE committers - ODL";
27   description
28     "YANG definitions for using REST API in TAPI module. Copyright
29      (c) 2018 ORANGE and others. All rights reserved. authors: Gilles
30      Thouenon ( gilles.thouenon@orange.com ) Christophe Betoule ( christophe.betoule@orange.com
31      )";
32
33   revision 2018-09-28 {
34     description
35       "Initial revision of TAPI model for internal use";
36   }
37
38   typedef end-point-type {
39     type enumeration {
40       enum Aend {
41         value 1;
42       }
43       enum Zend {
44         value 2;
45       }
46     }
47     description
48       "help to identify if the generic service end point is usable as a service termination for A or Z end-point";
49   }
50
51   rpc load-topology {
52     input {
53       leaf topology-name {
54         type string;
55         description
56           "none";
57       }
58       container topology {
59         description
60           "none";
61         uses tapi-topology:topology;
62       }
63     }
64     output {
65       leaf success {
66         type boolean;
67       }
68       leaf result {
69         type string;
70       }
71     }
72   }
73
74   container service-interface-points {
75     list service-end-point {
76       key "uuid";
77       description
78         "List of service-interface-point from tapi-topology available
79          for an org-openroadm-service usage";
80       leaf uuid {
81         type tapi-common:uuid;
82       }
83       container end-point {
84         leaf service-end-point-type {
85           type end-point-type;
86         }
87         uses org-openroadm-common-service-types:service-endpoint;
88       }
89     }
90   }
91 }