mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
22 lines
556 B
Go
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
|
|
})
|
|
}
|