BUG-6650: ep-ip/sgt, update/rename models and yangs for sxp-ise-adapter
[groupbasedpolicy.git] / sxp-mapper / src / main / yang / sxp-mapper.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 sxp-mapper {
10     yang-version 1;
11     namespace "urn:opendaylight:params:xml:ns:yang:controller:config:groupbasedpolicy:sxp-mapper:service";
12     prefix "sxpm";
13
14     import sxp-database { prefix sxp-database; revision-date 2016-03-08; }
15     import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
16
17     description
18         "This module contains the YANG definitions for
19           sxf-mapper implementation.";
20
21     revision "2016-03-07" {
22         description
23             "Initial revision.";
24     }
25
26
27     rpc send-ip-sgt-binding {
28         description "Provides sending IP/SGT binding to peers";
29         input {
30             list ip-sgt-binding {
31                 min-elements 1;
32                 key "ip-prefix sgt";
33                 leaf ip-prefix {
34                     type inet:ip-prefix;
35                 }
36                 leaf sgt {
37                     type sxp-database:sgt;
38                 }
39             }
40             leaf-list peers {
41                 description "If empty then binding will be broadcasted.";
42                 type inet:ip-address;
43             }
44         }
45         output {
46             leaf error {
47                 type string;
48             }
49         }
50     }
51
52     rpc remove-ip-sgt-binding {
53         description "Removes given IP/SGT bindings on peers.";
54         input {
55             leaf-list ip-prefix {
56                 type inet:ip-prefix;
57             }
58             leaf-list peers {
59                 description "If empty then the binding will be removed from Master DB.";
60                 type inet:ip-address;
61             }
62         }
63         output {
64             leaf error {
65                 type string;
66             }
67         }
68     }
69 }