Files
cloudpods/pkg/util/aliyun/shell/vrouter.go
T

22 lines
556 B
Go

package shell
import (
"github.com/yunionio/onecloud/pkg/util/aliyun"
"github.com/yunionio/onecloud/pkg/util/shellutils"
)
func init() {
type VRouterListOptions struct {
Limit int `help:"page size"`
Offset int `help:"page offset"`
}
shellutils.R(&VRouterListOptions{}, "vrouter-list", "List vrouters", func(cli *aliyun.SRegion, args *VRouterListOptions) error {
vrouters, total, e := cli.GetVRouters(args.Offset, args.Limit)
if e != nil {
return e
}
printList(vrouters, total, args.Offset, args.Limit, []string{})
return nil
})
}