update NetvirtSfc postman collection
[netvirt.git] / openstack / net-virt-sfc / api / src / main / yang / packet-fields.yang
1 module packet-fields {
2     yang-version 1;
3
4     namespace "urn:ietf:params:xml:ns:yang:packet-fields";
5
6     prefix packet-fields;
7
8     import ietf-inet-types {
9         prefix "inet";
10     }
11
12     import ietf-yang-types {
13         prefix "yang";
14     }
15
16     revision 2014-06-25 {
17         description "Initial version of packet fields used by access-lists";
18     }
19
20     grouping acl-transport-header-fields {
21         description "Transport header fields";
22
23         container source-port-range {
24              description "inclusive range of source ports";
25              leaf lower-port {
26                  mandatory true;
27                  type inet:port-number;
28              }
29              leaf upper-port {
30                  type inet:port-number;
31              }
32         }
33
34         container destination-port-range {
35              description "inclusive range of destination ports";
36              leaf lower-port {
37                  mandatory true;
38                  type inet:port-number;
39              }
40              leaf upper-port {
41                  type inet:port-number;
42              }
43         }
44     }
45
46     grouping acl-ip-header-fields {
47         description "Header fields common to ipv4 and ipv6";
48
49         uses acl-transport-header-fields;
50
51         leaf dscp {
52             type inet:dscp;
53         }
54
55         leaf ip-protocol {
56             type uint8;
57         }
58
59     }
60
61     grouping acl-ipv4-header-fields {
62         description "fields in IPv4 header";
63
64         leaf destination-ipv4-address {
65             type inet:ipv4-prefix;
66         }
67
68         leaf source-ipv4-address {
69             type inet:ipv4-prefix;
70         }
71
72     }
73
74     grouping acl-ipv6-header-fields {
75         description "fields in IPv6 header";
76
77         leaf destination-ipv6-address {
78             type inet:ipv6-prefix;
79         }
80
81         leaf source-ipv6-address {
82             type inet:ipv6-prefix;
83         }
84
85         leaf flow-label {
86             type inet:ipv6-flow-label;
87         }
88
89     }
90
91     grouping acl-eth-header-fields {
92         description "fields in ethernet header";
93
94         leaf destination-mac-address {
95             type yang:mac-address;
96         }
97
98         leaf destination-mac-address-mask {
99             type yang:mac-address;
100         }
101
102         leaf source-mac-address {
103             type yang:mac-address;
104         }
105
106         leaf source-mac-address-mask {
107             type yang:mac-address;
108         }
109     }
110
111     grouping timerange {
112         description "Define time range entries to restrict
113             the access. The time range is identified by a name
114             and then referenced by a function, so that those
115             time restrictions are imposed on the function itself.";
116
117         container absolute {
118             description
119                 "Absolute time and date that
120                 the associated function starts
121                 going into effect.";
122
123             leaf start {
124                 type yang:date-and-time;
125                 description
126                 "Start time and date";
127             }
128             leaf end {
129                 type yang:date-and-time;
130                 description "Absolute end time and date";
131             }
132             leaf active {
133                 type boolean;
134                 default "true";
135                 description
136                     "Specify the associated function
137                     active or inactive state when
138                     starts going into effect";
139             }
140         } // container absolute
141     } //grouping timerange
142
143     grouping metadata {
144         description "Fields associated with a packet but not in the header";
145
146         leaf input-interface {
147              description "Packet was received on this interface";
148              type string;
149         }
150         uses timerange;
151     }
152 }