Initial Code commit for OVS Support for vpnservice
[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 interface-name {
46                     type string;
47                 }
48
49                 leaf service-name {
50                     type string;
51                 }
52             }
53         }
54     }
55
56     grouping service-openflow-info {
57         description "openflow specific information for services info.";
58
59         leaf dispatcher-table-id {
60             type uint8;
61         }
62
63         leaf flow-priority {
64             type uint16;
65         }
66
67         leaf flow-cookie {
68             type uint64;
69         }
70
71         uses offlow:instruction-list;
72     }
73
74     augment "/service-bindings/services-info/bound-services" {
75         ext:augment-identifier "stype-openflow";
76         when "service-type = 'service-type-flow-based'";
77         uses service-openflow-info;
78     }
79 }