Files
cloudpods/pkg/util/aws/shell/reservedinstance.go
2018-12-02 02:11:50 +08:00

28 lines
640 B
Go

package shell
import (
"yunion.io/x/onecloud/pkg/util/aws"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
func init() {
type ReservedInstanceListOptions struct {
Id []string `help:"IDs of instances to show"`
Zone string `help:"Zone ID"`
Limit int `help:"page size"`
Offset int `help:"page offset"`
}
shellutils.R(&ReservedInstanceListOptions{}, "reserved-instance-list", "List intances", func(cli *aws.SRegion, args *ReservedInstanceListOptions) error {
e := cli.GetReservedInstance()
if e != nil {
return e
}
e = cli.GetReservedHostOfferings()
if e != nil {
return e
}
return nil
})
}