Thomas Vachuska

Renaming DHCP* to Dhcp* to follow ONOS conventions.

Change-Id: I36cfbe5b57e342af2e436e31374f1a1f49633e78
Showing 18 changed files with 97 additions and 97 deletions
......@@ -23,14 +23,14 @@ import java.util.Map;
/**
* DHCP Service Interface.
*/
public interface DHCPService {
public interface DhcpService {
/**
* Returns a collection of all the MacAddress to IPAddress mapping.
*
* @return collection of mappings.
*/
Map<MacAddress, IPAssignment> listMapping();
Map<MacAddress, IpAssignment> listMapping();
/**
* Returns the default lease time granted by the DHCP Server.
......
......@@ -23,7 +23,7 @@ import java.util.Map;
/**
* DHCPStore Interface.
*/
public interface DHCPStore {
public interface DhcpStore {
/**
* Appends all the IPs in a given range to the free pool of IPs.
......@@ -77,7 +77,7 @@ public interface DHCPStore {
*
* @return the collection of the mappings
*/
Map<MacAddress, IPAssignment> listMapping();
Map<MacAddress, IpAssignment> listMapping();
/**
* Assigns the requested IP to the MAC ID (if available) for an indefinite period of time.
......
......@@ -25,7 +25,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
/**
* Stores the MAC ID to IP Address mapping details.
*/
public final class IPAssignment {
public final class IpAssignment {
private final Ip4Address ipAddress;
......@@ -60,7 +60,7 @@ public final class IPAssignment {
* @param leasePeriod
* @param assignmentStatus
*/
private IPAssignment(Ip4Address ipAddress,
private IpAssignment(Ip4Address ipAddress,
long leasePeriod,
Date timestamp,
AssignmentStatus assignmentStatus) {
......@@ -130,7 +130,7 @@ public final class IPAssignment {
*
* @return new builder
*/
public static Builder builder(IPAssignment assignment) {
public static Builder builder(IpAssignment assignment) {
return new Builder(assignment);
}
......@@ -151,16 +151,16 @@ public final class IPAssignment {
}
private Builder(IPAssignment ipAssignment) {
private Builder(IpAssignment ipAssignment) {
ipAddress = ipAssignment.ipAddress();
timeStamp = ipAssignment.timestamp();
leasePeriod = ipAssignment.leasePeriod() * 1000;
assignmentStatus = ipAssignment.assignmentStatus();
}
public IPAssignment build() {
public IpAssignment build() {
validateInputs();
return new IPAssignment(ipAddress,
return new IpAssignment(ipAddress,
leasePeriod,
timeStamp,
assignmentStatus);
......
......@@ -17,21 +17,21 @@ package org.onosproject.dhcp.cli;
import org.apache.karaf.shell.commands.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.dhcp.DHCPService;
import org.onosproject.dhcp.DhcpService;
/**
* Lists all the default lease parameters offered by the DHCP Server.
*/
@Command(scope = "onos", name = "dhcp-lease",
description = "Lists all the default lease parameters offered by the DHCP Server")
public class DHCPLeaseDetails extends AbstractShellCommand {
public class DhcpLeaseDetails extends AbstractShellCommand {
private static final String DHCP_LEASE_FORMAT = "Lease Time: %ds\nRenewal Time: %ds\nRebinding Time: %ds";
@Override
protected void execute() {
DHCPService dhcpService = AbstractShellCommand.get(DHCPService.class);
DhcpService dhcpService = AbstractShellCommand.get(DhcpService.class);
int leaseTime = dhcpService.getLeaseTime();
int renewTime = dhcpService.getRenewalTime();
int rebindTime = dhcpService.getRebindingTime();
......
......@@ -18,8 +18,8 @@ package org.onosproject.dhcp.cli;
import org.apache.karaf.shell.commands.Command;
import org.onlab.packet.MacAddress;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.dhcp.DHCPService;
import org.onosproject.dhcp.IPAssignment;
import org.onosproject.dhcp.DhcpService;
import org.onosproject.dhcp.IpAssignment;
import java.util.Map;
......@@ -28,16 +28,16 @@ import java.util.Map;
*/
@Command(scope = "onos", name = "dhcp-list",
description = "Lists all the MAC to IP mappings held by the DHCP Server")
public class DHCPListAllMappings extends AbstractShellCommand {
public class DhcpListAllMappings extends AbstractShellCommand {
private static final String DHCP_MAPPING_FORMAT = "MAC ID: %s -> IP ASSIGNED %s";
@Override
protected void execute() {
DHCPService dhcpService = AbstractShellCommand.get(DHCPService.class);
Map<MacAddress, IPAssignment> allocationMap = dhcpService.listMapping();
DhcpService dhcpService = AbstractShellCommand.get(DhcpService.class);
Map<MacAddress, IpAssignment> allocationMap = dhcpService.listMapping();
for (Map.Entry<MacAddress, IPAssignment> entry : allocationMap.entrySet()) {
for (Map.Entry<MacAddress, IpAssignment> entry : allocationMap.entrySet()) {
print(DHCP_MAPPING_FORMAT, entry.getKey().toString(), entry.getValue().ipAddress().toString());
}
}
......
......@@ -19,14 +19,14 @@ import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
import org.onlab.packet.MacAddress;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.dhcp.DHCPService;
import org.onosproject.dhcp.DhcpService;
/**
* Removes a static MAC Address to IP Mapping from the DHCP Server.
*/
@Command(scope = "onos", name = "dhcp-remove-static-mapping",
description = "Removes a static MAC Address to IP Mapping from the DHCP Server")
public class DHCPRemoveStaticMapping extends AbstractShellCommand {
public class DhcpRemoveStaticMapping extends AbstractShellCommand {
@Argument(index = 0, name = "macAddr",
description = "MAC Address of the client",
......@@ -39,7 +39,7 @@ public class DHCPRemoveStaticMapping extends AbstractShellCommand {
@Override
protected void execute() {
DHCPService dhcpService = AbstractShellCommand.get(DHCPService.class);
DhcpService dhcpService = AbstractShellCommand.get(DhcpService.class);
try {
MacAddress macID = MacAddress.valueOf(macAddr);
......
......@@ -20,14 +20,14 @@ import org.apache.karaf.shell.commands.Command;
import org.onlab.packet.Ip4Address;
import org.onlab.packet.MacAddress;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.dhcp.DHCPService;
import org.onosproject.dhcp.DhcpService;
/**
* Registers a static MAC Address to IP Mapping with the DHCP Server.
*/
@Command(scope = "onos", name = "dhcp-set-static-mapping",
description = "Registers a static MAC Address to IP Mapping with the DHCP Server")
public class DHCPSetStaticMapping extends AbstractShellCommand {
public class DhcpSetStaticMapping extends AbstractShellCommand {
@Argument(index = 0, name = "macAddr",
description = "MAC Address of the client",
......@@ -43,7 +43,7 @@ public class DHCPSetStaticMapping extends AbstractShellCommand {
private static final String DHCP_FAILURE = "Static Mapping Failed. The IP maybe unavailable.";
@Override
protected void execute() {
DHCPService dhcpService = AbstractShellCommand.get(DHCPService.class);
DhcpService dhcpService = AbstractShellCommand.get(DhcpService.class);
try {
MacAddress macID = MacAddress.valueOf(macAddr);
......
......@@ -19,7 +19,7 @@ import org.apache.karaf.shell.console.Completer;
import org.apache.karaf.shell.console.completer.StringsCompleter;
import org.onlab.packet.Ip4Address;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.dhcp.DHCPService;
import org.onosproject.dhcp.DhcpService;
import java.util.Iterator;
import java.util.List;
......@@ -28,13 +28,13 @@ import java.util.SortedSet;
/**
* Free IP Completer.
*/
public class FreeIPCompleter implements Completer {
public class FreeIpCompleter implements Completer {
@Override
public int complete(String buffer, int cursor, List<String> candidates) {
// Delegate string completer
StringsCompleter delegate = new StringsCompleter();
DHCPService dhcpService = AbstractShellCommand.get(DHCPService.class);
DhcpService dhcpService = AbstractShellCommand.get(DhcpService.class);
Iterator<Ip4Address> it = dhcpService.getAvailableIPs().iterator();
SortedSet<String> strings = delegate.getStrings();
......
......@@ -22,7 +22,7 @@ import org.onosproject.net.config.basics.BasicElementConfig;
/**
* DHCP Config class.
*/
public class DHCPConfig extends Config<ApplicationId> {
public class DhcpConfig extends Config<ApplicationId> {
public static final String MY_IP = "ip";
public static final String MY_MAC = "mac";
......
......@@ -36,9 +36,9 @@ import org.onlab.packet.UDP;
import org.onlab.packet.VlanId;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
import org.onosproject.dhcp.DHCPService;
import org.onosproject.dhcp.DHCPStore;
import org.onosproject.dhcp.IPAssignment;
import org.onosproject.dhcp.DhcpService;
import org.onosproject.dhcp.DhcpStore;
import org.onosproject.dhcp.IpAssignment;
import org.onosproject.net.config.ConfigFactory;
import org.onosproject.net.config.NetworkConfigEvent;
import org.onosproject.net.config.NetworkConfigListener;
......@@ -81,7 +81,7 @@ import static org.onosproject.net.config.basics.SubjectFactories.APP_SUBJECT_FAC
*/
@Component(immediate = true)
@Service
public class DHCPManager implements DHCPService {
public class DhcpManager implements DhcpService {
private static final ProviderId PID = new ProviderId("of", "org.onosproject.dhcp", true);
private final Logger log = LoggerFactory.getLogger(getClass());
......@@ -89,20 +89,20 @@ public class DHCPManager implements DHCPService {
private final NetworkConfigListener cfgListener = new InternalConfigListener();
private final Set<ConfigFactory> factories = ImmutableSet.of(
new ConfigFactory<ApplicationId, DHCPConfig>(APP_SUBJECT_FACTORY,
DHCPConfig.class,
new ConfigFactory<ApplicationId, DhcpConfig>(APP_SUBJECT_FACTORY,
DhcpConfig.class,
"dhcp") {
@Override
public DHCPConfig createConfig() {
return new DHCPConfig();
public DhcpConfig createConfig() {
return new DhcpConfig();
}
},
new ConfigFactory<ApplicationId, DHCPStoreConfig>(APP_SUBJECT_FACTORY,
DHCPStoreConfig.class,
new ConfigFactory<ApplicationId, DhcpStoreConfig>(APP_SUBJECT_FACTORY,
DhcpStoreConfig.class,
"dhcpstore") {
@Override
public DHCPStoreConfig createConfig() {
return new DHCPStoreConfig();
public DhcpStoreConfig createConfig() {
return new DhcpStoreConfig();
}
}
);
......@@ -118,7 +118,7 @@ public class DHCPManager implements DHCPService {
protected CoreService coreService;
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
protected DHCPStore dhcpStore;
protected DhcpStore dhcpStore;
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
protected HostProviderRegistry hostProviderRegistry;
......@@ -214,7 +214,7 @@ public class DHCPManager implements DHCPService {
}
@Override
public Map<MacAddress, IPAssignment> listMapping() {
public Map<MacAddress, IpAssignment> listMapping() {
return dhcpStore.listMapping();
}
......@@ -580,7 +580,7 @@ public class DHCPManager implements DHCPService {
*
* @param cfg configuration object
*/
private void reconfigureNetwork(DHCPConfig cfg) {
private void reconfigureNetwork(DhcpConfig cfg) {
if (cfg.ip() != null) {
myIP = cfg.ip();
......@@ -619,7 +619,7 @@ public class DHCPManager implements DHCPService {
*
* @param cfg configuration object
*/
private void reconfigureStore(DHCPStoreConfig cfg) {
private void reconfigureStore(DhcpStoreConfig cfg) {
if (cfg.defaultTimeout() != null) {
dhcpStore.setDefaultTimeoutForPurge(Integer.valueOf(cfg.defaultTimeout()));
......@@ -638,13 +638,13 @@ public class DHCPManager implements DHCPService {
if ((event.type() == NetworkConfigEvent.Type.CONFIG_ADDED ||
event.type() == NetworkConfigEvent.Type.CONFIG_UPDATED)) {
if (event.configClass().equals(DHCPConfig.class)) {
DHCPConfig cfg = cfgService.getConfig(appId, DHCPConfig.class);
if (event.configClass().equals(DhcpConfig.class)) {
DhcpConfig cfg = cfgService.getConfig(appId, DhcpConfig.class);
reconfigureNetwork(cfg);
log.info("Reconfigured Manager");
}
if (event.configClass().equals(DHCPStoreConfig.class)) {
DHCPStoreConfig cfg = cfgService.getConfig(appId, DHCPStoreConfig.class);
if (event.configClass().equals(DhcpStoreConfig.class)) {
DhcpStoreConfig cfg = cfgService.getConfig(appId, DhcpStoreConfig.class);
reconfigureStore(cfg);
log.info("Reconfigured Store");
}
......
......@@ -22,7 +22,7 @@ import org.onosproject.net.config.basics.BasicElementConfig;
/**
* DHCP Store Config class.
*/
public class DHCPStoreConfig extends Config<ApplicationId> {
public class DhcpStoreConfig extends Config<ApplicationId> {
public static final String TIMER_DELAY = "delay";
public static final String DEFAULT_TIMEOUT = "timeout";
......
......@@ -37,11 +37,11 @@ import static org.onosproject.ui.UiView.Category.NETWORK;
* Mechanism to stream data to the GUI.
*/
@Component(immediate = true, enabled = true)
@Service(value = DHCPUi.class)
public class DHCPUi {
@Service(value = DhcpUi.class)
public class DhcpUi {
private final Logger log = LoggerFactory.getLogger(getClass());
private static final ClassLoader CL = DHCPUi.class.getClassLoader();
private static final ClassLoader CL = DhcpUi.class.getClassLoader();
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
protected UiExtensionService uiExtensionService;
......
......@@ -19,8 +19,8 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.collect.ImmutableSet;
import org.onlab.packet.MacAddress;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.dhcp.DHCPService;
import org.onosproject.dhcp.IPAssignment;
import org.onosproject.dhcp.DhcpService;
import org.onosproject.dhcp.IpAssignment;
import org.onosproject.ui.RequestHandler;
import org.onosproject.ui.UiMessageHandler;
import org.onosproject.ui.table.TableModel;
......@@ -72,15 +72,15 @@ public class DhcpViewMessageHandler extends UiMessageHandler {
@Override
protected void populateTable(TableModel tm, ObjectNode payload) {
DHCPService dhcpService = AbstractShellCommand.get(DHCPService.class);
Map<MacAddress, IPAssignment> allocationMap = dhcpService.listMapping();
DhcpService dhcpService = AbstractShellCommand.get(DhcpService.class);
Map<MacAddress, IpAssignment> allocationMap = dhcpService.listMapping();
for (Map.Entry<MacAddress, IPAssignment> entry : allocationMap.entrySet()) {
for (Map.Entry<MacAddress, IpAssignment> entry : allocationMap.entrySet()) {
populateRow(tm.addRow(), entry);
}
}
private void populateRow(TableModel.Row row, Map.Entry<MacAddress, IPAssignment> entry) {
private void populateRow(TableModel.Row row, Map.Entry<MacAddress, IpAssignment> entry) {
if (entry.getValue().leasePeriod() > 0) {
Date now = new Date(entry.getValue().timestamp().getTime() + entry.getValue().leasePeriod());
row.cell(MAC, entry.getKey())
......
......@@ -20,8 +20,8 @@ import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.onlab.packet.Ip4Address;
import org.onlab.packet.MacAddress;
import org.onosproject.dhcp.DHCPService;
import org.onosproject.dhcp.IPAssignment;
import org.onosproject.dhcp.DhcpService;
import org.onosproject.dhcp.IpAssignment;
import org.onosproject.rest.AbstractWebResource;
import javax.ws.rs.Consumes;
......@@ -42,7 +42,7 @@ import java.util.Map;
@Path("dhcp")
public class DHCPWebResource extends AbstractWebResource {
final DHCPService service = get(DHCPService.class);
final DhcpService service = get(DhcpService.class);
/**
* Get DHCP server configuration data.
......@@ -53,7 +53,7 @@ public class DHCPWebResource extends AbstractWebResource {
@GET
@Path("config")
public Response getConfigs() {
DHCPService service = get(DHCPService.class);
DhcpService service = get(DhcpService.class);
ObjectNode node = mapper().createObjectNode()
.put("leaseTime", service.getLeaseTime())
.put("renewalTime", service.getRenewalTime())
......@@ -72,7 +72,7 @@ public class DHCPWebResource extends AbstractWebResource {
public Response listMappings() {
ObjectNode root = mapper().createObjectNode();
final Map<MacAddress, IPAssignment> intents = service.listMapping();
final Map<MacAddress, IpAssignment> intents = service.listMapping();
ArrayNode arrayNode = root.putArray("mappings");
intents.entrySet().forEach(i -> arrayNode.add(mapper().createObjectNode()
.put("mac", i.getKey().toString())
......@@ -124,7 +124,7 @@ public class DHCPWebResource extends AbstractWebResource {
}
}
final Map<MacAddress, IPAssignment> intents = service.listMapping();
final Map<MacAddress, IpAssignment> intents = service.listMapping();
ArrayNode arrayNode = root.putArray("mappings");
intents.entrySet().forEach(i -> arrayNode.add(mapper().createObjectNode()
.put("mac", i.getKey().toString())
......@@ -150,7 +150,7 @@ public class DHCPWebResource extends AbstractWebResource {
if (!service.removeStaticMapping(MacAddress.valueOf(macID))) {
throw new IllegalArgumentException("Static Mapping Removal Failed.");
}
final Map<MacAddress, IPAssignment> intents = service.listMapping();
final Map<MacAddress, IpAssignment> intents = service.listMapping();
ArrayNode arrayNode = root.putArray("mappings");
intents.entrySet().forEach(i -> arrayNode.add(mapper().createObjectNode()
.put("mac", i.getKey().toString())
......
......@@ -17,20 +17,20 @@
<command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
<command>
<action class="org.onosproject.dhcp.cli.DHCPListAllMappings"/>
<action class="org.onosproject.dhcp.cli.DhcpListAllMappings"/>
</command>
<command>
<action class="org.onosproject.dhcp.cli.DHCPLeaseDetails"/>
<action class="org.onosproject.dhcp.cli.DhcpLeaseDetails"/>
</command>
<command>
<action class="org.onosproject.dhcp.cli.DHCPSetStaticMapping"/>
<action class="org.onosproject.dhcp.cli.DhcpSetStaticMapping"/>
<completers>
<ref component-id="macIDCompleter"/>
<ref component-id="freeIPCompleter"/>
</completers>
</command>
<command>
<action class="org.onosproject.dhcp.cli.DHCPRemoveStaticMapping"/>
<action class="org.onosproject.dhcp.cli.DhcpRemoveStaticMapping"/>
<completers>
<ref component-id="macIDCompleter"/>
</completers>
......@@ -38,6 +38,6 @@
</command-bundle>
<bean id="macIDCompleter" class="org.onosproject.dhcp.cli.MacIdCompleter"/>
<bean id="freeIPCompleter" class="org.onosproject.dhcp.cli.FreeIPCompleter"/>
<bean id="freeIPCompleter" class="org.onosproject.dhcp.cli.FreeIpCompleter"/>
</blueprint>
\ No newline at end of file
......
......@@ -31,25 +31,25 @@ import static org.junit.Assert.fail;
/**
* Unit Tests for IPAssignment class.
*/
public class IPAssignmentTest extends TestCase {
public class IpAssignmentTest extends TestCase {
private final Date dateNow = new Date();
private final IPAssignment stats1 = IPAssignment.builder()
private final IpAssignment stats1 = IpAssignment.builder()
.ipAddress(Ip4Address.valueOf("10.10.10.10"))
.leasePeriod(300)
.assignmentStatus(IPAssignment.AssignmentStatus.Option_Expired)
.assignmentStatus(IpAssignment.AssignmentStatus.Option_Expired)
.timestamp(dateNow)
.build();
private final IPAssignment stats2 = IPAssignment.builder()
private final IpAssignment stats2 = IpAssignment.builder()
.ipAddress(Ip4Address.valueOf("10.10.10.10"))
.leasePeriod(300)
.assignmentStatus(IPAssignment.AssignmentStatus.Option_Assigned)
.assignmentStatus(IpAssignment.AssignmentStatus.Option_Assigned)
.timestamp(dateNow)
.build();
private final IPAssignment stats3 = IPAssignment.builder(stats1)
private final IpAssignment stats3 = IpAssignment.builder(stats1)
.build();
/**
......@@ -60,7 +60,7 @@ public class IPAssignmentTest extends TestCase {
assertThat(stats3.ipAddress(), is(Ip4Address.valueOf("10.10.10.10")));
assertThat(stats3.timestamp(), is(dateNow));
assertThat(stats3.leasePeriod(), is(300));
assertThat(stats3.assignmentStatus(), is(IPAssignment.AssignmentStatus.Option_Expired));
assertThat(stats3.assignmentStatus(), is(IpAssignment.AssignmentStatus.Option_Expired));
}
/**
......@@ -88,7 +88,7 @@ public class IPAssignmentTest extends TestCase {
@Test
public void testValidateInputs() {
try {
IPAssignment stats4 = IPAssignment.builder()
IpAssignment stats4 = IpAssignment.builder()
.ipAddress(Ip4Address.valueOf("10.10.10.10"))
.leasePeriod(300)
.build();
......
......@@ -28,8 +28,8 @@ import org.onlab.packet.Ip4Address;
import org.onlab.packet.MacAddress;
import org.onlab.packet.UDP;
import org.onosproject.core.CoreServiceAdapter;
import org.onosproject.dhcp.DHCPStore;
import org.onosproject.dhcp.IPAssignment;
import org.onosproject.dhcp.DhcpStore;
import org.onosproject.dhcp.IpAssignment;
import org.onosproject.net.Host;
import org.onosproject.net.HostId;
import org.onosproject.net.config.NetworkConfigRegistryAdapter;
......@@ -64,9 +64,9 @@ import static org.onosproject.net.NetTestTools.connectPoint;
* Set of tests of the ONOS application component.
*/
public class DHCPManagerTest {
public class DhcpManagerTest {
private DHCPManager dhcpManager;
private DhcpManager dhcpXManager;
protected PacketProcessor packetProcessor;
......@@ -84,20 +84,20 @@ public class DHCPManagerTest {
@Before
public void setUp() {
dhcpManager = new DHCPManager();
dhcpManager.cfgService = new TestNetworkConfigRegistry();
dhcpManager.packetService = new TestPacketService();
dhcpManager.coreService = new TestCoreService();
dhcpManager.dhcpStore = new TestDHCPStore();
dhcpXManager = new DhcpManager();
dhcpXManager.cfgService = new TestNetworkConfigRegistry();
dhcpXManager.packetService = new TestPacketService();
dhcpXManager.coreService = new TestCoreService();
dhcpXManager.dhcpStore = new TestDhcpStore();
hostProviderService = new TestHostProviderService(new TestHostProvider());
dhcpManager.hostProviderService = hostProviderService;
dhcpManager.hostProviderRegistry = new TestHostRegistry();
dhcpManager.activate();
dhcpXManager.hostProviderService = hostProviderService;
dhcpXManager.hostProviderRegistry = new TestHostRegistry();
dhcpXManager.activate();
}
@After
public void tearDown() {
dhcpManager.deactivate();
dhcpXManager.deactivate();
}
/**
......@@ -217,7 +217,7 @@ public class DHCPManagerTest {
/**
* Mocks the DHCPStore.
*/
private final class TestDHCPStore implements DHCPStore {
private final class TestDhcpStore implements DhcpStore {
public void populateIPPoolfromRange(Ip4Address startIP, Ip4Address endIP) {
......@@ -240,11 +240,11 @@ public class DHCPManagerTest {
public void releaseIP(MacAddress macID) {
}
public Map<MacAddress, IPAssignment> listMapping() {
Map<MacAddress, IPAssignment> map = new HashMap<>();
IPAssignment assignment = IPAssignment.builder()
public Map<MacAddress, IpAssignment> listMapping() {
Map<MacAddress, IpAssignment> map = new HashMap<>();
IpAssignment assignment = IpAssignment.builder()
.ipAddress(Ip4Address.valueOf(EXPECTED_IP))
.assignmentStatus(IPAssignment.AssignmentStatus.Option_Assigned)
.assignmentStatus(IpAssignment.AssignmentStatus.Option_Assigned)
.leasePeriod(300)
.timestamp(new Date())
.build();
......