mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-27 16:19:46 +08:00
22 lines
479 B
Go
22 lines
479 B
Go
package shell
|
|
|
|
import (
|
|
"yunion.io/x/onecloud/pkg/util/shellutils"
|
|
"yunion.io/x/onecloud/pkg/util/zstack"
|
|
)
|
|
|
|
func init() {
|
|
type ImageServerListOptions struct {
|
|
ZoneId string
|
|
}
|
|
shellutils.R(&ImageServerListOptions{}, "image-server-list", "List image servers", func(cli *zstack.SRegion, args *ImageServerListOptions) error {
|
|
servers, err := cli.GetImageServers(args.ZoneId)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
printList(servers, 0, 0, 0, []string{})
|
|
return nil
|
|
})
|
|
|
|
}
|