diff --git a/go.mod b/go.mod index fbcd20b..3c9a1a6 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/terraform-providers/terraform-provider-constellix go 1.13 require ( - github.com/Constellix/constellix-go-client v1.1.0 + github.com/Constellix/constellix-go-client v1.1.2 github.com/Jeffail/gabs v1.4.0 github.com/hashicorp/terraform-plugin-sdk v1.17.2 ) diff --git a/go.sum b/go.sum index aa4900c..c7fadd0 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Constellix/constellix-go-client v1.1.0 h1:5/bBDEArhuBVNBYxt3fLiNAj3C7gAwmKJi19/PtwM4Y= -github.com/Constellix/constellix-go-client v1.1.0/go.mod h1:zd3j7BeCZvtZ8pfDYwv/JUSKQ72hgRWFYicBgVUnHFo= +github.com/Constellix/constellix-go-client v1.1.2 h1:DOQd+z4HG7ElTRcptvq615yk2cY097jGTHSLuhZzic0= +github.com/Constellix/constellix-go-client v1.1.2/go.mod h1:zd3j7BeCZvtZ8pfDYwv/JUSKQ72hgRWFYicBgVUnHFo= github.com/Jeffail/gabs v1.4.0 h1://5fYRRTq1edjfIrQGvdkcd22pkYUrHZ5YC/H2GJVAo= github.com/Jeffail/gabs v1.4.0/go.mod h1:6xMvQMK4k33lb7GUUpaAPh6nKMmemQeg5d4gn7/bOXc= github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= diff --git a/vendor/github.com/Constellix/constellix-go-client/client/client.go b/vendor/github.com/Constellix/constellix-go-client/client/client.go index a07c4e7..d382a5d 100644 --- a/vendor/github.com/Constellix/constellix-go-client/client/client.go +++ b/vendor/github.com/Constellix/constellix-go-client/client/client.go @@ -201,6 +201,9 @@ func checkForErrors(resp *http.Response) error { for _, val := range errors { allerrs = allerrs + val.(string) } + if allerrs == "" { + allerrs = fmt.Sprintf("%v", resp.StatusCode) + } log.Println(" Errors are .....:: ", allerrs) return fmt.Errorf("%s", allerrs) } diff --git a/vendor/github.com/Constellix/constellix-go-client/models/model_dns_check.go b/vendor/github.com/Constellix/constellix-go-client/models/model_dns_check.go index 16bb931..bbc5928 100644 --- a/vendor/github.com/Constellix/constellix-go-client/models/model_dns_check.go +++ b/vendor/github.com/Constellix/constellix-go-client/models/model_dns_check.go @@ -1,16 +1,17 @@ package models type DNSAttributes struct { - Name string `json:"name,omitempty"` - FQDN string `json:"fqdn,omitempty"` - Resolver string `json:"resolver,omitempty"` - Host string `json:"host,omitempty"` - Port int `json:"port,omitempty"` - ProtocolType string `json:"protocolType,omitempty"` - CheckSites []interface{} `json:"checkSites,omitempty"` - Interval string `json:"interval,omitempty"` - IntervalPolicy string `json:"monitorIntervalPolicy,omitempty"` - VerificationPolicy string `json:"verificationPolicy,omitempty"` - ExpectedResponse string `json:"expectedResponse,omitempty"` - NotificationGroups []int `json:"notificationGroups,omitempty"` + Name string `json:"name,omitempty"` + FQDN string `json:"fqdn,omitempty"` + Resolver string `json:"resolver,omitempty"` + Host string `json:"host,omitempty"` + Port int `json:"port,omitempty"` + ProtocolType string `json:"protocolType,omitempty"` + CheckSites []interface{} `json:"checkSites,omitempty"` + Interval string `json:"interval,omitempty"` + IntervalPolicy string `json:"monitorIntervalPolicy,omitempty"` + VerificationPolicy string `json:"verificationPolicy,omitempty"` + ExpectedResponse string `json:"expectedResponse,omitempty"` + NotificationGroups []int `json:"notificationGroups,omitempty"` + NotificationReportTimeout int `json:"notificationReportTimeout,omitempty"` } diff --git a/vendor/github.com/Constellix/constellix-go-client/models/model_httpcheck.go b/vendor/github.com/Constellix/constellix-go-client/models/model_httpcheck.go index 4c9c4bd..d5dc0d1 100644 --- a/vendor/github.com/Constellix/constellix-go-client/models/model_httpcheck.go +++ b/vendor/github.com/Constellix/constellix-go-client/models/model_httpcheck.go @@ -1,18 +1,19 @@ package models type HttpcheckAttr struct { - Name string `json:"name,omitempty"` - Host string `json:"host,omitempty"` - Ipversion string `json:"ipVersion,omitempty"` - Port int `json:"port"` - ProtoType string `json:"protocolType"` - Checksites []interface{} `json:"checkSites"` - Interval string `json:"interval,omitempty"` - IntervalPolicy string `json:"monitorIntervalPolicy,omitempty"` - VerificationPolicy string `json:"verificationPolicy,omitempty"` - FQDN string `json:"fqdn,omitempty"` - PATH string `json:"path,omitempty"` - SearchString string `json:"searchString,omitempty"` - ExpectedStatus int `json:"expectedStatusCode,omitempty"` - NotificationGroups []int `json:"notificationGroups,omitempty"` + Name string `json:"name,omitempty"` + Host string `json:"host,omitempty"` + Ipversion string `json:"ipVersion,omitempty"` + Port int `json:"port"` + ProtoType string `json:"protocolType"` + Checksites []interface{} `json:"checkSites"` + Interval string `json:"interval,omitempty"` + IntervalPolicy string `json:"monitorIntervalPolicy,omitempty"` + VerificationPolicy string `json:"verificationPolicy,omitempty"` + FQDN string `json:"fqdn,omitempty"` + PATH string `json:"path,omitempty"` + SearchString string `json:"searchString,omitempty"` + ExpectedStatus int `json:"expectedStatusCode,omitempty"` + NotificationGroups []int `json:"notificationGroups,omitempty"` + NotificationReportTimeout int `json:"notificationReportTimeout,omitempty"` } diff --git a/vendor/github.com/Constellix/constellix-go-client/models/model_tcp_check.go b/vendor/github.com/Constellix/constellix-go-client/models/model_tcp_check.go index 3d09489..5f88e72 100644 --- a/vendor/github.com/Constellix/constellix-go-client/models/model_tcp_check.go +++ b/vendor/github.com/Constellix/constellix-go-client/models/model_tcp_check.go @@ -1,15 +1,16 @@ package models type TCPCheckAttributes struct { - Name string `json:"name,omitempty"` - Host string `json:"host"` - Port int `json:"port"` - Ipversion string `json:"ipVersion,omitempty"` - Checksites []interface{} `json:"checkSites"` - Interval string `json:"interval,omitempty"` - IntervalPolicy string `json:"monitorIntervalPolicy,omitempty"` - VerificationPolicy string `json:"verificationPolicy,omitempty"` - StringToSend string `json:"stringToSend,omitempty"` - StringToReceive string `json:"stringToReceive,omitempty"` - NotificationGroups []int `json:"notificationGroups,omitempty"` + Name string `json:"name,omitempty"` + Host string `json:"host"` + Port int `json:"port"` + Ipversion string `json:"ipVersion,omitempty"` + Checksites []interface{} `json:"checkSites"` + Interval string `json:"interval,omitempty"` + IntervalPolicy string `json:"monitorIntervalPolicy,omitempty"` + VerificationPolicy string `json:"verificationPolicy,omitempty"` + StringToSend string `json:"stringToSend,omitempty"` + StringToReceive string `json:"stringToReceive,omitempty"` + NotificationGroups []int `json:"notificationGroups,omitempty"` + NotificationReportTimeout int `json:"notificationReportTimeout,omitempty"` } diff --git a/vendor/modules.txt b/vendor/modules.txt index a94a31a..3f52a61 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -8,7 +8,7 @@ cloud.google.com/go/internal/trace cloud.google.com/go/internal/version # cloud.google.com/go/storage v1.10.0 cloud.google.com/go/storage -# github.com/Constellix/constellix-go-client v1.1.0 +# github.com/Constellix/constellix-go-client v1.1.2 github.com/Constellix/constellix-go-client/client github.com/Constellix/constellix-go-client/models # github.com/Jeffail/gabs v1.4.0