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