// ListPluginsCommand Describes the cli interface for the ListPluginsCommand
515482
func listPluginsCommand() *cli.Command {
	return &cli.Command{
		Name:     ListPluginsCommandName,
		Usage:    ListPluginsCommandUsage,
		Category: "Plugins",
		Action:   ActionWrapper(listPluginsAction),
	}
}
1049645
func (ls *ListZones) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
64682
func (s *Server) ListContainers(ctx context.Context, req *pb.ListContainersRequest) (resp *pb.ListContainersResponse, err error) {
	const operation = "list_containers"
	defer func() {
		recordOperation(operation, time.Now())
		recordError(operation, err)
	}()
	logrus.Debugf("ListContainersRequest %+v", req)

	var ctrs []*pb.Container
	filter := req.GetFilter()
	ctrList, err := s.ContainerServer.ListContainers()
	if err != nil {
		return nil, err
	}

	if filter != nil {
		ctrList = s.filterContainerList(filter, ctrList)
	}

	for _, ctr := range ctrList {
		// Skip over containers that are still being created
		if !ctr.Created() {
			continue
		}
		podSandboxID := ctr.Sandbox()
		cState := ctr.StateNoLock()
		created := ctr.CreatedAt().UnixNano()
		rState := pb.ContainerState_CONTAINER_UNKNOWN
		cID := ctr.ID()
		img := &pb.ImageSpec{
			Image: ctr.Image(),
		}
		c := &pb.Container{
			Id:           cID,
			PodSandboxId: podSandboxID,
			CreatedAt:    created,
			Labels:       ctr.Labels(),
			Metadata:     ctr.Metadata(),
			Annotations:  ctr.Annotations(),
			Image:        img,
			ImageRef:     ctr.ImageRef(),
		}

		switch cState.Status {
		case oci.ContainerStateCreated:
			rState = pb.ContainerState_CONTAINER_CREATED
		case oci.ContainerStateRunning:
			rState = pb.ContainerState_CONTAINER_RUNNING
		case oci.ContainerStateStopped:
			rState = pb.ContainerState_CONTAINER_EXITED
		}
		c.State = rState

		// Filter by other criteria such as state and labels.
		if filterContainer(c, req.Filter) {
			ctrs = append(ctrs, c)
		}
	}

	resp = &pb.ListContainersResponse{
		Containers: ctrs,
	}
	logrus.Debugf("ListContainersResponse: %+v", resp)
	return resp, nil
}
507279
func (ls *ListSecurityGroups) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
755328
func (ls *ListTags) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
119257
func List(c *cli.Context) {
	// this will create the config dir if it does not already exist
	cfg, err := config.New()
	if err != nil {
		log.Fatal(err)
	}

	var parsers []string
	var parserStatus string

	if c.Bool("r") {
		parsers = getRemoteParsers(cfg.DownloadServerURL)
		parserStatus = "available"
	} else {
		parsers = getInstalledParsers()
		parserStatus = "installed"
	}

	if len(parsers) == 0 {
		fmt.Println("no parser", parserStatus)
		return
	}

	fmt.Println(parserStatus, "parsers:")
	for _, parser := range parsers {
		fmt.Println("  * ", parser)
	}
}
220202
func (ls *ListAccounts) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
867391
func (mr *MockPluginAPIClientMockRecorder) PluginList(ctx, filter interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PluginList", reflect.TypeOf((*MockPluginAPIClient)(nil).PluginList), ctx, filter)
}
1324487
func List(name string, opts *ListOpts) ([]string, error) {
	cmd := newCmd("list", "-Hp")
	if opts == nil {
		opts = &ListOpts{}
	}
	cmd = addOpt(cmd, opts.Recurse, "-r")
	cmd = addOpt(cmd, opts.Depth != -1, "-d", fmt.Sprintf("%d", opts.Depth))
	cmd = addCommaSeparatedOption(cmd, "-o", []string{"name"})
	cmd = addCommaSeparatedOption(cmd, "-t", opts.Types)
	out, err := zExec(cmd)
	if err != nil {
		return nil, err
	}
	return strings.Split(string(out), "\n"), nil
}
602207
func List(name rune, helpvalue ...string) *[]string {
	return CommandLine.List(name, helpvalue...)
}
660672
func (ls *ListResourceLimits) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
404777
func listCmd(args []string, aliases *Aliases) error {
	mp, err := aliases.List()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Failed to get list of aliases: %v\n", err)
		return err
	}
	if len(mp) == 0 {
		fmt.Printf("No aliases found! Add one with \"wol alias <name> <mac>\"\n")
	} else {
		for alias, mi := range mp {
			fmt.Printf("    %s - %s %s\n", alias, mi.Mac, mi.Iface)
		}
	}
	return nil
}
764233
func (ls *ListNetworks) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
466832
func pluginsListAction(ctx *cli.Context, api *client.Client, timeout cmd.Timeout) {
	plugins, err := api.Plugins.List(timeout(), nil)
	if err != nil {
		fmt.Printf("%s", err)
		os.Exit(1)
	}
	fmt.Printf("Found %d plugins:\n", plugins.Count)
	for _, p := range plugins.Results {
		fmt.Println(p)
	}
}
781578
func listCommands(commands map[string]cli.CommandFactory, maxKeyLen int) string {
	var buf bytes.Buffer

	// Get the list of keys so we can sort them, and also get the maximum
	// key length so they can be aligned properly.
	keys := make([]string, 0, len(commands))
	for key, _ := range commands {
		// This is an internal command that users should never call directly so
		// we will hide it from the command listing.
		if key == "internal-plugin" {
			continue
		}
		keys = append(keys, key)
	}
	sort.Strings(keys)

	for _, key := range keys {
		commandFunc, ok := commands[key]
		if !ok {
			// This should never happen since we JUST built the list of
			// keys.
			panic("command not found: " + key)
		}

		command, err := commandFunc()
		if err != nil {
			log.Printf("[ERR] cli: Command '%s' failed to load: %s",
				key, err)
			continue
		}

		key = fmt.Sprintf("%s%s", key, strings.Repeat(" ", maxKeyLen-len(key)))
		buf.WriteString(fmt.Sprintf("    %s    %s\n", key, command.Synopsis()))
	}

	return buf.String()
}
98649
func (_m *APIClient) PluginList(ctx context.Context, filter filters.Args) (types.PluginsListResponse, error) {
	ret := _m.Called(ctx, filter)

	var r0 types.PluginsListResponse
	if rf, ok := ret.Get(0).(func(context.Context, filters.Args) types.PluginsListResponse); ok {
		r0 = rf(ctx, filter)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(types.PluginsListResponse)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok {
		r1 = rf(ctx, filter)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
341364
func (s *RPCServer) ListFunctionArgs(arg ListFunctionArgsIn, out *ListFunctionArgsOut) error {
	vars, err := s.debugger.FunctionArguments(arg.Scope, *api.LoadConfigToProc(&arg.Cfg))
	if err != nil {
		return err
	}
	out.Args = vars
	return nil
}