github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/pkg/domain/infra/tunnel/system.go (about)

     1  package tunnel
     2  
     3  import (
     4  	"context"
     5  	"errors"
     6  
     7  	"github.com/containers/podman/v2/libpod/define"
     8  	"github.com/containers/podman/v2/pkg/bindings/system"
     9  	"github.com/containers/podman/v2/pkg/domain/entities"
    10  	"github.com/spf13/cobra"
    11  )
    12  
    13  func (ic *ContainerEngine) Info(ctx context.Context) (*define.Info, error) {
    14  	return system.Info(ic.ClientCxt)
    15  }
    16  
    17  func (ic *ContainerEngine) VarlinkService(_ context.Context, _ entities.ServiceOptions) error {
    18  	panic(errors.New("varlink service is not supported when tunneling"))
    19  }
    20  
    21  func (ic *ContainerEngine) SetupRootless(_ context.Context, cmd *cobra.Command) error {
    22  	panic(errors.New("rootless engine mode is not supported when tunneling"))
    23  }
    24  
    25  // SystemPrune prunes unused data from the system.
    26  func (ic *ContainerEngine) SystemPrune(ctx context.Context, options entities.SystemPruneOptions) (*entities.SystemPruneReport, error) {
    27  	return system.Prune(ic.ClientCxt, &options.All, &options.Volume)
    28  }
    29  
    30  func (ic *ContainerEngine) SystemDf(ctx context.Context, options entities.SystemDfOptions) (*entities.SystemDfReport, error) {
    31  	return system.DiskUsage(ic.ClientCxt)
    32  }
    33  
    34  func (ic *ContainerEngine) Unshare(ctx context.Context, args []string) error {
    35  	return errors.New("unshare is not supported on remote clients")
    36  }
    37  
    38  func (ic ContainerEngine) Version(ctx context.Context) (*entities.SystemVersionReport, error) {
    39  	return system.Version(ic.ClientCxt)
    40  }