blob: 2de364abbe8b2154d4b55ad85bce9855dccdcda3 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2014-present Open Networking Laboratory
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07003 *
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'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net;
Ayaka Koshibe50ee9242014-09-12 16:37:46 -070017
Brian O'Connorabafb502014-12-02 22:26:20 -080018import static org.onosproject.net.DeviceId.deviceId;
Ayaka Koshibe50ee9242014-09-12 16:37:46 -070019
20import java.util.Set;
21
Brian O'Connorabafb502014-12-02 22:26:20 -080022import org.onosproject.net.provider.ProviderId;
Pavlin Radoslavov33f228a2014-10-27 19:33:16 -070023import org.onlab.packet.IpAddress;
Ayaka Koshibea9c199f2014-09-16 16:21:40 -070024import org.onlab.packet.MacAddress;
25import org.onlab.packet.VlanId;
Ayaka Koshibe50ee9242014-09-12 16:37:46 -070026
27import com.google.common.collect.Sets;
28
29/**
30 * Provides a set of test DefaultDevice parameters for use with Host-
31 * related tests.
32 */
33public abstract class TestDeviceParams {
34
tom7e02cda2014-09-18 12:05:46 -070035 protected static final ProviderId PID = new ProviderId("of", "foo");
Ayaka Koshibe50ee9242014-09-12 16:37:46 -070036 protected static final DeviceId DID1 = deviceId("of:foo");
37 protected static final DeviceId DID2 = deviceId("of:bar");
Brian Stanke8e9f8d12016-06-08 14:48:33 -040038 protected static final DeviceId DID3 = deviceId("of:who");
39 protected static final DeviceId DID4 = deviceId("of:what");
Brian Stankefb61df42016-07-25 11:47:51 -040040 protected static final DeviceId DID5 = deviceId("of:when");
Ayaka Koshibea9c199f2014-09-16 16:21:40 -070041 protected static final MacAddress MAC1 = MacAddress.valueOf("00:11:00:00:00:01");
42 protected static final MacAddress MAC2 = MacAddress.valueOf("00:22:00:00:00:02");
43 protected static final VlanId VLAN1 = VlanId.vlanId((short) 11);
44 protected static final VlanId VLAN2 = VlanId.vlanId((short) 22);
Pavlin Radoslavov33f228a2014-10-27 19:33:16 -070045 protected static final IpAddress IP1 = IpAddress.valueOf("10.0.0.1");
46 protected static final IpAddress IP2 = IpAddress.valueOf("10.0.0.2");
47 protected static final IpAddress IP3 = IpAddress.valueOf("10.0.0.3");
Ayaka Koshibe50ee9242014-09-12 16:37:46 -070048
49 protected static final PortNumber P1 = PortNumber.portNumber(100);
50 protected static final PortNumber P2 = PortNumber.portNumber(200);
51 protected static final HostId HID1 = HostId.hostId(MAC1, VLAN1);
52 protected static final HostId HID2 = HostId.hostId(MAC2, VLAN2);
53 protected static final HostLocation LOC1 = new HostLocation(DID1, P1, 123L);
54 protected static final HostLocation LOC2 = new HostLocation(DID2, P2, 123L);
Pavlin Radoslavov33f228a2014-10-27 19:33:16 -070055 protected static final Set<IpAddress> IPSET1 = Sets.newHashSet(IP1, IP2);
56 protected static final Set<IpAddress> IPSET2 = Sets.newHashSet(IP1, IP3);
Ayaka Koshibe50ee9242014-09-12 16:37:46 -070057
58}