Sho SHIMIZU
Committed by Gerrit Code Review

Remove API deprecated in Falcon

Change-Id: Ie73d2fcbb79342e1808f78d9c0e75d6ebc540207
...@@ -53,32 +53,6 @@ public class DefaultDriver implements Driver { ...@@ -53,32 +53,6 @@ public class DefaultDriver implements Driver {
53 * Creates a driver with the specified name. 53 * Creates a driver with the specified name.
54 * 54 *
55 * @param name driver name 55 * @param name driver name
56 - * @param parent optional parent driver
57 - * @param manufacturer device manufacturer
58 - * @param hwVersion device hardware version
59 - * @param swVersion device software version
60 - * @param behaviours device behaviour classes
61 - * @param properties properties for configuration of device behaviour classes
62 - * @deprecated 1.5.0 Falcon Release
63 - */
64 - @Deprecated
65 - public DefaultDriver(String name, Driver parent, String manufacturer,
66 - String hwVersion, String swVersion,
67 - Map<Class<? extends Behaviour>, Class<? extends Behaviour>> behaviours,
68 - Map<String, String> properties) {
69 - this.name = checkNotNull(name, "Name cannot be null");
70 - this.parents = parent == null ? null : Lists.newArrayList(parent);
71 - this.manufacturer = checkNotNull(manufacturer, "Manufacturer cannot be null");
72 - this.hwVersion = checkNotNull(hwVersion, "HW version cannot be null");
73 - this.swVersion = checkNotNull(swVersion, "SW version cannot be null");
74 - this.behaviours = copyOf(checkNotNull(behaviours, "Behaviours cannot be null"));
75 - this.properties = copyOf(checkNotNull(properties, "Properties cannot be null"));
76 - }
77 -
78 - /**
79 - * Creates a driver with the specified name.
80 - *
81 - * @param name driver name
82 * @param parents optional parent drivers 56 * @param parents optional parent drivers
83 * @param manufacturer device manufacturer 57 * @param manufacturer device manufacturer
84 * @param hwVersion device hardware version 58 * @param hwVersion device hardware version
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
15 */ 15 */
16 package org.onosproject.net.driver; 16 package org.onosproject.net.driver;
17 17
18 +import com.google.common.collect.ImmutableList;
18 import com.google.common.collect.ImmutableMap; 19 import com.google.common.collect.ImmutableMap;
19 import org.junit.Test; 20 import org.junit.Test;
20 21
...@@ -35,7 +36,7 @@ public class DefaultDriverTest { ...@@ -35,7 +36,7 @@ public class DefaultDriverTest {
35 TestBehaviourTwoImpl.class), 36 TestBehaviourTwoImpl.class),
36 ImmutableMap.of("foo", "bar")); 37 ImmutableMap.of("foo", "bar"));
37 38
38 - DefaultDriver ddc = new DefaultDriver("foo.bar", ddp, "Circus", "lux", "1.2a", 39 + DefaultDriver ddc = new DefaultDriver("foo.bar", ImmutableList.of(ddp), "Circus", "lux", "1.2a",
39 ImmutableMap.of(), 40 ImmutableMap.of(),
40 ImmutableMap.of("foo", "bar")); 41 ImmutableMap.of("foo", "bar"));
41 assertEquals("incorrect name", "foo.bar", ddc.name()); 42 assertEquals("incorrect name", "foo.bar", ddc.name());
...@@ -88,4 +89,4 @@ public class DefaultDriverTest { ...@@ -88,4 +89,4 @@ public class DefaultDriverTest {
88 89
89 assertTrue("incorrect toString", ddc.toString().contains("Circus")); 90 assertTrue("incorrect toString", ddc.toString().contains("Circus"));
90 } 91 }
91 -}
...\ No newline at end of file ...\ No newline at end of file
92 +}
......
...@@ -19,6 +19,7 @@ package org.onosproject.codec.impl; ...@@ -19,6 +19,7 @@ package org.onosproject.codec.impl;
19 import java.util.ArrayList; 19 import java.util.ArrayList;
20 import java.util.Map; 20 import java.util.Map;
21 21
22 +import com.google.common.collect.ImmutableList;
22 import org.junit.Test; 23 import org.junit.Test;
23 import org.onosproject.net.driver.Behaviour; 24 import org.onosproject.net.driver.Behaviour;
24 import org.onosproject.net.driver.DefaultDriver; 25 import org.onosproject.net.driver.DefaultDriver;
...@@ -53,7 +54,7 @@ public class DriverCodecTest { ...@@ -53,7 +54,7 @@ public class DriverCodecTest {
53 "HW1.2.3", "SW1.2.3", 54 "HW1.2.3", "SW1.2.3",
54 behaviours, 55 behaviours,
55 properties); 56 properties);
56 - DefaultDriver child = new DefaultDriver("child", parent, "Acme", 57 + DefaultDriver child = new DefaultDriver("child", ImmutableList.of(parent), "Acme",
57 "HW1.2.3.1", "SW1.2.3.1", 58 "HW1.2.3.1", "SW1.2.3.1",
58 behaviours, 59 behaviours,
59 properties); 60 properties);
......