mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
22 lines
498 B
Go
22 lines
498 B
Go
package shell
|
|
|
|
import (
|
|
"yunion.io/x/onecloud/pkg/util/qcloud"
|
|
"yunion.io/x/onecloud/pkg/util/shellutils"
|
|
)
|
|
|
|
func init() {
|
|
type ZoneListOptions struct {
|
|
Limit int `help:"page size"`
|
|
Offset int `help:"page offset"`
|
|
}
|
|
shellutils.R(&ZoneListOptions{}, "zone-list", "List zones", func(cli *qcloud.SRegion, args *ZoneListOptions) error {
|
|
zones, err := cli.GetIZones()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
printList(zones, len(zones), args.Offset, args.Limit, []string{})
|
|
return nil
|
|
})
|
|
}
|