Merge pull request #769 from jingyuanliang/main
host-local: remove unused Release(ip) from type Store interface
This commit is contained in:
commit
fcf14d39fd
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user