Merge from OSM SO master
[osm/SO.git] / common / plugins / yang / rw-sdn.yang
1
2 /*
3  * 
4  *   Copyright 2016-2017 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 rw-sdn
22 {
23   namespace "http://riftio.com/ns/riftware-1.0/rw-sdn";
24   prefix "rw-sdn";
25
26
27   import rw-pb-ext {
28     prefix "rwpb";
29   }
30
31   import rw-project {
32     prefix "rw-project";
33   }
34
35   import rwsdnal {
36     prefix "rwsdnal";
37   }
38
39   import mano-types {
40     prefix "manotypes";
41   }
42
43   revision 2017-02-08 {
44     description
45       "Update model to support projects.";
46   }
47
48   revision 2015-09-14 {
49     description
50       "Initial revision.";
51   }
52
53 augment "/rw-project:project" {
54   container sdn {
55       rwpb:msg-new SDNAccountConfig;
56       list account {
57         rwpb:msg-new SDNAccount;
58         key "name";
59         leaf name {
60           type string;
61         }
62
63         uses rwsdnal:sdn-provider-auth;
64         uses rwsdnal:connection-status;
65       }
66     }
67   }
68
69   rpc update-sdn-status {
70     description "Begin sdn accunt connection status";
71     input {
72       leaf sdn-account {
73         mandatory true;
74         description
75           "The sdn account name to update connection status for";
76         type string;
77       }
78
79       uses manotypes:rpc-project-name;
80     }
81   }
82 }