mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-24 01:24:26 +01:00
hypervisor: Export generic interface methods
This is in preparation for creating a seperate hypervisor package. Non functional change. Signed-off-by: Manohar Castelino <mcastelino@apple.com>
This commit is contained in:
committed by
Eric Ernst
parent
6baf2586ee
commit
4d47aeef2e
@@ -82,7 +82,7 @@ func (endpoint *TuntapEndpoint) Attach(ctx context.Context, s *Sandbox) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return h.addDevice(ctx, endpoint, NetDev)
|
||||
return h.AddDevice(ctx, endpoint, NetDev)
|
||||
}
|
||||
|
||||
// Detach for the tun/tap endpoint tears down the tap
|
||||
@@ -107,12 +107,12 @@ func (endpoint *TuntapEndpoint) HotAttach(ctx context.Context, h hypervisor) err
|
||||
span, ctx := tuntapTrace(ctx, "HotAttach", endpoint)
|
||||
defer span.End()
|
||||
|
||||
if err := tuntapNetwork(endpoint, h.hypervisorConfig().NumVCPUs, h.hypervisorConfig().DisableVhostNet); err != nil {
|
||||
if err := tuntapNetwork(endpoint, h.HypervisorConfig().NumVCPUs, h.HypervisorConfig().DisableVhostNet); err != nil {
|
||||
networkLogger().WithError(err).Error("Error bridging tun/tap ep")
|
||||
return err
|
||||
}
|
||||
|
||||
if _, err := h.hotplugAddDevice(ctx, endpoint, NetDev); err != nil {
|
||||
if _, err := h.HotplugAddDevice(ctx, endpoint, NetDev); err != nil {
|
||||
networkLogger().WithError(err).Error("Error attach tun/tap ep")
|
||||
return err
|
||||
}
|
||||
@@ -132,7 +132,7 @@ func (endpoint *TuntapEndpoint) HotDetach(ctx context.Context, h hypervisor, net
|
||||
networkLogger().WithError(err).Warn("Error un-bridging tun/tap ep")
|
||||
}
|
||||
|
||||
if _, err := h.hotplugRemoveDevice(ctx, endpoint, NetDev); err != nil {
|
||||
if _, err := h.HotplugRemoveDevice(ctx, endpoint, NetDev); err != nil {
|
||||
networkLogger().WithError(err).Error("Error detach tun/tap ep")
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user