Skip to content

Allow selecting network for VNF nics if template nics > 0 and is a non deploy-as-is template - #13423

Merged
weizhouapache merged 2 commits into
4.22from
fix-vnf-net-select-non-deployasis
Jun 18, 2026
Merged

Allow selecting network for VNF nics if template nics > 0 and is a non deploy-as-is template#13423
weizhouapache merged 2 commits into
4.22from
fix-vnf-net-select-non-deployasis

Conversation

@Pearl1594

Copy link
Copy Markdown
Contributor

Description

This PR fixes an issue where we can't select the network for VNF nic mapping if there are template nics and it's a non deploy-as-is VNF template

introduced by: #12499

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@Pearl1594
Pearl1594 changed the base branch from main to 4.22June 15, 2026 17:30
@Pearl1594
Pearl1594 requested a review from nvazquezJune 15, 2026 17:30
@Pearl1594Pearl1594 added this to the 4.22.2 milestone Jun 15, 2026

@nvazqueznvazquez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM thanks @Pearl1594

@codecov

codecovBot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.67%. Comparing base (21b2025) to head (fead05b).
⚠️ Report is 1 commits behind head on 4.22.

Additional details and impacted files
@@ Coverage Diff @@## 4.22 #13423 +/- ##
============================================
- Coverage 17.67% 17.67% -0.01% 
Complexity 15792 15792 ============================================
Files 5922 5922 Lines 533165 533180 +15 Branches 65208 65218 +10 ============================================
+ Hits 94242 94244 +2 - Misses 428276 428290 +14 + Partials 10647 10646 -1 
FlagCoverage Δ
uitests3.69% <ø> (-0.01%)⬇️
unittests18.75% <ø> (+<0.01%)⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@weizhouapache

Copy link
Copy Markdown
Member

@Pearl1594
How to reproduce this ?

if there are template nics and it's a non deploy-as-is VNF template

@weizhouapache

Copy link
Copy Markdown
Member

thanks @Pearl1594 for the info

I can reproduce the issue.

the fix could be as simple as

diff --git a/ui/src/views/compute/wizard/VnfNicsSelection.vue b/ui/src/views/compute/wizard/VnfNicsSelection.vue
index 40bdc1c676a..538c9553eb4 100644
--- a/ui/src/views/compute/wizard/VnfNicsSelection.vue
+++ b/ui/src/views/compute/wizard/VnfNicsSelection.vue
@@ -50,7 +50,7 @@
<template #network="{ record }">
<a-form-item style="display: block" :name="'nic-' + record.deviceid">
<a-select
- disabled="templateNics && templateNics.length > 0"
+ :disabled="templateNics && templateNics.length > 0"
@change="updateNicNetworkValue($event, record.deviceid)"
optionFilterProp="label"
:filterOption="(input, option) => {

🤦

@Pearl1594

Copy link
Copy Markdown
ContributorAuthor

thanks @Pearl1594 for the info

I can reproduce the issue.

the fix could be as simple as

diff --git a/ui/src/views/compute/wizard/VnfNicsSelection.vue b/ui/src/views/compute/wizard/VnfNicsSelection.vue
index 40bdc1c676a..538c9553eb4 100644
--- a/ui/src/views/compute/wizard/VnfNicsSelection.vue
+++ b/ui/src/views/compute/wizard/VnfNicsSelection.vue
@@ -50,7 +50,7 @@
<template #network="{ record }">
<a-form-item style="display: block" :name="'nic-' + record.deviceid">
<a-select
- disabled="templateNics && templateNics.length > 0"
+ :disabled="templateNics && templateNics.length > 0"
@change="updateNicNetworkValue($event, record.deviceid)"
optionFilterProp="label"
:filterOption="(input, option) => {

🤦

Oh yeah

@sonarqubecloud

Copy link
Copy Markdown

@weizhouapacheweizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

verified OK

@nvazquez
nvazquez marked this pull request as ready for review June 17, 2026 02:09
@nvazquez

Copy link
Copy Markdown
Contributor

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@nvazquez a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/13423 (QA-JID-952)

@weizhouapache
weizhouapache merged commit e689c02 into 4.22Jun 18, 2026
49 of 50 checks passed
weizhouapache pushed a commit that referenced this pull request Jun 18, 2026
…as-is template (#13423)
* Allow selecting network for VNF nics if template nics > 0 and is a non-deploy as is template
* delpoy as is param not required
---------
Co-authored-by: Pearl Dsilva <pearl1954@gmail.com>
@DaanHoogland
DaanHoogland deleted the fix-vnf-net-select-non-deployasis branch June 18, 2026 11:04

@kiranchavalakiranchavala left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

before fix

Image

After fix

Image

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] UI: VNF NIC Mapping - Network select dropdown always disabled

6 participants

@Pearl1594@weizhouapache@nvazquez@blueorangutan@kiranchavala@vladimirpetrov