fix(deps): update stackit sdk modules (#846)
* fix(deps): update stackit sdk modules * feat: Use new generated enums Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> --------- Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com> Co-authored-by: Alexander Dahmen <alexander.dahmen@inovex.de>
This commit is contained in:
parent
5d844a84d6
commit
7ce802769c
33 changed files with 222 additions and 225 deletions
|
|
@ -895,7 +895,7 @@ func toListenersPayload(ctx context.Context, model *Model) (*[]loadbalancer.List
|
|||
payload = append(payload, loadbalancer.Listener{
|
||||
DisplayName: conversion.StringValueToPointer(listenerModel.DisplayName),
|
||||
Port: conversion.Int64ValueToPointer(listenerModel.Port),
|
||||
Protocol: conversion.StringValueToPointer(listenerModel.Protocol),
|
||||
Protocol: loadbalancer.ListenerGetProtocolAttributeType(conversion.StringValueToPointer(listenerModel.Protocol)),
|
||||
ServerNameIndicators: serverNameIndicatorsPayload,
|
||||
TargetPool: conversion.StringValueToPointer(listenerModel.TargetPool),
|
||||
})
|
||||
|
|
@ -946,7 +946,7 @@ func toNetworksPayload(ctx context.Context, model *Model) (*[]loadbalancer.Netwo
|
|||
networkModel := networksModel[i]
|
||||
payload = append(payload, loadbalancer.Network{
|
||||
NetworkId: conversion.StringValueToPointer(networkModel.NetworkId),
|
||||
Role: conversion.StringValueToPointer(networkModel.Role),
|
||||
Role: loadbalancer.NetworkGetRoleAttributeType(conversion.StringValueToPointer(networkModel.Role)),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -1212,7 +1212,7 @@ func mapListeners(loadBalancerResp *loadbalancer.LoadBalancer, m *Model) error {
|
|||
listenerMap := map[string]attr.Value{
|
||||
"display_name": types.StringPointerValue(listenerResp.DisplayName),
|
||||
"port": types.Int64PointerValue(listenerResp.Port),
|
||||
"protocol": types.StringPointerValue(listenerResp.Protocol),
|
||||
"protocol": types.StringValue(string(listenerResp.GetProtocol())),
|
||||
"target_pool": types.StringPointerValue(listenerResp.TargetPool),
|
||||
}
|
||||
|
||||
|
|
@ -1283,7 +1283,7 @@ func mapNetworks(loadBalancerResp *loadbalancer.LoadBalancer, m *Model) error {
|
|||
for i, networkResp := range *loadBalancerResp.Networks {
|
||||
networkMap := map[string]attr.Value{
|
||||
"network_id": types.StringPointerValue(networkResp.NetworkId),
|
||||
"role": types.StringPointerValue(networkResp.Role),
|
||||
"role": types.StringValue(string(networkResp.GetRole())),
|
||||
}
|
||||
|
||||
networkTF, diags := types.ObjectValue(networkTypes, networkMap)
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ func TestToCreatePayload(t *testing.T) {
|
|||
types.ObjectValueMust(listenerTypes, map[string]attr.Value{
|
||||
"display_name": types.StringValue("display_name"),
|
||||
"port": types.Int64Value(80),
|
||||
"protocol": types.StringValue("protocol"),
|
||||
"protocol": types.StringValue(string(loadbalancer.LISTENERPROTOCOL_TCP)),
|
||||
"server_name_indicators": types.ListValueMust(types.ObjectType{AttrTypes: serverNameIndicatorTypes}, []attr.Value{
|
||||
types.ObjectValueMust(
|
||||
serverNameIndicatorTypes,
|
||||
|
|
@ -63,11 +63,11 @@ func TestToCreatePayload(t *testing.T) {
|
|||
Networks: types.ListValueMust(types.ObjectType{AttrTypes: networkTypes}, []attr.Value{
|
||||
types.ObjectValueMust(networkTypes, map[string]attr.Value{
|
||||
"network_id": types.StringValue("network_id"),
|
||||
"role": types.StringValue("role"),
|
||||
"role": types.StringValue(string(loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS)),
|
||||
}),
|
||||
types.ObjectValueMust(networkTypes, map[string]attr.Value{
|
||||
"network_id": types.StringValue("network_id_2"),
|
||||
"role": types.StringValue("role_2"),
|
||||
"role": types.StringValue(string(loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS)),
|
||||
}),
|
||||
}),
|
||||
Options: types.ObjectValueMust(
|
||||
|
|
@ -118,7 +118,7 @@ func TestToCreatePayload(t *testing.T) {
|
|||
{
|
||||
DisplayName: utils.Ptr("display_name"),
|
||||
Port: utils.Ptr(int64(80)),
|
||||
Protocol: utils.Ptr("protocol"),
|
||||
Protocol: loadbalancer.LISTENERPROTOCOL_TCP.Ptr(),
|
||||
ServerNameIndicators: &[]loadbalancer.ServerNameIndicator{
|
||||
{
|
||||
Name: utils.Ptr("domain.com"),
|
||||
|
|
@ -131,11 +131,11 @@ func TestToCreatePayload(t *testing.T) {
|
|||
Networks: &[]loadbalancer.Network{
|
||||
{
|
||||
NetworkId: utils.Ptr("network_id"),
|
||||
Role: utils.Ptr("role"),
|
||||
Role: loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS.Ptr(),
|
||||
},
|
||||
{
|
||||
NetworkId: utils.Ptr("network_id_2"),
|
||||
Role: utils.Ptr("role_2"),
|
||||
Role: loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS.Ptr(),
|
||||
},
|
||||
},
|
||||
Options: &loadbalancer.LoadBalancerOptions{
|
||||
|
|
@ -355,7 +355,7 @@ func TestMapFields(t *testing.T) {
|
|||
{
|
||||
DisplayName: utils.Ptr("display_name"),
|
||||
Port: utils.Ptr(int64(80)),
|
||||
Protocol: utils.Ptr("protocol"),
|
||||
Protocol: loadbalancer.LISTENERPROTOCOL_TCP.Ptr(),
|
||||
ServerNameIndicators: &[]loadbalancer.ServerNameIndicator{
|
||||
{
|
||||
Name: utils.Ptr("domain.com"),
|
||||
|
|
@ -368,11 +368,11 @@ func TestMapFields(t *testing.T) {
|
|||
Networks: utils.Ptr([]loadbalancer.Network{
|
||||
{
|
||||
NetworkId: utils.Ptr("network_id"),
|
||||
Role: utils.Ptr("role"),
|
||||
Role: loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS.Ptr(),
|
||||
},
|
||||
{
|
||||
NetworkId: utils.Ptr("network_id_2"),
|
||||
Role: utils.Ptr("role_2"),
|
||||
Role: loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS.Ptr(),
|
||||
},
|
||||
}),
|
||||
Options: utils.Ptr(loadbalancer.LoadBalancerOptions{
|
||||
|
|
@ -421,7 +421,7 @@ func TestMapFields(t *testing.T) {
|
|||
types.ObjectValueMust(listenerTypes, map[string]attr.Value{
|
||||
"display_name": types.StringValue("display_name"),
|
||||
"port": types.Int64Value(80),
|
||||
"protocol": types.StringValue("protocol"),
|
||||
"protocol": types.StringValue(string(loadbalancer.LISTENERPROTOCOL_TCP)),
|
||||
"server_name_indicators": types.ListValueMust(types.ObjectType{AttrTypes: serverNameIndicatorTypes}, []attr.Value{
|
||||
types.ObjectValueMust(
|
||||
serverNameIndicatorTypes,
|
||||
|
|
@ -438,11 +438,11 @@ func TestMapFields(t *testing.T) {
|
|||
Networks: types.ListValueMust(types.ObjectType{AttrTypes: networkTypes}, []attr.Value{
|
||||
types.ObjectValueMust(networkTypes, map[string]attr.Value{
|
||||
"network_id": types.StringValue("network_id"),
|
||||
"role": types.StringValue("role"),
|
||||
"role": types.StringValue(string(loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS)),
|
||||
}),
|
||||
types.ObjectValueMust(networkTypes, map[string]attr.Value{
|
||||
"network_id": types.StringValue("network_id_2"),
|
||||
"role": types.StringValue("role_2"),
|
||||
"role": types.StringValue(string(loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS)),
|
||||
}),
|
||||
}),
|
||||
Options: types.ObjectValueMust(
|
||||
|
|
@ -496,7 +496,7 @@ func TestMapFields(t *testing.T) {
|
|||
{
|
||||
DisplayName: utils.Ptr("display_name"),
|
||||
Port: utils.Ptr(int64(80)),
|
||||
Protocol: utils.Ptr("protocol"),
|
||||
Protocol: loadbalancer.LISTENERPROTOCOL_TCP.Ptr(),
|
||||
ServerNameIndicators: &[]loadbalancer.ServerNameIndicator{
|
||||
{
|
||||
Name: utils.Ptr("domain.com"),
|
||||
|
|
@ -509,11 +509,11 @@ func TestMapFields(t *testing.T) {
|
|||
Networks: utils.Ptr([]loadbalancer.Network{
|
||||
{
|
||||
NetworkId: utils.Ptr("network_id"),
|
||||
Role: utils.Ptr("role"),
|
||||
Role: loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS.Ptr(),
|
||||
},
|
||||
{
|
||||
NetworkId: utils.Ptr("network_id_2"),
|
||||
Role: utils.Ptr("role_2"),
|
||||
Role: loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS.Ptr(),
|
||||
},
|
||||
}),
|
||||
Options: utils.Ptr(loadbalancer.LoadBalancerOptions{
|
||||
|
|
@ -565,7 +565,7 @@ func TestMapFields(t *testing.T) {
|
|||
types.ObjectValueMust(listenerTypes, map[string]attr.Value{
|
||||
"display_name": types.StringValue("display_name"),
|
||||
"port": types.Int64Value(80),
|
||||
"protocol": types.StringValue("protocol"),
|
||||
"protocol": types.StringValue(string(loadbalancer.LISTENERPROTOCOL_TCP)),
|
||||
"server_name_indicators": types.ListValueMust(types.ObjectType{AttrTypes: serverNameIndicatorTypes}, []attr.Value{
|
||||
types.ObjectValueMust(
|
||||
serverNameIndicatorTypes,
|
||||
|
|
@ -582,11 +582,11 @@ func TestMapFields(t *testing.T) {
|
|||
Networks: types.ListValueMust(types.ObjectType{AttrTypes: networkTypes}, []attr.Value{
|
||||
types.ObjectValueMust(networkTypes, map[string]attr.Value{
|
||||
"network_id": types.StringValue("network_id"),
|
||||
"role": types.StringValue("role"),
|
||||
"role": types.StringValue(string(loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS)),
|
||||
}),
|
||||
types.ObjectValueMust(networkTypes, map[string]attr.Value{
|
||||
"network_id": types.StringValue("network_id_2"),
|
||||
"role": types.StringValue("role_2"),
|
||||
"role": types.StringValue(string(loadbalancer.NETWORKROLE_LISTENERS_AND_TARGETS)),
|
||||
}),
|
||||
}),
|
||||
Options: types.ObjectValueMust(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue