aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/auto-update.go
blob: 9fcc451fd8824317cfed6f785a569f5f74c3e2dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package abi

import (
	"context"

	"github.com/containers/libpod/pkg/autoupdate"
	"github.com/containers/libpod/pkg/domain/entities"
)

func (ic *ContainerEngine) AutoUpdate(ctx context.Context, options entities.AutoUpdateOptions) (*entities.AutoUpdateReport, []error) {
	// Convert the entities options to the autoupdate ones.  We can't use
	// them in the entities package as low-level packages must not leak
	// into the remote client.
	autoOpts := autoupdate.Options{Authfile: options.Authfile}
	units, failures := autoupdate.AutoUpdate(ic.Libpod, autoOpts)
	return &entities.AutoUpdateReport{Units: units}, failures
}