mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
华为 & ucloud fix
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user