Merge "Upgrade ietf-{inet,yang}-types to 2013-07-15"
[vpnservice.git] / interfacemgr / interfacemgr-api / src / main / yang / odl-interface-service-bindings.yang
1 module interface-service-bindings {
2     namespace "urn:opendaylight:params:xml:ns:yang:servicebinding";
3     prefix ifservicebindings;
4
5     import opendaylight-flow-types {prefix offlow;revision-date "2013-10-26";}
6
7     import yang-ext {
8         prefix ext;
9     }
10
11     revision "2015-10-15" {
12         description "This YANG module defines the service binding model.";
13     }
14
15     identity service-type-base {
16        description "Base identity for all service-types";
17     }
18
19     identity service-type-flow-based {
20        description "Service type for flow-based services";
21        base service-type-base;
22     }
23
24     container service-bindings {
25         list services-info {
26             key interface-name;
27             leaf interface-name {
28                 type string;
29             }
30
31             list bound-services {
32                 key "service-priority";
33                 max-elements "2";
34                 min-elements "0";
35                 leaf service-priority {
36                     type uint8;
37                 }
38
39                 leaf service-type {
40                     type identityref {
41                         base service-type-base;
42                     }
43                 }
44
45                 leaf service-name {
46                     type string;
47                 }
48             }
49         }
50     }
51
52     grouping service-openflow-info {
53         description "openflow specific information for services info.";
54
55         leaf dispatcher-table-id {
56             type uint8;
57         }
58
59         leaf flow-priority {
60             type uint16;
61         }
62
63         leaf flow-cookie {
64             type uint64;
65         }
66
67         uses offlow:instruction-list;
68     }
69
70     augment "/service-bindings/services-info/bound-services" {
71         ext:augment-identifier "stype-openflow";
72         when "service-type = 'service-type-flow-based'";
73         uses service-openflow-info;
74     }
75 }