Skip to content

Commit 75ef9bf

Browse files
committed
fixup! fixup! ♻️ refacto: switch to SDKv3
1 parent 42ebf9d commit 75ef9bf

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

cloud-controller-manager/osc/oapi/log_oapi.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"strings"
1111
"time"
1212

13-
"github.com/outscale/osc-sdk-go/v3/pkg/logger"
1413
"k8s.io/klog/v2"
1514
)
1615

@@ -28,9 +27,7 @@ func truncatedBody(body string) string {
2827
return string(str)
2928
}
3029

31-
type OAPILogger struct {
32-
logger.Logger
33-
}
30+
type OAPILogger struct{}
3431

3532
func callName(r *http.Request) string {
3633
return path.Base(r.URL.RawPath)
@@ -48,6 +45,9 @@ func requestBody(req *http.Request) ([]byte, error) {
4845
return buf, nil
4946
}
5047

48+
func (OAPILogger) Request(ctx context.Context, req any) {}
49+
func (OAPILogger) Response(ctx context.Context, resp any) {}
50+
5151
func (l OAPILogger) RequestHttp(ctx context.Context, req *http.Request) {
5252
logger := klog.FromContext(ctx).WithCallDepth(1)
5353
if !logger.V(5).Enabled() {

cloud-controller-manager/osc/oapi/oapi.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ var (
4141

4242
func (c *OscClient) CheckCredentials(ctx context.Context) error {
4343
logger := klog.FromContext(ctx)
44-
req := osc.ReadVmsRequest{}
4544
logger.V(5).Info("Check credentials")
46-
_, err := c.api.ReadVms(ctx, req)
45+
_, err := c.api.ReadVms(ctx, osc.ReadVmsRequest{})
4746
if err == nil {
4847
return nil
4948
}

0 commit comments

Comments
 (0)