mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
22 lines
546 B
Go
22 lines
546 B
Go
package shell
|
|
|
|
import (
|
|
"yunion.io/x/onecloud/pkg/util/aws"
|
|
"yunion.io/x/onecloud/pkg/util/shellutils"
|
|
)
|
|
|
|
func init() {
|
|
type VSwitchListOptions struct {
|
|
Limit int `help:"page size"`
|
|
Offset int `help:"page offset"`
|
|
}
|
|
shellutils.R(&VSwitchListOptions{}, "vswitch-list", "List vswitches", func(cli *aws.SRegion, args *VSwitchListOptions) error {
|
|
vswitches, total, e := cli.GetNetwroks(nil, "", args.Offset, args.Limit)
|
|
if e != nil {
|
|
return e
|
|
}
|
|
printList(vswitches, total, args.Offset, args.Limit, []string{})
|
|
return nil
|
|
})
|
|
}
|