MCPcopy
hub / github.com/lxc/incus / Remove

Method Remove

internal/server/device/proxy.go:765–778  ·  view source on GitHub ↗

Remove cleans up the device when it is removed from an instance.

(cleanupDependencies bool)

Source from the content-addressed store, hash-verified

763
764// Remove cleans up the device when it is removed from an instance.
765func (d *proxy) Remove(cleanupDependencies bool) error {
766 err := warnings.DeleteWarningsByLocalNodeAndProjectAndTypeAndEntity(d.state.DB.Cluster, d.inst.Project().Name, warningtype.ProxyBridgeNetfilterNotEnabled, cluster.TypeInstance, d.inst.ID())
767 if err != nil {
768 logger.Warn("Failed to delete warning", logger.Ctx{"err": err})
769 }
770
771 // Delete apparmor profile.
772 err = apparmor.ForkproxyDelete(d.state.OS, d.inst, d)
773 if err != nil {
774 return err
775 }
776
777 return nil
778}

Callers

nothing calls this directly

Calls 5

WarnFunction · 0.92
ForkproxyDeleteFunction · 0.92
ProjectMethod · 0.65
IDMethod · 0.65

Tested by

no test coverage detected