Skip to content

Commit

Permalink
Add xvda support to Template device parition rendering
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Doherty <chris.doherty4@gmail.com>
  • Loading branch information
chrisdoherty4 committed Sep 5, 2023
1 parent 47ec6ff commit 703a6e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/workflow/template_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ func formatPartition(dev string, partition int) string {
switch {
case strings.HasPrefix(dev, "/dev/nvme"):
return fmt.Sprintf("%vp%v", dev, partition)
case strings.HasPrefix(dev, "/dev/sd"), strings.HasPrefix(dev, "/dev/vd"), strings.HasPrefix(dev, "/dev/hd"):
case strings.HasPrefix(dev, "/dev/sd"),
strings.HasPrefix(dev, "/dev/vd"),
strings.HasPrefix(dev, "/dev/xvd"),
strings.HasPrefix(dev, "/dev/hd"):
return fmt.Sprintf("%v%v", dev, partition)
}
return dev
Expand Down

0 comments on commit 703a6e0

Please sign in to comment.