adding command-line and certificate functionalities
[aaa.git] / aaa-cert / src / main / yang / aaa-cert.yang
1 /*
2 Copyright (c) 2015 Inocybe Technology All rights reserved.
3
4 This program and the accompanying materials are made available under the
5 terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
7 */
8
9 module aaa-cert {
10     yang-version 1;
11     namespace "urn:opendaylight:yang:aaa:cert";
12     prefix aaa-cert;
13
14     import config {
15         prefix config;
16         revision-date 2013-04-05;
17     }
18
19     import opendaylight-md-sal-binding {
20         prefix md-sal-binding;
21         revision-date 2013-10-28;
22     }
23
24     import openflow-switch-connection-provider {
25         prefix openflow-switch-connection-provider;
26         revision-date 2014-03-28;
27     }
28
29     description
30         "Service definition for aaa certificate";
31
32     contact
33         "melserngawy@inocybe.com";
34
35     revision "2015-11-26" {
36         description
37             "Initial revision.";
38     }
39
40     identity aaa-cert {
41         base config:module-type;
42         config:java-name-prefix AaaCertProvider;
43     }
44
45     augment "/config:modules/config:module/config:configuration" {
46         case aaa-cert {
47             when "/config:modules/config:module/config:type = 'aaa-cert'";
48             container broker {
49                 uses config:service-ref {
50                     refine type {
51                         mandatory true;
52                         config:required-identity md-sal-binding:binding-broker-osgi-registry;
53                     }
54                 }
55             }
56             list openflow-switch-connection {
57                 uses config:service-ref {
58                     refine type {
59                         mandatory true;
60                         config:required-identity openflow-switch-connection-provider:openflow-switch-connection-provider;
61                     }
62                 }
63             }
64             leaf useConfig {
65                 description "Use the configuration data to create the keystores";
66                 type boolean;
67                 default false;
68             }
69             container ctlKeystore {
70                 leaf name {
71                     description "keystore name default is ctl";
72                     type string;
73                 }
74                 leaf alias {
75                     description "key alias";
76                     type string;
77                 }
78                 leaf storePassword {
79                     description "keystore password";
80                     type string;
81                 }
82                 leaf dname {
83                     description "X.500 Distinguished Names should be in the following formate
84                         CN=commonName
85                         OU=organizationUnit
86                         O=organizationName
87                         L=localityName
88                         S=stateName
89                         C=country";
90                     type string;
91                 }
92                 leaf validity {
93                     description "validity";
94                     type int32;
95                 }
96             }
97             container trustKeystore {
98                 leaf name {
99                     description "keystore name default is truststore";
100                     type string;
101                 }
102                 leaf alias {
103                     description "key alias";
104                     type string;
105                 }
106                 leaf storePassword {
107                     description "keystore password";
108                     type string;
109                 }
110                 leaf certFile {
111                     description "path to CA certificate pem file";
112                     type string;
113                 }
114             }
115         }
116     }
117 }