Update for NA storage

This commit is contained in:
mikesplain 2019-11-18 09:43:07 -08:00
parent baa5ae3934
commit 663ef95171
No known key found for this signature in database
GPG Key ID: D5E91A3C9BBEA323
1 changed files with 10 additions and 5 deletions

View File

@ -182,13 +182,18 @@ func run() error {
if attributes["storage"] != "EBS only" {
storage := strings.Split(attributes["storage"], " ")
count := stringToInt(storage[0])
var size int
if storage[2] == "NVMe" {
count = 1
size = stringToInt(storage[0])
var count int
if len(storage) > 1 {
count = stringToInt(storage[0])
if storage[2] == "NVMe" {
count = 1
size = stringToInt(storage[0])
} else {
size = stringToInt(storage[2])
}
} else {
size = stringToInt(storage[2])
count = 0
}
ephemeralDisks := []int{}