HC2VPP-38 / HONEYCOMB-336 - removed mandatory from ace-ip-version
[hc2vpp.git] / acl / acl-impl / src / test / java / io / fd / hc2vpp / acl / util / ace / extractor / AceDataExtractorTestCase.java
1 /*
2  * Copyright (c) 2017 Cisco and/or its affiliates.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package io.fd.hc2vpp.acl.util.ace.extractor;
18
19 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;
20 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix;
21 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
22
23 abstract class AceDataExtractorTestCase {
24
25     protected static final byte[] DEFAULT_MAC_ADDRESS_BYTES = new byte[]{0, 0, 0, 0, 0, 0};
26     protected static final MacAddress DEFAULT_MAC_ADDRESS = new MacAddress("00:00:00:00:00:00");
27     protected static final MacAddress DEFAULT_MAC_MASK_ADDRESS = new MacAddress("00:00:00:00:00:00");
28     protected static final MacAddress MAC_ADDRESS = new MacAddress("00:11:11:00:11:11");
29     protected static final MacAddress MAC_ADDRESS_MASK = new MacAddress("00:11:00:11:11:11");
30     protected static final byte[] MAC_ADDRESS_BYTES = {0, 17, 17, 0, 17, 17};
31     protected static final byte[] MAC_ADDRESS_MASK_BYTES = {0, 17, 0, 17, 17, 17};
32
33     protected static final byte[] DEFAULT_IPV4_ADDRESS_BYTES = new byte[4];
34     protected static final Ipv4Prefix IPV4_PREFIX = new Ipv4Prefix("192.168.2.1/32");
35     protected static final Ipv4Prefix IPV4_2_PREFIX = new Ipv4Prefix("192.168.2.2/24");
36     protected static final byte[] IPV4_PREFIX_BYTES = {-64, -88, 2, 1};
37     protected static final byte[] IPV4_2_PREFIX_BYTES = {-64, -88, 2, 2};
38     protected static final byte IPV4_PREFIX_VALUE = (byte) 32;
39     protected static final byte IPV4_2_PREFIX_VALUE = (byte) 24;
40     protected static final int DEFAULT_IPV4_PREFIX_VALUE = 0;
41
42     protected static final byte[] DEFAULT_IPV6_ADDRESS_BYTES = new byte[16];
43     protected static final Ipv6Prefix IPV6_PREFIX = new Ipv6Prefix("2001:db8:a0b:12f0:0:0:0:1/64");
44     protected static final Ipv6Prefix IPV6_2_PREFIX = new Ipv6Prefix("2001:db8:a0b:12f0:0:0:0:2/48");
45     protected static final byte[] IPV6_PREFIX_BYTES = {32, 1, 13, -72, 10, 11, 18, -16, 0, 0, 0, 0, 0, 0, 0, 1};
46     protected static final byte[] IPV6_2_PREFIX_BYTES = {32, 1, 13, -72, 10, 11, 18, -16, 0, 0, 0, 0, 0, 0, 0, 2};
47     protected static final byte IPV6_PREFIX_VALUE = (byte) 64;
48     protected static final byte IPV6_2_PREFIX_VALUE = (byte) 48;
49     protected static final int DEFAULT_IPV6_PREFIX_VALUE = 0;
50 }