Merge "Build on jenkins nodes with label docker"
[osm/SO.git] / common / plugins / yang / rw-config-agent.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 rw-config-agent
22 {
23   namespace "http://riftio.com/ns/riftware-1.0/rw-config-agent";
24   prefix "rw-config-agent";
25
26   import rw-pb-ext {
27     prefix "rwpb";
28   }
29
30   import ietf-inet-types {
31     prefix "inet";
32   }
33
34   import rwcal {
35     prefix "rwcal";
36   }
37
38   revision 2016-02-04 {
39     description
40       "Initial revision.";
41   }
42
43   typedef config-agent-account-type {
44     description "config agent account type";
45     type enumeration {
46       enum juju;
47       enum riftca;
48     }
49   }
50
51   container config-agent {
52     rwpb:msg-new ConfigAgent;
53
54     list account {
55       rwpb:msg-new ConfigAgentAccount;
56       key "name";
57
58       description "List of configuration agent accounts";
59
60       leaf name {
61         description "Name of this config agent account";
62         type string;
63       }
64
65       leaf account-type {
66         description
67             "Default account type is Rift Configuration Agent (RiftCA)";
68         type config-agent-account-type;
69         default "riftca";
70       }
71
72       choice config-agent-account-type {
73         case juju {
74           description
75             "Configure the VNF through Juju.";
76           container juju {
77             leaf ip-address {
78                 description "Juju host IP address.";
79                 type inet:ip-address;
80             }
81             leaf port {
82                 description 
83                     "Juju host port number. Default 17070.";
84                 type inet:port-number;
85                 default 17070;
86             }
87             leaf user {
88                 description 
89                     "User name to connect to Juju host. Default user-admin.";
90                 type string;
91                 default "user-admin" ;
92             }
93             leaf secret {
94                 description 
95                     "Admin secret or password for Juju host.";
96                 type string;
97             }
98           }
99         }
100       }
101       uses rwcal:connection-status;
102     }
103   }
104
105   rpc update-cfg-agent-status {
106     description "Begin config agent account connection status";
107     input {
108       leaf cfg-agent-account {
109         mandatory true;
110         description
111           "The config agent account name to update connection status for";
112         type string;
113       }
114     }
115   }
116 }