Skip to content

Commit

Permalink
removed max_async_wait_time from discovery, fabric_device, wireless_d…
Browse files Browse the repository at this point in the history
…evice_provision, fabric_provision_device to use timeout from CC_MAX_TIMEOUT env
  • Loading branch information
kuba-mazurkiewicz committed Nov 20, 2024
1 parent 636be17 commit 9bd553c
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 0.1.16 (unreleased)

- Remove `max_async_wait_time` attribute and use timeout from `CC_MAX_TIMEOUT`
- Modify `catalystcenter_deploy_template` resource to support deploying composite templates
- Modify `catalystcenter_template_version` resource to use versioned template id as `id` and remove data_source

Expand Down
1 change: 1 addition & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ description: |-

## 0.1.16 (unreleased)

- Remove `max_async_wait_time` attribute and use timeout from `CC_MAX_TIMEOUT`
- Modify `catalystcenter_deploy_template` resource to support deploying composite templates
- Modify `catalystcenter_template_version` resource to use versioned template id as `id` and remove data_source

Expand Down
1 change: 0 additions & 1 deletion gen/definitions/discovery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ no_update: true
no_import: true
get_from_all: true
id_from_query_path: response
max_async_wait_time: 600
doc_category: Discovery
attributes:
- model_name: cdpLevel
Expand Down
1 change: 0 additions & 1 deletion gen/definitions/fabric_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ put_id_include_path: 0.id
import_no_id: true
data_source_no_id: true
put_no_id: true
max_async_wait_time: 300
doc_category: SDA
test_tags: [SDA]
attributes:
Expand Down
1 change: 0 additions & 1 deletion gen/definitions/fabric_provision_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import_no_id: true
data_source_no_id: true
put_id_include_path: "0.id"
put_no_id: true
max_async_wait_time: 300
doc_category: SDA
test_tags: [SDA]
attributes:
Expand Down
1 change: 0 additions & 1 deletion gen/definitions/wireless_device_provision.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ no_import: true
put_no_id: true
id_from_attribute: true
doc_category: Wireless
max_async_wait_time: 300
test_tags: [WIRELESS]
attributes:
- model_name: deviceName
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/resource_catalystcenter_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func (r *DiscoveryResource) Create(ctx context.Context, req resource.CreateReque
body := plan.toBody(ctx, Discovery{})

params := ""
res, err := r.client.Post(plan.getPath()+params, body, func(r *cc.Req) { r.MaxAsyncWaitTime = 600 })
res, err := r.client.Post(plan.getPath()+params, body)
if err != nil {
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to configure object (%s), got error: %s, %s", "POST", err, res.String()))
return
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/resource_catalystcenter_fabric_device.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (r *FabricDeviceResource) Create(ctx context.Context, req resource.CreateRe
body := plan.toBody(ctx, FabricDevice{})

params := ""
res, err := r.client.Post(plan.getPath()+params, body, func(r *cc.Req) { r.MaxAsyncWaitTime = 300 })
res, err := r.client.Post(plan.getPath()+params, body)
if err != nil {
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to configure object (%s), got error: %s, %s", "POST", err, res.String()))
return
Expand Down Expand Up @@ -237,7 +237,7 @@ func (r *FabricDeviceResource) Update(ctx context.Context, req resource.UpdateRe

body := plan.toBody(ctx, state)
params := ""
res, err := r.client.Put(plan.getPath()+params, body, func(r *cc.Req) { r.MaxAsyncWaitTime = 300 })
res, err := r.client.Put(plan.getPath()+params, body)
if err != nil {
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to configure object (PUT), got error: %s, %s", err, res.String()))
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (r *FabricProvisionDeviceResource) Create(ctx context.Context, req resource
body := plan.toBody(ctx, FabricProvisionDevice{})

params := ""
res, err := r.client.Post(plan.getPath()+params, body, func(r *cc.Req) { r.MaxAsyncWaitTime = 300 })
res, err := r.client.Post(plan.getPath()+params, body)
if err != nil {
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to configure object (%s), got error: %s, %s", "POST", err, res.String()))
return
Expand Down Expand Up @@ -195,7 +195,7 @@ func (r *FabricProvisionDeviceResource) Update(ctx context.Context, req resource

body := plan.toBody(ctx, state)
params := ""
res, err := r.client.Put(plan.getPath()+params, body, func(r *cc.Req) { r.MaxAsyncWaitTime = 300 })
res, err := r.client.Put(plan.getPath()+params, body)
if err != nil {
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to configure object (PUT), got error: %s, %s", err, res.String()))
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (r *WirelessDeviceProvisionResource) Create(ctx context.Context, req resour
body := plan.toBody(ctx, WirelessDeviceProvision{})

params := ""
res, err := r.client.Post(plan.getPath()+params, body, func(r *cc.Req) { r.MaxAsyncWaitTime = 300 })
res, err := r.client.Post(plan.getPath()+params, body)
if err != nil {
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to configure object (%s), got error: %s, %s", "POST", err, res.String()))
return
Expand Down Expand Up @@ -211,7 +211,7 @@ func (r *WirelessDeviceProvisionResource) Update(ctx context.Context, req resour

body := plan.toBody(ctx, state)
params := ""
res, err := r.client.Put(plan.getPath()+params, body, func(r *cc.Req) { r.MaxAsyncWaitTime = 300 })
res, err := r.client.Put(plan.getPath()+params, body)
if err != nil {
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to configure object (PUT), got error: %s, %s", err, res.String()))
return
Expand Down
1 change: 1 addition & 0 deletions templates/guides/changelog.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ description: |-

## 0.1.16 (unreleased)

- Remove `max_async_wait_time` attribute and use timeout from `CC_MAX_TIMEOUT`
- Modify `catalystcenter_deploy_template` resource to support deploying composite templates
- Modify `catalystcenter_template_version` resource to use versioned template id as `id` and remove data_source

Expand Down

0 comments on commit 9bd553c

Please sign in to comment.