Files
cloudpods/pkg/util/zstack/shell/instance_offering.go
2019-05-21 22:36:52 +08:00

24 lines
612 B
Go

package shell
import (
"yunion.io/x/onecloud/pkg/util/shellutils"
"yunion.io/x/onecloud/pkg/util/zstack"
)
func init() {
type InstanceOfferingListOptions struct {
OfferId string
Name string
Cpu int
MemoryMb int
}
shellutils.R(&InstanceOfferingListOptions{}, "instance-offering-list", "List instance offerings", func(cli *zstack.SRegion, args *InstanceOfferingListOptions) error {
offerings, err := cli.GetInstanceOfferings(args.OfferId, args.Name, args.Cpu, args.MemoryMb)
if err != nil {
return err
}
printList(offerings, len(offerings), 0, 0, []string{})
return nil
})
}