Skip to content

Commit

Permalink
region: fix server create params not include specified resource
Browse files Browse the repository at this point in the history
  • Loading branch information
zexi committed May 19, 2020
1 parent d4217ff commit 4713312
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/compute/models/guests.go
Original file line number Diff line number Diff line change
Expand Up @@ -4834,7 +4834,9 @@ func (self *SGuest) ToCreateInput(userCred mcclient.TokenCredential) *api.Server
for idx, disk := range genInput.Disks {
tmpD := disk
if idx < len(userInput.Disks) {
tmpD.Schedtags = userInput.Disks[idx].Schedtags
inputDisk := userInput.Disks[idx]
tmpD.Schedtags = inputDisk.Schedtags
tmpD.Storage = inputDisk.Storage
}
disks = append(disks, tmpD)
}
Expand All @@ -4844,7 +4846,9 @@ func (self *SGuest) ToCreateInput(userCred mcclient.TokenCredential) *api.Server
for idx, net := range genInput.Networks {
tmpN := net
if idx < len(userInput.Networks) {
tmpN.Schedtags = userInput.Disks[idx].Schedtags
inputNet := userInput.Networks[idx]
tmpN.Schedtags = inputNet.Schedtags
tmpN.Network = inputNet.Network
}
nets = append(nets, tmpN)
}
Expand Down

0 comments on commit 4713312

Please sign in to comment.