gbp-ise-adapter proposal
[groupbasedpolicy.git] / groupbasedpolicy-ise-adapter / src / main / yang / gbp-ise-adapter-model.yang
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  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
7  */
8
9 module gbp-ise-adapter-model {
10     yang-version 1;
11     namespace "urn:opendaylight:params:xml:ns:yang:controller:config:groupbasedpolicy:gbp-ise-adapter:model";
12     prefix "gbp-ise-adapter-model";
13
14     import gbp-common { prefix gbp-common; revision-date 2014-04-21; }
15     import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
16     import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
17
18     description
19         "This module contains the YANG definitions for
20           gbp-ise-adapter implementation.";
21
22     revision "2016-06-30" {
23         description
24             "Initial revision.";
25     }
26
27     container gbp-ise-adapter {
28         description "root point for ise connection info and sgt harvest status";
29
30         container ise-harvest-config {
31             description "connection + credentials for ise-rest-api connection and target tennant";
32             config true;
33
34             leaf tenant {
35                type gbp-common:tenant-id;
36                mandatory true;
37                description
38                     "tenant for all extracted sgt";
39             }
40
41             container connection-config {
42                 description "rest connection configuration part";
43
44                 leaf ise-rest-url {
45                     description "base uri to ise-rest-api";
46                     mandatory true;
47                     type inet:uri;
48                 }
49
50                 leaf connection-timeout {
51                     description "connection timeout in milliseconds";
52                     type uint16;
53                     default 5000;
54                 }
55
56                 leaf read-timeout {
57                     description "read from rest timeout in milliseconds";
58                     type uint16;
59                     default 5000;
60                 }
61
62                 list header {
63                     description "request headers in form key+value";
64                     key name;
65
66                     leaf name {
67                         type string;
68                     }
69                     leaf value {
70                         type string;
71                     }
72                 }
73             }
74         }
75
76         container ise-harvest-status {
77             description "result of sgt harvest from ise-rest-api and generating endpoint policy templates";
78             config false;
79
80             leaf success {
81                 description "true if all operations succeeded";
82                 type boolean;
83             }
84
85             leaf reason {
86                 description "failure detail";
87                 type string;
88             }
89
90             leaf templates-written {
91                 description "amount of endpoint templates written";
92                 type uint16;
93             }
94
95             leaf timestamp {
96                 description "stamped upon sgts harvested and templates written";
97                 type yang:date-and-time;
98             }
99         }
100     }
101 }