华为 & ucloud fix

This commit is contained in:
TangBin
2019-07-26 16:59:04 +08:00
parent 7be5360040
commit d6f5099ccc
13 changed files with 178 additions and 35 deletions
+5
View File
@@ -28,6 +28,7 @@ func init() {
type CloudproviderListOptions struct {
options.BaseListOptions
Usable bool `help:"Vpc & Network usable"`
}
R(&CloudproviderListOptions{}, "cloud-provider-list", "List cloud providers", func(s *mcclient.ClientSession, args *CloudproviderListOptions) error {
var params *jsonutils.JSONDict
@@ -37,6 +38,10 @@ func init() {
if err != nil {
return err
}
if args.Usable {
params.Add(jsonutils.NewBool(true), "usable")
}
}
result, err := modules.Cloudproviders.List(s, params)
if err != nil {