Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/aws/aws-sdk-go-v2/config v1.31.21
github.com/aws/aws-sdk-go-v2/service/s3 v1.91.0
github.com/aws/smithy-go v1.25.1
github.com/outscale/osc-sdk-go/v3 v3.0.0-rc.1.0.20260325152615-8ac3c57fdae9
github.com/outscale/osc-sdk-go/v3 v3.0.0-rc.2
github.com/teris-io/cli v1.0.1
)

Expand All @@ -35,6 +35,6 @@ require (
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/oapi-codegen/runtime v1.2.0 // indirect
github.com/oapi-codegen/runtime v1.3.1 // indirect
go.uber.org/ratelimit v0.3.1 // indirect
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/oapi-codegen/runtime v1.2.0 h1:RvKc1CVS1QeKSNzO97FBQbSMZyQ8s6rZd+LpmzwHMP4=
github.com/oapi-codegen/runtime v1.2.0/go.mod h1:Y7ZhmmlE8ikZOmuHRRndiIm7nf3xcVv+YMweKgG1DT0=
github.com/oapi-codegen/runtime v1.3.1 h1:RgDY6J4OGQLbRXhG/Xpt3vSVqYpHQS7hN4m85+5xB9g=
github.com/oapi-codegen/runtime v1.3.1/go.mod h1:kOdeacKy7t40Rclb1je37ZLFboFxh+YLy0zaPCMibPY=
github.com/outscale/osc-sdk-go/v3 v3.0.0-rc.1.0.20260325152615-8ac3c57fdae9 h1:+02xVACMscx3PPiz0HQ3nYYBzPr2d53vXrVqWW9EazY=
github.com/outscale/osc-sdk-go/v3 v3.0.0-rc.1.0.20260325152615-8ac3c57fdae9/go.mod h1:UcWWGficA2HzrZ3ZYYfqZpOdCACDF22PUGBgTZF/FUo=
github.com/outscale/osc-sdk-go/v3 v3.0.0-rc.2 h1:uj8s4jaqqzq2hFqQVAB6PTVwuPm43e5Ti/ZFQqvCAB0=
github.com/outscale/osc-sdk-go/v3 v3.0.0-rc.2/go.mod h1:Yi0j2XAZ0/8g0ObVFofMSL5+IuNIDp/AiEI6gXc7txc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
Expand Down
20 changes: 10 additions & 10 deletions internal/providers/outscale_oapi/outscale_oapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,8 @@ func (provider *OutscaleOAPI) readVpnConnections(ctx context.Context) ([]Object,
ctx,
osc.ReadVpnConnectionsRequest{
Filters: &osc.FiltersVpnConnection{
States: &[]string{
"pending", "available", // skipping deleting, deleted
States: &[]osc.VpnConnectionState{
osc.VpnConnectionStatePending, osc.VpnConnectionStateAvailable, // skipping deleting, deleted
},
},
},
Expand Down Expand Up @@ -1051,8 +1051,8 @@ func (provider *OutscaleOAPI) readClientGateways(ctx context.Context) ([]Object,
ctx,
osc.ReadClientGatewaysRequest{
Filters: &osc.FiltersClientGateway{
States: &[]string{
"pending", "available", // skipping deleting, deleted
States: &[]osc.ClientGatewayState{
osc.ClientGatewayStatePending, osc.ClientGatewayStateAvailable, // skipping deleting, deleted
},
},
},
Expand Down Expand Up @@ -1521,8 +1521,8 @@ func (provider *OutscaleOAPI) readFlexibleGpus(ctx context.Context) ([]Object, e
return nil, fmt.Errorf("read flexible gpus: %w", getErrorInfo(err))
}
for i, gpu := range *read.FlexibleGpus {
flexibleGpus = append(flexibleGpus, *gpu.FlexibleGpuId)
provider.cache.flexibleGpus[*gpu.FlexibleGpuId] = &(*read.FlexibleGpus)[i]
flexibleGpus = append(flexibleGpus, gpu.FlexibleGpuId)
provider.cache.flexibleGpus[gpu.FlexibleGpuId] = &(*read.FlexibleGpus)[i]
}
return flexibleGpus, nil
}
Expand All @@ -1533,13 +1533,13 @@ func (provider *OutscaleOAPI) unlinkFlexibleGpus(ctx context.Context, flexibleGp
if gpu == nil {
continue
}
switch *gpu.State {
case "attaching", "attached":
switch gpu.State {
case osc.FlexibleGpuStateAttaching, osc.FlexibleGpuStateAttached:
default:
continue
}
log.Printf("Unlinking flexible gpu %s... ", *gpu.FlexibleGpuId)
unlinkOpts := osc.UnlinkFlexibleGpuRequest{FlexibleGpuId: *gpu.FlexibleGpuId}
log.Printf("Unlinking flexible gpu %s... ", gpu.FlexibleGpuId)
unlinkOpts := osc.UnlinkFlexibleGpuRequest{FlexibleGpuId: gpu.FlexibleGpuId}
_, err := provider.client.UnlinkFlexibleGpu(ctx, unlinkOpts)
if err != nil {
log.Printf("Error while unlinking flexible gpu: %v\n", getErrorInfo(err))
Expand Down