Fix: fix imports and names (#9)
* fix: add missing entries and correct refs * fix: add missing docs --------- Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
This commit is contained in:
parent
db080dc89a
commit
944a75295f
19 changed files with 424 additions and 235 deletions
|
|
@ -216,7 +216,7 @@ func toCreatePayload(model *Model, storage *storageModel, encryption *encryption
|
|||
var aclElements []string
|
||||
if network != nil && !(network.ACL.IsNull() || network.ACL.IsUnknown()) {
|
||||
aclElements = make([]string, 0, len(network.ACL.Elements()))
|
||||
diags := network.ACL.ElementsAs(nil, &aclElements, false)
|
||||
diags := network.ACL.ElementsAs(context.TODO(), &aclElements, false)
|
||||
if diags.HasError() {
|
||||
return nil, fmt.Errorf("creating network: %w", core.DiagsToError(diags))
|
||||
}
|
||||
|
|
@ -259,7 +259,7 @@ func toUpdatePayload(model *Model, storage *storageModel, network *networkModel)
|
|||
var aclElements []string
|
||||
if network != nil && !(network.ACL.IsNull() || network.ACL.IsUnknown()) {
|
||||
aclElements = make([]string, 0, len(network.ACL.Elements()))
|
||||
diags := network.ACL.ElementsAs(nil, &aclElements, false)
|
||||
diags := network.ACL.ElementsAs(context.TODO(), &aclElements, false)
|
||||
if diags.HasError() {
|
||||
return nil, fmt.Errorf("creating network: %w", core.DiagsToError(diags))
|
||||
}
|
||||
|
|
@ -349,7 +349,7 @@ func loadFlavorId(ctx context.Context, client sqlserverflexClient, model *Model,
|
|||
if f.Id == nil || f.Cpu == nil || f.Memory == nil {
|
||||
continue
|
||||
}
|
||||
if strings.ToLower(*f.NodeType) != strings.ToLower(*nodeType) {
|
||||
if !strings.EqualFold(*f.NodeType, *nodeType) {
|
||||
continue
|
||||
}
|
||||
if *f.Cpu == *cpu && *f.Memory == *ram {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue