Skip to content

Commit 4492729

Browse files
committed
chore(iaas): Update SDK version to 1.15.0
Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
1 parent ea3cc78 commit 4492729

4 files changed

Lines changed: 18 additions & 18 deletions

File tree

‎internal/cmd/network-area/route/list/list.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ func outputResult(p *print.Printer, outputFormat, networkAreaLabel string, route
152152
routeNexthop := route.Nexthop
153153
if routeNexthop.NexthopIPv4 != nil {
154154
nextHop = routeNexthop.NexthopIPv4.Value
155-
nextHopType = routeNexthop.NexthopIPv4.Type
155+
nextHopType = string(routeNexthop.NexthopIPv4.Type)
156156
} else if routeNexthop.NexthopIPv6 != nil {
157157
nextHop = routeNexthop.NexthopIPv6.Value
158-
nextHopType = routeNexthop.NexthopIPv6.Type
158+
nextHopType = string(routeNexthop.NexthopIPv6.Type)
159159
} else if routeNexthop.NexthopBlackhole != nil {
160-
nextHopType = routeNexthop.NexthopBlackhole.Type
160+
nextHopType = string(routeNexthop.NexthopBlackhole.Type)
161161
} else if routeNexthop.NexthopInternet != nil {
162-
nextHopType = routeNexthop.NexthopInternet.Type
162+
nextHopType = string(routeNexthop.NexthopInternet.Type)
163163
}
164164

165165
table.AddRow(

‎internal/cmd/network-area/routingtable/route/create/create.go‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,14 @@ func buildDestination(model *inputModel) *iaas.RouteDestination {
210210
case destTypeCIDRv4:
211211
return &iaas.RouteDestination{
212212
DestinationCIDRv4: &iaas.DestinationCIDRv4{
213-
Type: model.DestinationType,
213+
Type: iaas.DestinationCIDRv4Type(model.DestinationType),
214214
Value: *model.DestinationValue,
215215
},
216216
}
217217
case destTypeCIDRv6:
218218
return &iaas.RouteDestination{
219219
DestinationCIDRv6: &iaas.DestinationCIDRv6{
220-
Type: model.DestinationType,
220+
Type: iaas.DestinationCIDRv6Type(model.DestinationType),
221221
Value: *model.DestinationValue,
222222
},
223223
}
@@ -232,27 +232,27 @@ func buildNextHop(model *inputModel) *iaas.RouteNexthop {
232232
case nextHopTypeIPv4:
233233
return &iaas.RouteNexthop{
234234
NexthopIPv4: &iaas.NexthopIPv4{
235-
Type: model.NextHopType,
235+
Type: iaas.NexthopIPv4Type(model.NextHopType),
236236
Value: *model.NextHopValue,
237237
},
238238
}
239239
case nextHopTypeIPv6:
240240
return &iaas.RouteNexthop{
241241
NexthopIPv6: &iaas.NexthopIPv6{
242-
Type: model.NextHopType,
242+
Type: iaas.NexthopIPv6Type(model.NextHopType),
243243
Value: *model.NextHopValue,
244244
},
245245
}
246246
case nextHopTypeInternet:
247247
return &iaas.RouteNexthop{
248248
NexthopInternet: &iaas.NexthopInternet{
249-
Type: model.NextHopType,
249+
Type: iaas.NexthopInternetType(model.NextHopType),
250250
},
251251
}
252252
case nextHopTypeBlackhole:
253253
return &iaas.RouteNexthop{
254254
NexthopBlackhole: &iaas.NexthopBlackhole{
255-
Type: model.NextHopType,
255+
Type: iaas.NexthopBlackholeType(model.NextHopType),
256256
},
257257
}
258258
default:

‎internal/pkg/services/iaas/utils/utils.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ func GetRouteFromAPIResponse(destination, nexthop string, routes []iaas.Route) (
134134
nextHopV6 := route.Nexthop.NexthopIPv6
135135
nextHopV6Matches := nextHopV6 != nil && nextHopV6.Value == nexthop
136136
nextHopInet := route.Nexthop.NexthopInternet
137-
nextHopInetMatches := nextHopInet != nil && nextHopInet.Type == nexthop
137+
nextHopInetMatches := nextHopInet != nil && nextHopInet.Type == iaas.NexthopInternetType(nexthop)
138138
nextHopBlackhole := route.Nexthop.NexthopBlackhole
139-
nextHopBlackholeMatches := nextHopBlackhole != nil && nextHopBlackhole.Type == nexthop
139+
nextHopBlackholeMatches := nextHopBlackhole != nil && nextHopBlackhole.Type == iaas.NexthopBlackholeType(nexthop)
140140
nextHopMatches := nextHopV4Matches || nextHopV6Matches || nextHopInetMatches || nextHopBlackholeMatches
141141
if nextHopMatches {
142142
return route, nil

‎internal/pkg/services/network-area/routing-table/utils/utils.go‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ func ExtractRouteDetails(route *iaas.Route) RouteDetails {
2323
var routeDetails RouteDetails
2424

2525
if route.Destination.DestinationCIDRv4 != nil {
26-
routeDetails.DestType = route.Destination.DestinationCIDRv4.Type
26+
routeDetails.DestType = string(route.Destination.DestinationCIDRv4.Type)
2727
routeDetails.DestValue = route.Destination.DestinationCIDRv4.Value
2828
} else if route.Destination.DestinationCIDRv6 != nil {
29-
routeDetails.DestType = route.Destination.DestinationCIDRv6.Type
29+
routeDetails.DestType = string(route.Destination.DestinationCIDRv6.Type)
3030
routeDetails.DestValue = route.Destination.DestinationCIDRv6.Value
3131
}
3232

3333
if route.Nexthop.NexthopIPv4 != nil {
34-
routeDetails.HopType = route.Nexthop.NexthopIPv4.Type
34+
routeDetails.HopType = string(route.Nexthop.NexthopIPv4.Type)
3535
routeDetails.HopValue = route.Nexthop.NexthopIPv4.Value
3636
} else if route.Nexthop.NexthopIPv6 != nil {
37-
routeDetails.HopType = route.Nexthop.NexthopIPv6.Type
37+
routeDetails.HopType = string(route.Nexthop.NexthopIPv6.Type)
3838
routeDetails.HopValue = route.Nexthop.NexthopIPv6.Value
3939
} else if route.Nexthop.NexthopInternet != nil {
40-
routeDetails.HopType = route.Nexthop.NexthopInternet.Type
40+
routeDetails.HopType = string(route.Nexthop.NexthopInternet.Type)
4141
} else if route.Nexthop.NexthopBlackhole != nil {
42-
routeDetails.HopType = route.Nexthop.NexthopBlackhole.Type
42+
routeDetails.HopType = string(route.Nexthop.NexthopBlackhole.Type)
4343
}
4444

4545
if len(route.Labels) > 0 {

0 commit comments

Comments
 (0)