ui: Fix netowrkid not passed in deployvm (#6711)

Fixes the issue of the networkid not being passed when deploying a VM
This is caused when the first template selected is a deploy-as-is one and the nicToNetworkSelection not being reset when selecting a new template
This commit is contained in:
David Jumani 2022-09-07 12:25:23 +05:30 committed by GitHub
parent fe16be0408
commit f342cf300e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2158,6 +2158,7 @@ export default {
},
fetchTemplateNics (template) {
var nics = []
this.nicToNetworkSelection = []
if (template && template.deployasisdetails && Object.keys(template.deployasisdetails).length > 0) {
var keys = Object.keys(template.deployasisdetails)
keys = keys.filter(key => key.startsWith('network-'))
@ -2169,7 +2170,6 @@ export default {
return a.InstanceID - b.InstanceID
})
if (this.options.networks && this.options.networks.length > 0) {
this.nicToNetworkSelection = []
for (var i = 0; i < nics.length; ++i) {
var nic = nics[i]
nic.id = nic.InstanceID