mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-30 12:31:17 +08:00
20 lines
403 B
Go
20 lines
403 B
Go
package shell
|
|
|
|
import (
|
|
"yunion.io/x/onecloud/pkg/util/openstack"
|
|
"yunion.io/x/onecloud/pkg/util/shellutils"
|
|
)
|
|
|
|
func init() {
|
|
type ZoneListOptions struct {
|
|
}
|
|
shellutils.R(&ZoneListOptions{}, "zone-list", "List zones", func(cli *openstack.SRegion, args *ZoneListOptions) error {
|
|
zones, err := cli.GetIZones()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
printList(zones, 0, 0, 0, nil)
|
|
return nil
|
|
})
|
|
}
|