package action

import (
	"flag"
)

type operatorKeyringList struct {
	*config
}

func OperatorKeyringListAction() Action {
	return &operatorKeyringList{
		config: &gConfig,
	}
}

func (o *operatorKeyringList) CommandFlags() *flag.FlagSet {
	return newFlagSet()
}

func (o *operatorKeyringList) Run(args []string) error {
	client, err := o.newOperator()
	if err != nil {
		return err
	}

	queryOpts := o.queryOptions()
	r, err := client.KeyringList(queryOpts)
	if err != nil {
		return err
	}

	return o.Output(r)
}

package action

import (
	"flag"
)

type operatorKeyringList struct {
	*config
}

func OperatorKeyringListAction() Action {
	return &operatorKeyringList{
		config: &gConfig,
	}
}

func (o *operatorKeyringList) CommandFlags() *flag.FlagSet {
	f := newFlagSet()

	o.addOutputFlags(f, false)

	return f
}

func (o *operatorKeyringList) Run(args []string) error {
	client, err := o.newOperator()
	if err != nil {
		return err
	}

	queryOpts := o.queryOptions()
	r, err := client.KeyringList(queryOpts)
	if err != nil {
		return err
	}

	return o.Output(r)
}

Add template option to 'operator keyring list'
Add template option to 'operator keyring list'
