Carmelo Cascone | 2388cc1 | 2021-05-26 19:30:30 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-present Open Networking Foundation |
| 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 org.onosproject.pipelines.fabric.impl.behaviour.pipeliner; |
| 18 | |
| 19 | import org.junit.Test; |
| 20 | import org.onlab.packet.IpPrefix; |
| 21 | import org.onlab.packet.MacAddress; |
| 22 | import org.onlab.packet.MplsLabel; |
| 23 | import org.onlab.packet.VlanId; |
| 24 | import org.onosproject.TestApplicationId; |
| 25 | import org.onosproject.core.ApplicationId; |
| 26 | import org.onosproject.net.DeviceId; |
| 27 | import org.onosproject.net.PortNumber; |
| 28 | import org.onosproject.net.flow.DefaultTrafficSelector; |
| 29 | import org.onosproject.net.flow.TrafficSelector; |
| 30 | import org.onosproject.pipelines.fabric.impl.behaviour.FabricCapabilities; |
| 31 | |
| 32 | import static org.easymock.EasyMock.createNiceMock; |
| 33 | import static org.easymock.EasyMock.expect; |
| 34 | import static org.easymock.EasyMock.replay; |
| 35 | |
| 36 | public class BaseObjectiveTranslatorTest { |
| 37 | static final ApplicationId APP_ID = TestApplicationId.create("FabricPipelinerTest"); |
| 38 | static final ApplicationId XCONNECT_APP_ID = TestApplicationId.create("FabricPipelinerTest.xconnect"); |
| 39 | static final DeviceId DEVICE_ID = DeviceId.deviceId("device:bmv2:11"); |
| 40 | static final int PRIORITY = 100; |
| 41 | static final PortNumber PORT_1 = PortNumber.portNumber(1); |
| 42 | static final PortNumber PORT_2 = PortNumber.portNumber(2); |
| 43 | static final VlanId VLAN_100 = VlanId.vlanId("100"); |
| 44 | static final VlanId VLAN_200 = VlanId.vlanId("200"); |
| 45 | static final MacAddress HOST_MAC = MacAddress.valueOf("00:00:00:00:00:01"); |
| 46 | static final MacAddress ROUTER_MAC = MacAddress.valueOf("00:00:00:00:02:01"); |
| 47 | static final IpPrefix IPV4_UNICAST_ADDR = IpPrefix.valueOf("10.0.0.1/32"); |
| 48 | static final IpPrefix IPV4_MCAST_ADDR = IpPrefix.valueOf("224.0.0.1/32"); |
| 49 | static final IpPrefix IPV6_UNICAST_ADDR = IpPrefix.valueOf("2000::1/32"); |
| 50 | static final IpPrefix IPV6_MCAST_ADDR = IpPrefix.valueOf("ff00::1/32"); |
| 51 | static final MplsLabel MPLS_10 = MplsLabel.mplsLabel(10); |
| 52 | static final Integer NEXT_ID_1 = 1; |
| 53 | static final TrafficSelector VLAN_META = DefaultTrafficSelector.builder() |
| 54 | .matchVlanId(VLAN_100) |
| 55 | .build(); |
| 56 | |
| 57 | FabricCapabilities capabilitiesHashed; |
| 58 | FabricCapabilities capabilitiesSimple; |
| 59 | |
| 60 | void doSetup() { |
| 61 | this.capabilitiesHashed = createNiceMock(FabricCapabilities.class); |
| 62 | this.capabilitiesSimple = createNiceMock(FabricCapabilities.class); |
| 63 | expect(capabilitiesHashed.hasHashedTable()).andReturn(true).anyTimes(); |
| 64 | expect(capabilitiesHashed.supportDoubleVlanTerm()).andReturn(true).anyTimes(); |
| 65 | expect(capabilitiesSimple.hasHashedTable()).andReturn(false).anyTimes(); |
| 66 | expect(capabilitiesSimple.supportDoubleVlanTerm()).andReturn(true).anyTimes(); |
| 67 | replay(capabilitiesHashed); |
| 68 | replay(capabilitiesSimple); |
| 69 | } |
| 70 | |
| 71 | @Test |
| 72 | public void fakeTest() { |
| 73 | // Needed otherwise Bazel complains about a test class without test cases. |
| 74 | assert true; |
| 75 | } |
| 76 | } |