Add disk size as an option
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/go-logr/logr"
|
||||
@ -392,6 +393,16 @@ func (env *Environemnt) Get(ctx context.Context) error {
|
||||
} else {
|
||||
env.Data.Location = ""
|
||||
}
|
||||
if val, ok := res["SP_DISK_SIZE"]; ok {
|
||||
intVal, err := strconv.Atoi(val)
|
||||
if err != nil {
|
||||
log.Error(err, "Couldn't parse disk size")
|
||||
intVal = 0
|
||||
}
|
||||
env.Data.DiskSize = intVal
|
||||
} else {
|
||||
env.Data.Location = ""
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user