819ee40968807e66470635900c7525b48598cea9
[osm/SO.git] / rwlaunchpad / mock / plugins / yang / lpmocklet.yang
1
2 /*
3  * 
4  *   Copyright 2016 RIFT.IO Inc
5  *
6  *   Licensed under the Apache License, Version 2.0 (the "License");
7  *   you may not use this file except in compliance with the License.
8  *   You may obtain a copy of the License at
9  *
10  *       http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *   Unless required by applicable law or agreed to in writing, software
13  *   distributed under the License is distributed on an "AS IS" BASIS,
14  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *   See the License for the specific language governing permissions and
16  *   limitations under the License.
17  *
18  *
19  */
20
21 module lpmocklet
22 {
23     namespace "http://riftio.com/ns/riftware-1.0/lpmocklet";
24     prefix "lpmocklet";
25
26     import rw-pb-ext {
27         prefix "rwpb";
28     }
29
30     import ietf-inet-types {
31         prefix "inet";
32     }
33
34     import ietf-yang-types {
35         prefix "yang";
36     }
37
38     import mano-types {
39         prefix "manotypes";
40     }
41
42     // Used for LP Mocklet RPC action-param and control-param responses
43     container lpmocklet-action-status {
44         config false;
45         leaf id {
46             type yang:uuid;
47         }
48         // TODO: Make this consistent with 'set-control-param' 'obj-code'
49         leaf object_type {
50             type string;
51         }
52         leaf action {
53             type string;
54         }
55         leaf status {
56             type string;
57         }
58     }
59
60     rpc set-control-param {
61         input {
62             leaf id {
63                 description "object id";
64                 type yang:uuid;
65                 mandatory true;
66             }
67             leaf obj-code {
68                 description "Type of object: NS, VNF";
69                 type string;
70                 mandatory true;
71             }
72             leaf control-id {
73                 type string;
74                 mandatory true;
75             }
76             // The new vale to assign
77             leaf value {
78                 type uint64;
79                 mandatory true;
80             }
81         }
82     }
83
84     rpc start-vnfr {
85         input {
86             rwpb:msg-new "StartVnfrInput";
87             leaf id {
88                 type yang:uuid;
89                 mandatory true;
90             }
91         }
92         output {
93             rwpb:msg-new "StartVnfrOutput";
94             leaf status {
95                 description "status of the start request";
96                 type string;
97             }
98         }
99     }
100
101     rpc stop-vnfr {
102         input {
103             rwpb:msg-new "StopVnfr";
104             leaf id {
105                 type yang:uuid;
106                 mandatory true;
107             }
108         }
109     }
110 }
111