From e9842cc174ecf53bd5602dc60f2157355add0a30 Mon Sep 17 00:00:00 2001 From: Abhishek jaiswal Date: Tue, 20 Jun 2023 16:49:46 +0530 Subject: [PATCH] Configure pci-sriov interface without data network In existing implementation, it is mandatory to select data network while creating and updating pci-sriov interface class. In this patchset the limitation has been removed to make it as similar as CLI. Test Plan: PASS: creation of iface of class pci-sriov without datanetwork PASS: updation of iface of class pci-sriov without datanetwork PASS: updation of iface of class pci-sriov with datanetwork Story: 2010706 Task: 48256 Change-Id: I2965a3d06e55825cb4efd51f4de01732b2bf2d45 Signed-off-by: Abhishek jaiswal --- .../dashboards/admin/inventory/interfaces/forms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/forms.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/forms.py index cca98bc2..6ebc91cd 100644 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/forms.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/forms.py @@ -537,14 +537,14 @@ class AddInterface(forms.SelfHandlingForm): else: datanetworks = [] - # datanetwork selection is required for 'data', 'pci-passthrough' - # and 'pci-sriov'. It is NOT required for any other interface class + # datanetwork selection is required for 'data' and 'pci-passthrough' + # It is NOT required for any other interface class if not datanetworks: # Note that 1 of 3 different controls may be used to select # data network, make sure to set the error on the appropriate # control - if ifclass in ['data', 'pci-passthrough', 'pci-sriov']: + if ifclass in ['data', 'pci-passthrough']: raise forms.ValidationError(_( "You must specify a Data Network"))