Skip to content

Commit

Permalink
network: drop NetworkInterface.Unplug
Browse files Browse the repository at this point in the history
This method is doing nothing and used by nobody. In the current moment
in time, it only generates mental burden on the reader of the code. Let
us drop it until we support hot-unplug, one day.

Signed-off-by: Dan Kenigsberg <[email protected]>
  • Loading branch information
dankenigsberg committed Jan 19, 2021
1 parent 618a73b commit c0481de
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
8 changes: 0 additions & 8 deletions pkg/virt-launcher/virtwrap/network/generated_mock_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,3 @@ func (_m *MockNetworkInterface) PlugPhase2(vmi *v1.VirtualMachineInstance, iface
func (_mr *_MockNetworkInterfaceRecorder) PlugPhase2(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "PlugPhase2", arg0, arg1, arg2, arg3, arg4)
}

func (_m *MockNetworkInterface) Unplug() {
_m.ctrl.Call(_m, "Unplug")
}

func (_mr *_MockNetworkInterfaceRecorder) Unplug() *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Unplug")
}
1 change: 0 additions & 1 deletion pkg/virt-launcher/virtwrap/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ type PodCacheInterface struct {
type NetworkInterface interface {
PlugPhase1(vmi *v1.VirtualMachineInstance, iface *v1.Interface, network *v1.Network, podInterfaceName string, pid int) error
PlugPhase2(vmi *v1.VirtualMachineInstance, iface *v1.Interface, network *v1.Network, domain *api.Domain, podInterfaceName string) error
Unplug()
}

func getNetworksAndCniNetworks(vmi *v1.VirtualMachineInstance) (map[string]*v1.Network, map[string]int) {
Expand Down
2 changes: 0 additions & 2 deletions pkg/virt-launcher/virtwrap/network/podinterface.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ type BindMechanism interface {

type PodInterface struct{}

func (l *PodInterface) Unplug() {}

func getVifFilePath(pid, name string) string {
return fmt.Sprintf(vifCacheFile, pid, name)
}
Expand Down

0 comments on commit c0481de

Please sign in to comment.