Skip to content

Commit

Permalink
fix: OnlyReservations flag not respected
Browse files Browse the repository at this point in the history
Fixes issue digitalrebar#176
  • Loading branch information
wideblue committed Mar 24, 2020
1 parent 22be11f commit 25af76e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions models/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,13 @@ func (s *Subnet) Fill() {
if s.Strategy == "" {
s.Strategy = "MAC"
}
if s.Pickers == nil || len(s.Pickers) == 0 {
if s.OnlyReservations {
s.Pickers = []string{"none"}
} else {
s.Pickers = []string{"hint", "nextFree", "mostExpired"}
}

if s.OnlyReservations {
s.Pickers = []string{"none"}
} else {
s.Pickers = []string{"hint", "nextFree", "mostExpired"}
}

if s.ActiveLeaseTime == 0 {
s.ActiveLeaseTime = 60
}
Expand Down

0 comments on commit 25af76e

Please sign in to comment.