diff --git a/go.mod b/go.mod index d213981905..9bdbd4ebc9 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ require ( github.com/hashicorp/errwrap v1.0.0 github.com/hashicorp/go-cleanhttp v0.5.1 github.com/hashicorp/terraform-plugin-sdk v1.0.0 - github.com/huaweicloud/golangsdk v0.0.0-20200401094148-31fa13f7c58c + github.com/huaweicloud/golangsdk v0.0.0-20200416034153-3d1c2830a7e3 github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a github.com/mitchellh/go-homedir v1.1.0 github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa // indirect diff --git a/go.sum b/go.sum index 3c813dc978..351fc54beb 100644 --- a/go.sum +++ b/go.sum @@ -121,8 +121,8 @@ github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKe github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huaweicloud/golangsdk v0.0.0-20200401094148-31fa13f7c58c h1:bzJdiQ+UuJ2/91iSsv+cFfVrLdwETLkawm1ZxE9yYT4= -github.com/huaweicloud/golangsdk v0.0.0-20200401094148-31fa13f7c58c/go.mod h1:WQBcHRNX9shz3928lWEvstQJtAtYI7ks6XlgtRT9Tcw= +github.com/huaweicloud/golangsdk v0.0.0-20200416034153-3d1c2830a7e3 h1:V3ohVf+/bBVWN+UapuySheatua7RaXMahCtcGWu3gww= +github.com/huaweicloud/golangsdk v0.0.0-20200416034153-3d1c2830a7e3/go.mod h1:WQBcHRNX9shz3928lWEvstQJtAtYI7ks6XlgtRT9Tcw= github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a h1:FyS/ubzBR5xJlnJGRTwe7GUHpJOR4ukYK3y+LFNffuA= github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a/go.mod h1:uoIMjNxUfXi48Ci40IXkPRbghZ1vbti6v9LCbNqRgHY= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= diff --git a/vendor/github.com/huaweicloud/golangsdk/openstack/cloudeyeservice/alarmrule/requests.go b/vendor/github.com/huaweicloud/golangsdk/openstack/cloudeyeservice/alarmrule/requests.go index c1d580aeed..712a32abe2 100644 --- a/vendor/github.com/huaweicloud/golangsdk/openstack/cloudeyeservice/alarmrule/requests.go +++ b/vendor/github.com/huaweicloud/golangsdk/openstack/cloudeyeservice/alarmrule/requests.go @@ -38,6 +38,8 @@ type ActionOpts struct { type CreateOpts struct { AlarmName string `json:"alarm_name" required:"true"` AlarmDescription string `json:"alarm_description,omitempty"` + AlarmType string `json:"alarm_type,omitempty"` + AlarmLevel int `json:"alarm_level,omitempty"` Metric MetricOpts `json:"metric" required:"true"` Condition ConditionOpts `json:"condition" required:"true"` AlarmActions []ActionOpts `json:"alarm_actions,omitempty"` diff --git a/vendor/github.com/huaweicloud/golangsdk/openstack/cloudeyeservice/alarmrule/results.go b/vendor/github.com/huaweicloud/golangsdk/openstack/cloudeyeservice/alarmrule/results.go index acef34cd54..fb01244f72 100644 --- a/vendor/github.com/huaweicloud/golangsdk/openstack/cloudeyeservice/alarmrule/results.go +++ b/vendor/github.com/huaweicloud/golangsdk/openstack/cloudeyeservice/alarmrule/results.go @@ -47,6 +47,8 @@ type ActionInfo struct { type AlarmRule struct { AlarmName string `json:"alarm_name"` AlarmDescription string `json:"alarm_description"` + AlarmType string `json:"alarm_type"` + AlarmLevel int `json:"alarm_level"` Metric MetricInfo `json:"metric"` Condition ConditionInfo `json:"condition"` AlarmActions []ActionInfo `json:"alarm_actions"` diff --git a/vendor/github.com/huaweicloud/golangsdk/openstack/ecs/v1/cloudservers/results_order.go b/vendor/github.com/huaweicloud/golangsdk/openstack/ecs/v1/cloudservers/results_order.go index 76419e50da..e709ee21c9 100644 --- a/vendor/github.com/huaweicloud/golangsdk/openstack/ecs/v1/cloudservers/results_order.go +++ b/vendor/github.com/huaweicloud/golangsdk/openstack/ecs/v1/cloudservers/results_order.go @@ -60,6 +60,10 @@ func WaitForOrderSuccess(client *golangsdk.ServiceClient, secs int, orderID stri return false, err } time.Sleep(5 * time.Second) + + if len(order.Resources) == 0 { + return false, nil + } instance := order.Resources[0] if instance.Status == 1 { @@ -82,6 +86,10 @@ func WaitForOrderDeleteSuccess(client *golangsdk.ServiceClient, secs int, orderI return false, err } time.Sleep(5 * time.Second) + + if len(order.Resources) == 0 { + return false, nil + } instance := order.Resources[0] if instance.Status == 8 { diff --git a/vendor/modules.txt b/vendor/modules.txt index 35bb813b74..e1786450a4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -177,7 +177,7 @@ github.com/hashicorp/terraform-plugin-sdk/internal/svchost github.com/hashicorp/terraform-plugin-sdk/internal/svchost/auth # github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d github.com/hashicorp/yamux -# github.com/huaweicloud/golangsdk v0.0.0-20200401094148-31fa13f7c58c +# github.com/huaweicloud/golangsdk v0.0.0-20200416034153-3d1c2830a7e3 github.com/huaweicloud/golangsdk github.com/huaweicloud/golangsdk/openstack github.com/huaweicloud/golangsdk/openstack/antiddos/v1/antiddos