Obtain ifname from CmdArgs and pass to backend Add ifname to second line of file tracking the IP address used by ContainerID

Update host-local tests to use ifname along with ContainerID
in store file

Signed-off-by: Michael Cambria <mcambria@redhat.com>
This commit is contained in:
Michael Cambria
2018-09-10 16:00:47 -04:00
parent 726759b29b
commit 1e8f9525a6
7 changed files with 36 additions and 36 deletions

View File

@ -45,7 +45,7 @@ func (s *FakeStore) Close() error {
return nil
}
func (s *FakeStore) Reserve(id string, ip net.IP, rangeID string) (bool, error) {
func (s *FakeStore) Reserve(id string, ifname string, ip net.IP, rangeID string) (bool, error) {
key := ip.String()
if _, ok := s.ipMap[key]; !ok {
s.ipMap[key] = id
@ -68,7 +68,7 @@ func (s *FakeStore) Release(ip net.IP) error {
return nil
}
func (s *FakeStore) ReleaseByID(id string) error {
func (s *FakeStore) ReleaseByID(id string, ifname string) error {
toDelete := []string{}
for k, v := range s.ipMap {
if v == id {