update from RIFT as of 696b75d2fe9fb046261b08c616f1bcf6c0b54a9b second try
[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 ietf-inet-types {
27         prefix "inet";
28     }
29
30     import ietf-yang-types {
31         prefix "yang";
32     }
33
34     import mano-types {
35         prefix "manotypes";
36     }
37
38     // Used for LP Mocklet RPC action-param and control-param responses
39     container lpmocklet-action-status {
40         config false;
41         leaf id {
42             type yang:uuid;
43         }
44         // TODO: Make this consistent with 'set-control-param' 'obj-code'
45         leaf object_type {
46             type string;
47         }
48         leaf action {
49             type string;
50         }
51         leaf status {
52             type string;
53         }
54     }
55
56     rpc set-control-param {
57         input {
58             leaf id {
59                 description "object id";
60                 type yang:uuid;
61                 mandatory true;
62             }
63             leaf obj-code {
64                 description "Type of object: NS, VNF";
65                 type string;
66                 mandatory true;
67             }
68             leaf control-id {
69                 type string;
70                 mandatory true;
71             }
72             // The new vale to assign
73             leaf value {
74                 type uint64;
75                 mandatory true;
76             }
77         }
78     }
79
80     rpc start-vnfr {
81         input {
82             leaf id {
83                 type yang:uuid;
84                 mandatory true;
85             }
86         }
87         output {
88             leaf status {
89                 description "status of the start request";
90                 type string;
91             }
92         }
93     }
94
95     rpc stop-vnfr {
96         input {
97             leaf id {
98                 type yang:uuid;
99                 mandatory true;
100             }
101         }
102     }
103 }
104