5f43ce5c2ac4a4f99bf4a7010f971719bef18c08
[neutron.git] / model / src / main / yang / neutron-sfc-flow-classifier.yang
1 /*
2  * Copyright (c) 2016 Brocade Communications 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  module neutron-sfc-flow-classifier {
9
10      yang-version 1;
11
12      namespace "urn:opendaylight:neutron-sfc-flow-classifier";
13
14      prefix neutron-sfc-flow-classifier;
15
16      import ietf-yang-types { prefix "yang"; }
17      import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
18      import neutron-attrs { prefix "attrs"; }
19      import neutron-constants { prefix "constants"; }
20
21
22      organization "OpenDaylight Neutron Northbound Project";
23
24      contact "Anil Vishnoi <vishnoianil@gmail.com>";
25
26      description "This YANG module defines Openstack Neutron SFC Flow Classfier Models.These models are based on the
27                 API's exposed by the OpenStack Neutron Networking SFC (networking-sfc) project. List of classifier APIs
28                 are listed at following URL (http://docs.openstack.org/developer/networking-sfc/api.html)";
29
30      revision "2016-05-11" {
31          description
32                  "OpenStack Neutron SFC Flow Classfier Models - Version 1.";
33      }
34
35      grouping flow-classifier-match-attributes {
36          leaf ethertype {
37              description "
38                 Classify flows based on the provided ethertype.Currently OpenStack SFC only supports IPv4 and IPv6.";
39
40              type identityref {
41                  base "constants:ethertype-base";
42              }
43          }
44          leaf protocol {
45              description "
46                 Classify flows based on the provided protocol.Currently OpenStack SFC only supports TCP,UDP and ICMP";
47              type identityref {
48                  base "constants:protocol-base";
49              }
50          }
51          leaf source-port-range-min {
52              description "Minimum source protocol port";
53              type uint16 {
54                  range "0 .. 65535";
55              }
56          }
57          leaf source-port-range-max {
58              description "Maximum source protocol port.";
59              type uint16 {
60                  range "0 .. 65535";
61              }
62          }
63          leaf destination-port-range-min {
64              description "Minimum destination protocol port.";
65              type uint16 {
66                  range "0 .. 65535";
67              }
68          }
69          leaf destination-port-range-max {
70              description "Maximum destination protocol port.";
71              type uint16 {
72                  range "0 .. 65535";
73              }
74          }
75          leaf source-ip-prefix {
76              description "Source IPv4 or IPv6 prefix.";
77              type inet:ip-prefix;
78          }
79          leaf destination-ip-prefix {
80              description "Destination IPv4 or IPv6 prefix.";
81              type inet:ip-prefix;
82          }
83          leaf logical-source-port {
84              description "Neutron source port.";
85              type yang:uuid;
86          }
87          leaf logical-destination-port {
88              description "Neutron destination port.";
89              type yang:uuid;
90          }
91          list l7-parameter {
92              description "List of Key-Value pair of L7 matching attributes";
93              key "match-parameter";
94              leaf match-parameter {
95                  description "Name of the L7 parameter";
96                  type string;
97              }
98              leaf match-parameter-value {
99                  description "Value of the L7 parameter";
100                  type string;
101              }
102          }
103      }
104
105      grouping sfc-flow-classifiers-attributes {
106          container sfc-flow-classifiers {
107              description "Contains list of Service Function Chaining flow classifiers";
108              list sfc-flow-classifier {
109                  description "
110                     Defines high level model of SFC Flow Classifier. This models is based on the flow classifier APIs
111                     defined by OpenStack Neutron networking-sfc project.";
112
113                  key "uuid";
114                  uses attrs:base-attributes;
115                  uses flow-classifier-match-attributes;
116              }
117          }
118      }
119  }