host-local: remove unused Release(ip) from type Store interface

Signed-off-by: Jingyuan Liang <jingyuanliang@google.com>
This commit is contained in:
Jingyuan Liang 2022-09-06 19:56:56 +00:00
parent 8c3664b2b1
commit 87c3643d3c
3 changed files with 0 additions and 10 deletions

View File

@ -94,10 +94,6 @@ func (s *Store) LastReservedIP(rangeID string) (net.IP, error) {
return net.ParseIP(string(data)), nil return net.ParseIP(string(data)), nil
} }
func (s *Store) Release(ip net.IP) error {
return os.Remove(GetEscapedPath(s.dataDir, ip.String()))
}
func (s *Store) FindByKey(id string, ifname string, match string) (bool, error) { func (s *Store) FindByKey(id string, ifname string, match string) (bool, error) {
found := false found := false

View File

@ -22,7 +22,6 @@ type Store interface {
Close() error Close() error
Reserve(id string, ifname string, ip net.IP, rangeID string) (bool, error) Reserve(id string, ifname string, ip net.IP, rangeID string) (bool, error)
LastReservedIP(rangeID string) (net.IP, error) LastReservedIP(rangeID string) (net.IP, error)
Release(ip net.IP) error
ReleaseByID(id string, ifname string) error ReleaseByID(id string, ifname string) error
GetByID(id string, ifname string) []net.IP GetByID(id string, ifname string) []net.IP
} }

View File

@ -63,11 +63,6 @@ func (s *FakeStore) LastReservedIP(rangeID string) (net.IP, error) {
return ip, nil return ip, nil
} }
func (s *FakeStore) Release(ip net.IP) error {
delete(s.ipMap, ip.String())
return nil
}
func (s *FakeStore) ReleaseByID(id string, ifname string) error { func (s *FakeStore) ReleaseByID(id string, ifname string) error {
toDelete := []string{} toDelete := []string{}
for k, v := range s.ipMap { for k, v := range s.ipMap {