Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2014-present Open Networking Laboratory |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 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 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.net; |
Ayaka Koshibe | 50ee924 | 2014-09-12 16:37:46 -0700 | [diff] [blame] | 17 | |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 18 | import static org.onosproject.net.DeviceId.deviceId; |
Ayaka Koshibe | 50ee924 | 2014-09-12 16:37:46 -0700 | [diff] [blame] | 19 | |
| 20 | import java.util.Set; |
| 21 | |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 22 | import org.onosproject.net.provider.ProviderId; |
Pavlin Radoslavov | 33f228a | 2014-10-27 19:33:16 -0700 | [diff] [blame] | 23 | import org.onlab.packet.IpAddress; |
Ayaka Koshibe | a9c199f | 2014-09-16 16:21:40 -0700 | [diff] [blame] | 24 | import org.onlab.packet.MacAddress; |
| 25 | import org.onlab.packet.VlanId; |
Ayaka Koshibe | 50ee924 | 2014-09-12 16:37:46 -0700 | [diff] [blame] | 26 | |
| 27 | import com.google.common.collect.Sets; |
| 28 | |
| 29 | /** |
| 30 | * Provides a set of test DefaultDevice parameters for use with Host- |
| 31 | * related tests. |
| 32 | */ |
| 33 | public abstract class TestDeviceParams { |
| 34 | |
tom | 7e02cda | 2014-09-18 12:05:46 -0700 | [diff] [blame] | 35 | protected static final ProviderId PID = new ProviderId("of", "foo"); |
Ayaka Koshibe | 50ee924 | 2014-09-12 16:37:46 -0700 | [diff] [blame] | 36 | protected static final DeviceId DID1 = deviceId("of:foo"); |
| 37 | protected static final DeviceId DID2 = deviceId("of:bar"); |
Ayaka Koshibe | a9c199f | 2014-09-16 16:21:40 -0700 | [diff] [blame] | 38 | protected static final MacAddress MAC1 = MacAddress.valueOf("00:11:00:00:00:01"); |
| 39 | protected static final MacAddress MAC2 = MacAddress.valueOf("00:22:00:00:00:02"); |
| 40 | protected static final VlanId VLAN1 = VlanId.vlanId((short) 11); |
| 41 | protected static final VlanId VLAN2 = VlanId.vlanId((short) 22); |
Pavlin Radoslavov | 33f228a | 2014-10-27 19:33:16 -0700 | [diff] [blame] | 42 | protected static final IpAddress IP1 = IpAddress.valueOf("10.0.0.1"); |
| 43 | protected static final IpAddress IP2 = IpAddress.valueOf("10.0.0.2"); |
| 44 | protected static final IpAddress IP3 = IpAddress.valueOf("10.0.0.3"); |
Ayaka Koshibe | 50ee924 | 2014-09-12 16:37:46 -0700 | [diff] [blame] | 45 | |
| 46 | protected static final PortNumber P1 = PortNumber.portNumber(100); |
| 47 | protected static final PortNumber P2 = PortNumber.portNumber(200); |
| 48 | protected static final HostId HID1 = HostId.hostId(MAC1, VLAN1); |
| 49 | protected static final HostId HID2 = HostId.hostId(MAC2, VLAN2); |
| 50 | protected static final HostLocation LOC1 = new HostLocation(DID1, P1, 123L); |
| 51 | protected static final HostLocation LOC2 = new HostLocation(DID2, P2, 123L); |
Pavlin Radoslavov | 33f228a | 2014-10-27 19:33:16 -0700 | [diff] [blame] | 52 | protected static final Set<IpAddress> IPSET1 = Sets.newHashSet(IP1, IP2); |
| 53 | protected static final Set<IpAddress> IPSET2 = Sets.newHashSet(IP1, IP3); |
Ayaka Koshibe | 50ee924 | 2014-09-12 16:37:46 -0700 | [diff] [blame] | 54 | |
| 55 | } |