Skip to content

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

Draft
Pearl1594 wants to merge 2 commits into
4.22from
fix-vnf-net-select-non-deployasis
Draft

Allow selecting network for VNF nics if template nics > 0 and is a non deploy-as-is template#13423
Pearl1594 wants to merge 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 requested a review from weizhouapache June 15, 2026 17:29
@Pearl1594 Pearl1594 changed the base branch from main to 4.22 June 15, 2026 17:30
@Pearl1594 Pearl1594 requested a review from nvazquez June 15, 2026 17:30
@Pearl1594 Pearl1594 added this to the 4.22.2 milestone Jun 15, 2026

@nvazquez nvazquez 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

codecov Bot 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     
Flag Coverage Δ
uitests 3.69% <ø> (-0.01%) ⬇️
unittests 18.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
Contributor Author

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

@weizhouapache weizhouapache 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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants