Skip to content

Commit

Permalink
Do not forget to update the switch os on register. (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 authored Feb 23, 2023
1 parent 2ff533e commit 921351b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/metal-api/internal/service/switch-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,15 @@ func (r *switchResource) registerSwitch(request *restful.Request, response *rest
}
s.RackID = spec.RackID
s.PartitionID = spec.PartitionID
if spec.OS != nil {
if s.OS == nil {
s.OS = &metal.SwitchOS{}
}
s.OS.Vendor = spec.OS.Vendor
s.OS.Version = spec.OS.Version
}
s.ManagementIP = spec.ManagementIP
s.ManagementUser = spec.ManagementUser

s.Nics = nics
// Do not replace connections here: We do not want to loose them!
Expand Down

0 comments on commit 921351b

Please sign in to comment.