1.1.0
This commit is contained in:
@@ -59,14 +59,17 @@ func resourceComputeInputChecks(ctx context.Context, plan *models.ResourceComput
|
||||
diags.AddError(fmt.Sprintf("Cannot create compute because extnet ID %d is not allowed or does not exist", extNetId), err.Error())
|
||||
}
|
||||
case "VFNIC":
|
||||
if strings.EqualFold(plan.Driver.ValueString(), "KVM_PPC") {
|
||||
diags.AddError("can't create compute because 'VFNIC' net_type is not allowed for driver 'KVM_PPC'", "")
|
||||
}
|
||||
vfpoolId := uint64(elemMap["net_id"].(types.Int64).ValueInt64())
|
||||
err = ic.ExistVFPool(ctx, vfpoolId, c)
|
||||
if err != nil {
|
||||
diags.AddError(fmt.Sprintf("Cannot create compute because vfpool ID %d is not allowed or does not exist", vfpoolId), err.Error())
|
||||
}
|
||||
case "DPDK":
|
||||
dpdkId := uint64(elemMap["net_id"].(types.Int64).ValueInt64())
|
||||
err = ic.ExistDPDK(ctx, dpdkId, c)
|
||||
if err != nil {
|
||||
diags.AddError(fmt.Sprintf("Cannot create compute because DPDK net ID %d is not allowed or does not exist", dpdkId), err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user