Skip to content

Commit de3cdab

Browse files
cisco 2.3.7.9 api
1 parent 91fac64 commit de3cdab

File tree

2,384 files changed

+115889
-9592
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,384 files changed

+115889
-9592
lines changed

CHANGELOG.md

Lines changed: 267 additions & 0 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ HOSTNAME=hashicorp.com
33
NAMESPACE=edu
44
NAME=catalystcenter
55
BINARY=terraform-provider-${NAME}
6-
VERSION=1.0.0-beta
6+
VERSION=1.1.0-beta
77
OS_ARCH=darwin_arm64
88
# Change to OS_ARCH=darwin_arm64 or your current architecture
99
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
@@ -34,11 +34,11 @@ install: build
3434
mv ${BINARY}_${VERSION}_${OS_ARCH} ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
3535

3636
test: fmtcheck
37-
go test -i $(TEST) || exit 1
38-
echo $(TEST) | xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
37+
go test -i $(TEST) || exit 1
38+
echo $(TEST) | xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
3939

40-
testacc:
41-
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m
40+
testacc:
41+
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m
4242

4343
fmt:
4444
gofmt -w $(GOFMT_FILES)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ The following table shows the supported versions.
2222
| Cisco Catalyst Center version | Terraform "catalystcenter" provider version |
2323
|--------------------------|----------------------------------------|
2424
| 2.3.7.6 | 1.0.0-beta |
25+
| 2.3.7.9 | 1.1.0-beta |
2526

2627
If your SDK, Terraform provider is older please consider updating it first.
2728

@@ -62,7 +63,7 @@ terraform {
6263
required_providers {
6364
catalystcenter = {
6465
source = "cisco-en-programmability/catalystcenter"
65-
version = "1.0.0-beta"
66+
version = "1.1.0-beta"
6667
}
6768
}
6869
}

catalystcenter/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package catalystcenter
33
import (
44
"context"
55

6-
catalystcentersdkgo "github.com/cisco-en-programmability/catalystcenter-go-sdk/sdk"
6+
catalystcentersdkgo "github.com/cisco-en-programmability/catalystcenter-go-sdk/v2/sdk"
77

88
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
99
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

catalystcenter/convert.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,35 @@ func responseInterfaceToString(v interface{}) string {
142142
return fmt.Sprint(string(b))
143143
}
144144

145+
func responseInterfaceToSliceFloat64(v interface{}) *[]float64 {
146+
value, ok := v.([]interface{})
147+
if !ok {
148+
return nil
149+
}
150+
newValue := []float64{}
151+
for _, i := range value {
152+
newValue = append(newValue, responseInterfaceToFloat64(i))
153+
}
154+
return &newValue
155+
}
156+
157+
func responseInterfaceToFloat64(v interface{}) float64 {
158+
switch v := v.(type) {
159+
case float64:
160+
return v
161+
case int:
162+
return float64(v)
163+
case string:
164+
f, err := strconv.ParseFloat(v, 64)
165+
if err != nil {
166+
return 0 // Valor por defecto en caso de error
167+
}
168+
return f
169+
default:
170+
return 0 // Valor por defecto en caso de tipo desconocido
171+
}
172+
}
173+
145174
func stringToFloat64Ptr(v string) *float64 {
146175
if s, err := strconv.ParseFloat(v, 64); err == nil {
147176
return &s

0 commit comments

Comments
 (0)