Remove all address bindings code from Host subsystem.

This has been superseded by the InterfaceService.

Change-Id: I8aae4cfe00752a84e545a1030c199aea8b59da38
diff --git a/core/api/src/main/java/org/onosproject/net/host/HostAdminService.java b/core/api/src/main/java/org/onosproject/net/host/HostAdminService.java
index d620fed..8676e46 100644
--- a/core/api/src/main/java/org/onosproject/net/host/HostAdminService.java
+++ b/core/api/src/main/java/org/onosproject/net/host/HostAdminService.java
@@ -15,7 +15,6 @@
  */
 package org.onosproject.net.host;
 
-import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.HostId;
 
 /**
@@ -30,37 +29,4 @@
      */
     void removeHost(HostId hostId);
 
-    /**
-     * Binds IP and MAC addresses to the given connection point.
-     * <p>
-     * The addresses are added to the set of addresses already bound to the
-     * connection point.
-     *
-     * @param addresses address object containing addresses to add and the port
-     * to add them to
-     * @deprecated in Drake release: address info now stored in InterfaceService
-     */
-    @Deprecated
-    void bindAddressesToPort(PortAddresses addresses);
-
-    /**
-     * Removes the addresses contained in the given PortAddresses object from
-     * the set of addresses bound to the port.
-     *
-     * @param portAddresses set of addresses to remove and port to remove them
-     * from
-     * @deprecated in Drake release: address info now stored in InterfaceService
-     */
-    @Deprecated
-    void unbindAddressesFromPort(PortAddresses portAddresses);
-
-    /**
-     * Removes all address information for the given connection point.
-     *
-     * @param connectPoint the connection point to remove address information
-     * @deprecated in Drake release: address info now stored in InterfaceService
-     */
-    @Deprecated
-    void clearAddresses(ConnectPoint connectPoint);
-
 }
diff --git a/core/api/src/main/java/org/onosproject/net/host/HostService.java b/core/api/src/main/java/org/onosproject/net/host/HostService.java
index be114f0..3901215 100644
--- a/core/api/src/main/java/org/onosproject/net/host/HostService.java
+++ b/core/api/src/main/java/org/onosproject/net/host/HostService.java
@@ -123,24 +123,4 @@
      */
     void requestMac(IpAddress ip);
 
-    /**
-     * Returns the addresses information for all connection points.
-     *
-     * @return the set of address bindings for all connection points
-     * @deprecated in Drake release: use InterfaceService instead
-     */
-    @Deprecated
-    Set<PortAddresses> getAddressBindings();
-
-    /**
-     * Retrieves the addresses that have been bound to the given connection
-     * point.
-     *
-     * @param connectPoint the connection point to retrieve address bindings for
-     * @return addresses bound to the port
-     * @deprecated in Drake release: use InterfaceService instead
-     */
-    @Deprecated
-    Set<PortAddresses> getAddressBindingsForPort(ConnectPoint connectPoint);
-
 }
diff --git a/core/api/src/main/java/org/onosproject/net/host/HostStore.java b/core/api/src/main/java/org/onosproject/net/host/HostStore.java
index ca11a94..35a2a8b 100644
--- a/core/api/src/main/java/org/onosproject/net/host/HostStore.java
+++ b/core/api/src/main/java/org/onosproject/net/host/HostStore.java
@@ -115,53 +115,4 @@
      */
     Set<Host> getConnectedHosts(DeviceId deviceId);
 
-    /**
-     * Updates the address information for a given port. The given address
-     * information is added to any previously held information for the port.
-     *
-     * @param addresses the port and address information
-     * @deprecated in Drake release: address info now stored in InterfaceService
-     */
-    @Deprecated
-    void updateAddressBindings(PortAddresses addresses);
-
-    /**
-     * Removes the given addresses from the set of address information held for
-     * a port.
-     *
-     * @param addresses the port and address information
-     * @deprecated in Drake release: address info now stored in InterfaceService
-     */
-    @Deprecated
-    void removeAddressBindings(PortAddresses addresses);
-
-    /**
-     * Removes any previously stored address information for a given connection
-     * point.
-     *
-     * @param connectPoint the connection point
-     * @deprecated in Drake release: address info now stored in InterfaceService
-     */
-    @Deprecated
-    void clearAddressBindings(ConnectPoint connectPoint);
-
-    /**
-     * Returns the address bindings stored for all connection points.
-     *
-     * @return the set of address bindings
-     * @deprecated in Drake release: address info now stored in InterfaceService
-     */
-    @Deprecated
-    Set<PortAddresses> getAddressBindings();
-
-    /**
-     * Returns the address bindings for a particular connection point.
-     *
-     * @param connectPoint the connection point to return address information
-     *                     for
-     * @return address information for the connection point
-     * @deprecated in Drake release: address info now stored in InterfaceService
-     */
-    @Deprecated
-    Set<PortAddresses> getAddressBindingsForPort(ConnectPoint connectPoint);
 }
diff --git a/core/api/src/main/java/org/onosproject/net/host/PortAddresses.java b/core/api/src/main/java/org/onosproject/net/host/PortAddresses.java
deleted file mode 100644
index 74f22ae..0000000
--- a/core/api/src/main/java/org/onosproject/net/host/PortAddresses.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright 2014-2015 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.net.host;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Objects;
-import java.util.Set;
-
-import org.onlab.packet.MacAddress;
-import org.onlab.packet.VlanId;
-import org.onosproject.net.ConnectPoint;
-
-import com.google.common.base.MoreObjects;
-
-/**
- * Represents address information bound to a port.
- */
-public final class PortAddresses {
-
-    private final ConnectPoint connectPoint;
-    private final Set<InterfaceIpAddress> ipAddresses;
-    private final MacAddress macAddress;
-    private final VlanId vlan;
-
-    /**
-     * Constructs a PortAddresses object for the given connection point, with a
-     * set of IP addresses and a MAC address. Both address parameters are
-     * optional and can be set to null.
-     *
-     * @param connectPoint the connection point these addresses are for
-     * @param ipAddresses a set of interface IP addresses
-     * @param mac a MAC address
-     * @param vlan a VLAN ID
-     */
-    public PortAddresses(ConnectPoint connectPoint,
-            Set<InterfaceIpAddress> ipAddresses, MacAddress mac, VlanId vlan) {
-        this.connectPoint = connectPoint;
-        this.ipAddresses = (ipAddresses == null) ?
-            Collections.<InterfaceIpAddress>emptySet()
-            : new HashSet<>(ipAddresses);
-        this.macAddress = mac;
-        this.vlan = vlan;
-    }
-
-    /**
-     * Returns the connection point this address information is bound to.
-     *
-     * @return the connection point
-     */
-    public ConnectPoint connectPoint() {
-        return connectPoint;
-    }
-
-    /**
-     * Returns the set of interface IP addresses.
-     *
-     * @return the interface IP addresses
-     */
-    public Set<InterfaceIpAddress> ipAddresses() {
-        return ipAddresses;
-    }
-
-    /**
-     * Returns the MAC address.
-     *
-     * @return the MAC address
-     */
-    public MacAddress mac() {
-        return macAddress;
-    }
-
-    /**
-     * Returns the VLAN ID.
-     *
-     * @return the VLAN ID
-     */
-    public VlanId vlan() {
-        return vlan;
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (this == other) {
-            return true;
-        }
-
-        if (!(other instanceof PortAddresses)) {
-            return false;
-        }
-
-        PortAddresses otherPa = (PortAddresses) other;
-
-        return Objects.equals(this.connectPoint, otherPa.connectPoint)
-                && Objects.equals(this.ipAddresses, otherPa.ipAddresses)
-                && Objects.equals(this.macAddress, otherPa.macAddress)
-                && Objects.equals(this.vlan, otherPa.vlan);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(connectPoint, ipAddresses, macAddress, vlan);
-    }
-
-    @Override
-    public String toString() {
-        return MoreObjects.toStringHelper(getClass())
-            .add("connect-point", connectPoint)
-            .add("ip-addresses", ipAddresses)
-            .add("mac-address", macAddress)
-            .add("vlan", vlan)
-            .toString();
-    }
-}
diff --git a/core/api/src/test/java/org/onosproject/net/host/HostServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/host/HostServiceAdapter.java
index 226dad0..0fad54a 100644
--- a/core/api/src/test/java/org/onosproject/net/host/HostServiceAdapter.java
+++ b/core/api/src/test/java/org/onosproject/net/host/HostServiceAdapter.java
@@ -15,15 +15,15 @@
  */
 package org.onosproject.net.host;
 
-import java.util.Set;
-
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+import org.onlab.packet.VlanId;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.Host;
 import org.onosproject.net.HostId;
-import org.onlab.packet.IpAddress;
-import org.onlab.packet.MacAddress;
-import org.onlab.packet.VlanId;
+
+import java.util.Set;
 
 /**
  * Test adapter for host service.
@@ -89,14 +89,4 @@
     public void removeListener(HostListener listener) {
     }
 
-    @Override
-    public Set<PortAddresses> getAddressBindings() {
-        return null;
-    }
-
-    @Override
-    public Set<PortAddresses> getAddressBindingsForPort(ConnectPoint connectPoint) {
-        return null;
-    }
-
 }
diff --git a/core/api/src/test/java/org/onosproject/net/host/PortAddressesTest.java b/core/api/src/test/java/org/onosproject/net/host/PortAddressesTest.java
deleted file mode 100644
index 7c10cd1..0000000
--- a/core/api/src/test/java/org/onosproject/net/host/PortAddressesTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright 2015 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.net.host;
-
-import java.util.Set;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.onlab.packet.IpAddress;
-import org.onlab.packet.IpPrefix;
-import org.onlab.packet.MacAddress;
-import org.onlab.packet.VlanId;
-import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.NetTestTools;
-
-import static org.hamcrest.Matchers.is;
-import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.common.testing.EqualsTester;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-/**
- * Unit tests for port addresses class.
- */
-public class PortAddressesTest {
-
-    PortAddresses addresses1;
-    PortAddresses sameAsAddresses1;
-    PortAddresses addresses2;
-    PortAddresses addresses3;
-
-    private static final ConnectPoint CONNECT_POINT1 =
-            NetTestTools.connectPoint("cp1", 1);
-    private static final IpAddress IP_ADDRESS1 = IpAddress.valueOf("1.2.3.4");
-    private static final IpPrefix SUBNET_ADDRESS1 =
-            IpPrefix.valueOf("1.2.0.0/16");
-    private static final InterfaceIpAddress INTERFACE_ADDRESS_1 =
-            new InterfaceIpAddress(IP_ADDRESS1, SUBNET_ADDRESS1);
-
-    private static final ConnectPoint CONNECT_POINT2 =
-            NetTestTools.connectPoint("cp2", 1);
-    private static final IpAddress IP_ADDRESS2 = IpAddress.valueOf("1.2.3.5");
-    private static final IpPrefix SUBNET_ADDRESS2 =
-            IpPrefix.valueOf("1.3.0.0/16");
-    private static final InterfaceIpAddress INTERFACE_ADDRESS_2 =
-            new InterfaceIpAddress(IP_ADDRESS2, SUBNET_ADDRESS2);
-
-    Set<InterfaceIpAddress> ipAddresses;
-
-
-    /**
-     * Initializes local data used by all test cases.
-     */
-    @Before
-    public void setUpAddresses() {
-        ipAddresses = ImmutableSet.of(INTERFACE_ADDRESS_1,
-                INTERFACE_ADDRESS_2);
-        addresses1 = new PortAddresses(CONNECT_POINT1, ipAddresses,
-                MacAddress.BROADCAST, VlanId.NONE);
-        sameAsAddresses1 = new PortAddresses(CONNECT_POINT1, ipAddresses,
-                MacAddress.BROADCAST, VlanId.NONE);
-        addresses2 = new PortAddresses(CONNECT_POINT2, ipAddresses,
-                MacAddress.BROADCAST, VlanId.NONE);
-        addresses3 = new PortAddresses(CONNECT_POINT2, ipAddresses,
-                MacAddress.ZERO, VlanId.NONE);
-    }
-
-    /**
-     * Checks that the PortAddresses class is immutable.
-     */
-    @Test
-    public void testImmutability() {
-        assertThatClassIsImmutable(PortAddresses.class);
-    }
-
-    /**
-     * Checks the operation of the equals(), hash() and toString()
-     * methods.
-     */
-    @Test
-    public void testEquals() {
-        new EqualsTester()
-                .addEqualityGroup(addresses1, sameAsAddresses1)
-                .addEqualityGroup(addresses2)
-                .addEqualityGroup(addresses3)
-                .testEquals();
-    }
-
-    /**
-     * Tests that object are created correctly.
-     */
-    @Test
-    public void testConstruction() {
-        assertThat(addresses1.mac(), is(MacAddress.BROADCAST));
-        assertThat(addresses1.connectPoint(), is(CONNECT_POINT1));
-        assertThat(addresses1.ipAddresses(), is(ipAddresses));
-        assertThat(addresses1.vlan(), is(VlanId.NONE));
-    }
-}
diff --git a/core/common/src/test/java/org/onosproject/store/trivial/SimpleHostStore.java b/core/common/src/test/java/org/onosproject/store/trivial/SimpleHostStore.java
index f5604f6..7095d7b 100644
--- a/core/common/src/test/java/org/onosproject/store/trivial/SimpleHostStore.java
+++ b/core/common/src/test/java/org/onosproject/store/trivial/SimpleHostStore.java
@@ -15,23 +15,16 @@
  */
 package org.onosproject.store.trivial;
 
-import static org.onosproject.net.DefaultAnnotations.merge;
-import static org.onosproject.net.host.HostEvent.Type.HOST_ADDED;
-import static org.onosproject.net.host.HostEvent.Type.HOST_MOVED;
-import static org.onosproject.net.host.HostEvent.Type.HOST_REMOVED;
-import static org.onosproject.net.host.HostEvent.Type.HOST_UPDATED;
-import static org.slf4j.LoggerFactory.getLogger;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
+import com.google.common.collect.HashMultimap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Multimap;
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Deactivate;
 import org.apache.felix.scr.annotations.Service;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+import org.onlab.packet.VlanId;
 import org.onosproject.net.Annotations;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.DefaultAnnotations;
@@ -44,19 +37,21 @@
 import org.onosproject.net.host.HostEvent;
 import org.onosproject.net.host.HostStore;
 import org.onosproject.net.host.HostStoreDelegate;
-import org.onosproject.net.host.PortAddresses;
 import org.onosproject.net.provider.ProviderId;
 import org.onosproject.store.AbstractStore;
-import org.onlab.packet.IpAddress;
-import org.onlab.packet.MacAddress;
-import org.onlab.packet.VlanId;
 import org.slf4j.Logger;
 
-import com.google.common.collect.HashMultimap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Multimap;
-import com.google.common.collect.Multimaps;
-import com.google.common.collect.SetMultimap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import static org.onosproject.net.DefaultAnnotations.merge;
+import static org.onosproject.net.host.HostEvent.Type.HOST_ADDED;
+import static org.onosproject.net.host.HostEvent.Type.HOST_MOVED;
+import static org.onosproject.net.host.HostEvent.Type.HOST_REMOVED;
+import static org.onosproject.net.host.HostEvent.Type.HOST_UPDATED;
+import static org.slf4j.LoggerFactory.getLogger;
 
 // TODO: multi-provider, annotation not supported.
 /**
@@ -77,10 +72,6 @@
     // Hosts tracked by their location
     private final Multimap<ConnectPoint, Host> locations = HashMultimap.create();
 
-    private final SetMultimap<ConnectPoint, PortAddresses> portAddresses =
-            Multimaps.synchronizedSetMultimap(
-                    HashMultimap.<ConnectPoint, PortAddresses>create());
-
     @Activate
     public void activate() {
         log.info("Started");
@@ -224,41 +215,6 @@
         return hostset;
     }
 
-    @Override
-    public void updateAddressBindings(PortAddresses addresses) {
-        portAddresses.put(addresses.connectPoint(), addresses);
-    }
-
-    @Override
-    public void removeAddressBindings(PortAddresses addresses) {
-        portAddresses.remove(addresses.connectPoint(), addresses);
-    }
-
-    @Override
-    public void clearAddressBindings(ConnectPoint connectPoint) {
-        portAddresses.removeAll(connectPoint);
-    }
-
-    @Override
-    public Set<PortAddresses> getAddressBindings() {
-        synchronized (portAddresses) {
-            return ImmutableSet.copyOf(portAddresses.values());
-        }
-    }
-
-    @Override
-    public Set<PortAddresses> getAddressBindingsForPort(ConnectPoint connectPoint) {
-        synchronized (portAddresses) {
-            Set<PortAddresses> addresses = portAddresses.get(connectPoint);
-
-            if (addresses == null) {
-                return Collections.emptySet();
-            } else {
-                return ImmutableSet.copyOf(addresses);
-            }
-        }
-    }
-
     // Auxiliary extension to allow location to mutate.
     private static final class StoredHost extends DefaultHost {
         private HostLocation location;
diff --git a/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java b/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java
index 26b96eb..9adba01 100644
--- a/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java
+++ b/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java
@@ -46,7 +46,6 @@
 import org.onosproject.net.host.HostService;
 import org.onosproject.net.host.HostStore;
 import org.onosproject.net.host.HostStoreDelegate;
-import org.onosproject.net.host.PortAddresses;
 import org.onosproject.net.packet.PacketService;
 import org.onosproject.net.provider.AbstractProviderService;
 import org.slf4j.Logger;
@@ -199,33 +198,6 @@
         }
     }
 
-    @Override
-    public void bindAddressesToPort(PortAddresses addresses) {
-        store.updateAddressBindings(addresses);
-    }
-
-    @Override
-    public void unbindAddressesFromPort(PortAddresses portAddresses) {
-        store.removeAddressBindings(portAddresses);
-    }
-
-    @Override
-    public void clearAddresses(ConnectPoint connectPoint) {
-        store.clearAddressBindings(connectPoint);
-    }
-
-    @Override
-    public Set<PortAddresses> getAddressBindings() {
-        checkPermission(HOST_READ);
-        return store.getAddressBindings();
-    }
-
-    @Override
-    public Set<PortAddresses> getAddressBindingsForPort(ConnectPoint connectPoint) {
-        checkPermission(HOST_READ);
-        return store.getAddressBindingsForPort(connectPoint);
-    }
-
     // Personalized host provider service issued to the supplied provider.
     private class InternalHostProviderService
             extends AbstractProviderService<HostProvider>
diff --git a/core/net/src/test/java/org/onosproject/net/host/impl/HostManagerTest.java b/core/net/src/test/java/org/onosproject/net/host/impl/HostManagerTest.java
index dbb807f..92c6c93 100644
--- a/core/net/src/test/java/org/onosproject/net/host/impl/HostManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/host/impl/HostManagerTest.java
@@ -15,6 +15,36 @@
  */
 package org.onosproject.net.host.impl;
 
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+import org.onlab.packet.VlanId;
+import org.onosproject.common.event.impl.TestEventDispatcher;
+import org.onosproject.event.Event;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.Host;
+import org.onosproject.net.HostId;
+import org.onosproject.net.HostLocation;
+import org.onosproject.net.PortNumber;
+import org.onosproject.net.config.NetworkConfigServiceAdapter;
+import org.onosproject.net.host.DefaultHostDescription;
+import org.onosproject.net.host.HostDescription;
+import org.onosproject.net.host.HostEvent;
+import org.onosproject.net.host.HostListener;
+import org.onosproject.net.host.HostProvider;
+import org.onosproject.net.host.HostProviderRegistry;
+import org.onosproject.net.host.HostProviderService;
+import org.onosproject.net.provider.AbstractProvider;
+import org.onosproject.net.provider.ProviderId;
+import org.onosproject.store.trivial.SimpleHostStore;
+
+import java.util.List;
+import java.util.Set;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -26,41 +56,6 @@
 import static org.onosproject.net.host.HostEvent.Type.HOST_REMOVED;
 import static org.onosproject.net.host.HostEvent.Type.HOST_UPDATED;
 
-import java.util.List;
-import java.util.Set;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.onlab.packet.IpAddress;
-import org.onlab.packet.IpPrefix;
-import org.onlab.packet.MacAddress;
-import org.onlab.packet.VlanId;
-import org.onosproject.event.Event;
-import org.onosproject.common.event.impl.TestEventDispatcher;
-import org.onosproject.net.config.NetworkConfigServiceAdapter;
-import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.DeviceId;
-import org.onosproject.net.Host;
-import org.onosproject.net.HostId;
-import org.onosproject.net.HostLocation;
-import org.onosproject.net.PortNumber;
-import org.onosproject.net.host.DefaultHostDescription;
-import org.onosproject.net.host.HostDescription;
-import org.onosproject.net.host.HostEvent;
-import org.onosproject.net.host.HostListener;
-import org.onosproject.net.host.HostProvider;
-import org.onosproject.net.host.HostProviderRegistry;
-import org.onosproject.net.host.HostProviderService;
-import org.onosproject.net.host.InterfaceIpAddress;
-import org.onosproject.net.host.PortAddresses;
-import org.onosproject.net.provider.AbstractProvider;
-import org.onosproject.net.provider.ProviderId;
-import org.onosproject.store.trivial.SimpleHostStore;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-
 /**
  * Test codifying the host service & host provider service contracts.
  */
@@ -90,27 +85,6 @@
     private static final PortNumber P2 = PortNumber.portNumber(200);
     private static final HostLocation LOC1 = new HostLocation(DID1, P1, 123L);
     private static final HostLocation LOC2 = new HostLocation(DID1, P2, 123L);
-    private static final ConnectPoint CP1 = new ConnectPoint(DID1, P1);
-    private static final ConnectPoint CP2 = new ConnectPoint(DID2, P2);
-
-    private static final InterfaceIpAddress IA1 =
-        new InterfaceIpAddress(IpAddress.valueOf("10.1.1.1"),
-                               IpPrefix.valueOf("10.1.1.0/24"));
-    private static final InterfaceIpAddress IA2 =
-        new InterfaceIpAddress(IpAddress.valueOf("10.2.2.2"),
-                               IpPrefix.valueOf("10.2.0.0/16"));
-    private static final InterfaceIpAddress IA3 =
-        new InterfaceIpAddress(IpAddress.valueOf("10.3.3.3"),
-                               IpPrefix.valueOf("10.3.3.0/24"));
-    private static final InterfaceIpAddress IA4 =
-        new InterfaceIpAddress(IpAddress.valueOf("2001:100::1"),
-                               IpPrefix.valueOf("2001:100::/56"));
-    private static final InterfaceIpAddress IA5 =
-        new InterfaceIpAddress(IpAddress.valueOf("2001:200::1"),
-                               IpPrefix.valueOf("2001:200::/48"));
-    private static final InterfaceIpAddress IA6 =
-        new InterfaceIpAddress(IpAddress.valueOf("2001:300::1"),
-                               IpPrefix.valueOf("2001:300::/56"));
 
     private HostManager mgr;
 
@@ -290,240 +264,6 @@
 
     }
 
-    @Test
-    public void bindAddressesToPort() {
-        PortAddresses add1 =
-            new PortAddresses(CP1, Sets.newHashSet(IA1, IA2), MAC1, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add1);
-        Set<PortAddresses> storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertEquals(1, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-
-        // Add some more addresses and check that they're added correctly
-        PortAddresses add2 =
-            new PortAddresses(CP1, Sets.newHashSet(IA3),  null,
-                              VlanId.vlanId((short) 2));
-
-        mgr.bindAddressesToPort(add2);
-        storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertEquals(2, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-        assertTrue(storedAddresses.contains(add2));
-
-        PortAddresses add3 = new PortAddresses(CP1, null, MAC2, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add3);
-        storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertEquals(3, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-        assertTrue(storedAddresses.contains(add2));
-        assertTrue(storedAddresses.contains(add3));
-    }
-
-    @Test
-    public void bindAddressesToPortIPv6() {
-        PortAddresses add1 =
-                new PortAddresses(CP1, Sets.newHashSet(IA4, IA5), MAC3, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add1);
-        Set<PortAddresses> storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertEquals(1, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-
-        // Add some more addresses and check that they're added correctly
-        PortAddresses add2 =
-                new PortAddresses(CP1, Sets.newHashSet(IA6),  null,
-                        VlanId.vlanId((short) 2));
-
-        mgr.bindAddressesToPort(add2);
-        storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertEquals(2, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-        assertTrue(storedAddresses.contains(add2));
-
-        PortAddresses add3 = new PortAddresses(CP1, null, MAC4, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add3);
-        storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertEquals(3, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-        assertTrue(storedAddresses.contains(add2));
-        assertTrue(storedAddresses.contains(add3));
-    }
-
-    @Test
-    public void unbindAddressesFromPort() {
-        PortAddresses add1 =
-            new PortAddresses(CP1, Sets.newHashSet(IA1, IA2), MAC1, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add1);
-        Set<PortAddresses> storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertEquals(1, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-
-        PortAddresses rem1 =
-            new PortAddresses(CP1, Sets.newHashSet(IA1), null, VlanId.NONE);
-
-        mgr.unbindAddressesFromPort(rem1);
-        storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        // It shouldn't have been removed because it didn't match the originally
-        // submitted address object
-        assertEquals(1, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-
-        mgr.unbindAddressesFromPort(add1);
-        storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertTrue(storedAddresses.isEmpty());
-    }
-
-    @Test
-    public void unbindAddressesFromPortIPv6() {
-        PortAddresses add1 =
-                new PortAddresses(CP1, Sets.newHashSet(IA4, IA5), MAC3, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add1);
-        Set<PortAddresses> storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertEquals(1, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-
-        PortAddresses rem1 =
-                new PortAddresses(CP1, Sets.newHashSet(IA4), null, VlanId.NONE);
-
-        mgr.unbindAddressesFromPort(rem1);
-        storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        // It shouldn't have been removed because it didn't match the originally
-        // submitted address object
-        assertEquals(1, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-
-        mgr.unbindAddressesFromPort(add1);
-        storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertTrue(storedAddresses.isEmpty());
-    }
-
-    @Test
-    public void clearAddresses() {
-        PortAddresses add1 =
-            new PortAddresses(CP1, Sets.newHashSet(IA1, IA2), MAC1, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add1);
-        Set<PortAddresses> storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertEquals(1, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-
-        mgr.clearAddresses(CP1);
-        storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertTrue(storedAddresses.isEmpty());
-    }
-
-    @Test
-    public void clearAddressesIPv6() {
-        PortAddresses add1 =
-                new PortAddresses(CP1, Sets.newHashSet(IA4, IA5), MAC3, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add1);
-        Set<PortAddresses> storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertEquals(1, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-
-        mgr.clearAddresses(CP1);
-        storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertTrue(storedAddresses.isEmpty());
-    }
-
-    @Test
-    public void getAddressBindingsForPort() {
-        PortAddresses add1 =
-            new PortAddresses(CP1, Sets.newHashSet(IA1, IA2), MAC1, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add1);
-        Set<PortAddresses> storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertEquals(1, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-    }
-
-    @Test
-    public void getAddressBindingsForPortIPv6() {
-        PortAddresses add1 =
-                new PortAddresses(CP1, Sets.newHashSet(IA4, IA5), MAC3, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add1);
-        Set<PortAddresses> storedAddresses = mgr.getAddressBindingsForPort(CP1);
-
-        assertEquals(1, storedAddresses.size());
-        assertTrue(storedAddresses.contains(add1));
-    }
-
-    @Test
-    public void getAddressBindings() {
-        Set<PortAddresses> storedAddresses = mgr.getAddressBindings();
-
-        assertTrue(storedAddresses.isEmpty());
-
-        PortAddresses add1 =
-            new PortAddresses(CP1, Sets.newHashSet(IA1, IA2), MAC1, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add1);
-
-        storedAddresses = mgr.getAddressBindings();
-
-        assertTrue(storedAddresses.size() == 1);
-
-        PortAddresses add2 =
-            new PortAddresses(CP2, Sets.newHashSet(IA3), MAC2, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add2);
-
-        storedAddresses = mgr.getAddressBindings();
-
-        assertTrue(storedAddresses.size() == 2);
-        assertTrue(storedAddresses.equals(Sets.newHashSet(add1, add2)));
-    }
-
-    @Test
-    public void getAddressBindingsIPv6() {
-        Set<PortAddresses> storedAddresses = mgr.getAddressBindings();
-
-        assertTrue(storedAddresses.isEmpty());
-
-        PortAddresses add1 =
-                new PortAddresses(CP1, Sets.newHashSet(IA4, IA5), MAC3, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add1);
-
-        storedAddresses = mgr.getAddressBindings();
-
-        assertTrue(storedAddresses.size() == 1);
-
-        PortAddresses add2 =
-                new PortAddresses(CP2, Sets.newHashSet(IA5), MAC4, VlanId.NONE);
-
-        mgr.bindAddressesToPort(add2);
-
-        storedAddresses = mgr.getAddressBindings();
-
-        assertTrue(storedAddresses.size() == 2);
-        assertTrue(storedAddresses.equals(Sets.newHashSet(add1, add2)));
-    }
-
     private class TestNetworkConfigService extends NetworkConfigServiceAdapter {
     }
 }
diff --git a/core/net/src/test/java/org/onosproject/net/host/impl/HostMonitorTest.java b/core/net/src/test/java/org/onosproject/net/host/impl/HostMonitorTest.java
index 4385ac2..d167197 100644
--- a/core/net/src/test/java/org/onosproject/net/host/impl/HostMonitorTest.java
+++ b/core/net/src/test/java/org/onosproject/net/host/impl/HostMonitorTest.java
@@ -43,7 +43,6 @@
 import org.onosproject.net.flow.instructions.Instructions.OutputInstruction;
 import org.onosproject.net.host.HostProvider;
 import org.onosproject.net.host.InterfaceIpAddress;
-import org.onosproject.net.host.PortAddresses;
 import org.onosproject.net.packet.OutboundPacket;
 import org.onosproject.net.packet.PacketServiceAdapter;
 import org.onosproject.net.provider.ProviderId;
@@ -140,8 +139,6 @@
         deviceService.addDevice(device, Collections.singleton(port));
 
         ConnectPoint cp = new ConnectPoint(devId, portNum);
-        PortAddresses pa =
-                new PortAddresses(cp, Collections.singleton(IA1), sourceMac, VlanId.NONE);
 
         expect(hostManager.getHostsByIp(TARGET_IP_ADDR))
                 .andReturn(Collections.emptySet()).anyTimes();
@@ -211,9 +208,6 @@
         deviceService.addDevice(device, Collections.singleton(port));
 
         ConnectPoint cp = new ConnectPoint(devId, portNum);
-        PortAddresses pa =
-                new PortAddresses(cp, Collections.singleton(IA1), sourceMac,
-                                  VlanId.vlanId(vlan));
 
         expect(hostManager.getHostsByIp(TARGET_IP_ADDR))
                 .andReturn(Collections.emptySet()).anyTimes();
diff --git a/core/store/dist/src/main/java/org/onosproject/store/host/impl/ECHostStore.java b/core/store/dist/src/main/java/org/onosproject/store/host/impl/ECHostStore.java
index e833b2d..46c5fa2 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/host/impl/ECHostStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/host/impl/ECHostStore.java
@@ -25,7 +25,6 @@
 import static org.slf4j.LoggerFactory.getLogger;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.Objects;
 import java.util.Set;
 import java.util.function.Predicate;
@@ -52,7 +51,6 @@
 import org.onosproject.net.host.HostEvent;
 import org.onosproject.net.host.HostStore;
 import org.onosproject.net.host.HostStoreDelegate;
-import org.onosproject.net.host.PortAddresses;
 import org.onosproject.net.host.HostEvent.Type;
 import org.onosproject.net.provider.ProviderId;
 import org.onosproject.store.AbstractStore;
@@ -93,10 +91,6 @@
             Multimaps.synchronizedSetMultimap(
                     HashMultimap.<ConnectPoint, Host>create());
 
-    private final SetMultimap<ConnectPoint, PortAddresses> portAddresses =
-            Multimaps.synchronizedSetMultimap(
-                    HashMultimap.<ConnectPoint, PortAddresses>create());
-
     private EventuallyConsistentMap<HostId, DefaultHost> hosts;
 
     private EventuallyConsistentMapListener<HostId, DefaultHost> hostLocationTracker =
@@ -123,7 +117,6 @@
         hosts.removeListener(hostLocationTracker);
         hosts.destroy();
         locations.clear();
-        portAddresses.clear();
 
         log.info("Stopped");
     }
@@ -199,34 +192,6 @@
                 .collect(Collectors.toSet());
     }
 
-    @Override
-    public void updateAddressBindings(PortAddresses addresses) {
-        portAddresses.put(addresses.connectPoint(), addresses);
-    }
-
-    @Override
-    public void removeAddressBindings(PortAddresses addresses) {
-        portAddresses.remove(addresses.connectPoint(), addresses);
-    }
-
-    @Override
-    public void clearAddressBindings(ConnectPoint connectPoint) {
-        portAddresses.removeAll(connectPoint);
-    }
-
-    @Override
-    public Set<PortAddresses> getAddressBindings() {
-        return ImmutableSet.copyOf(portAddresses.values());
-    }
-
-    @Override
-    public Set<PortAddresses> getAddressBindingsForPort(ConnectPoint connectPoint) {
-        synchronized (portAddresses) {
-            Set<PortAddresses> addresses = portAddresses.get(connectPoint);
-            return addresses == null ? Collections.emptySet() : ImmutableSet.copyOf(addresses);
-        }
-    }
-
     private Set<Host> filter(Collection<DefaultHost> collection, Predicate<DefaultHost> predicate) {
         return collection.stream().filter(predicate).collect(Collectors.toSet());
     }