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