Skip to content

Commit c9ddcc4

Browse files
Fixed breaking change due to management agent sdk changes
1 parent fb77dec commit c9ddcc4

File tree

8 files changed

+10
-590
lines changed

8 files changed

+10
-590
lines changed

oci/management_agent_management_agents_data_source.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,10 @@ func ManagementAgentManagementAgentsDataSource() *schema.Resource {
2727
Type: schema.TypeString,
2828
Optional: true,
2929
},
30-
/*"platform_type": {
31-
Type: schema.TypeString,
32-
Optional: true,
33-
},
34-
"plugin_name": {
35-
Type: schema.TypeString,
36-
Optional: true,
37-
},*/
3830
"state": {
3931
Type: schema.TypeString,
4032
Optional: true,
4133
},
42-
/*"version": {
43-
Type: schema.TypeString,
44-
Optional: true,
45-
},*/
4634
"management_agents": {
4735
Type: schema.TypeList,
4836
Computed: true,
@@ -83,24 +71,10 @@ func (s *ManagementAgentManagementAgentsDataSourceCrud) Get() error {
8371
request.DisplayName = &tmp
8472
}
8573

86-
/*if platformType, ok := s.D.GetOkExists("platform_type"); ok {
87-
request.PlatformType = oci_management_agent.ListManagementAgentsPlatformTypeEnum(platformType.(string))
88-
}
89-
90-
if pluginName, ok := s.D.GetOkExists("plugin_name"); ok {
91-
tmp := pluginName.(string)
92-
request.PluginName = &tmp
93-
}*/
94-
9574
if state, ok := s.D.GetOkExists("state"); ok {
9675
request.LifecycleState = oci_management_agent.ListManagementAgentsLifecycleStateEnum(state.(string))
9776
}
9877

99-
/*if version, ok := s.D.GetOkExists("version"); ok {
100-
tmp := version.(string)
101-
request.Version = &tmp
102-
}*/
103-
10478
request.RequestMetadata.RetryPolicy = getRetryPolicy(false, "management_agent")
10579

10680
response, err := s.Client.ListManagementAgents(context.Background(), request)

oci/retry.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,15 @@ func getRetryPolicy(disableNotFoundRetries bool, service string, optionals ...in
247247

248248
func getDefaultRetryPolicy(disableNotFoundRetries bool, service string, optionals ...interface{}) *oci_common.RetryPolicy {
249249
startTime := time.Now()
250-
maximumNumberAttempts := 0
251-
shouldRetryOperation := func(response oci_common.OCIOperationResponse) bool {
252-
return shouldRetry(response, disableNotFoundRetries, service, startTime, optionals...)
250+
retryPolicy := &oci_common.RetryPolicy{
251+
MaximumNumberAttempts: 0,
252+
ShouldRetryOperation: func(response oci_common.OCIOperationResponse) bool {
253+
return shouldRetry(response, disableNotFoundRetries, service, startTime, optionals...)
254+
},
255+
NextDuration: func(response oci_common.OCIOperationResponse) time.Duration {
256+
return getRetryBackoffDuration(response, disableNotFoundRetries, service, startTime, optionals...)
257+
},
253258
}
254-
nexDuration := func(response oci_common.OCIOperationResponse) time.Duration {
255-
return getRetryBackoffDuration(response, disableNotFoundRetries, service, startTime, optionals...)
256-
}
257-
retryPolicy := oci_common.NewRetryPolicy(uint(maximumNumberAttempts), shouldRetryOperation, nexDuration)
258-
return &retryPolicy
259+
260+
return retryPolicy
259261
}

vendor/github.com/sony/gobreaker/.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

vendor/github.com/sony/gobreaker/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

vendor/github.com/sony/gobreaker/README.md

Lines changed: 0 additions & 128 deletions
This file was deleted.

vendor/github.com/sony/gobreaker/go.mod

Lines changed: 0 additions & 5 deletions
This file was deleted.

vendor/github.com/sony/gobreaker/go.sum

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)