mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-24 01:24:26 +01:00
hypervisor: Minimal exports of generic hypervisor internal fields
Export commonly used hypervisor fields and utility functions. These need to be exposed to allow the hypervisor to be consumed externally. Note: This does not change the hypervisor interface definition. Those changes will be separate commits. Signed-off-by: Manohar Castelino <mcastelino@apple.com>
This commit is contained in:
committed by
Eric Ernst
parent
03877f3479
commit
6baf2586ee
@@ -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
|
||||
@@ -112,7 +112,7 @@ func (endpoint *TuntapEndpoint) HotAttach(ctx context.Context, h hypervisor) err
|
||||
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