From b5fd521f8e954da7033a82ee2843a86e81a5137e Mon Sep 17 00:00:00 2001 From: Teresa Ho Date: Wed, 26 Sep 2018 14:17:34 -0400 Subject: [PATCH] Clear networktype when interface class is reset When the interface class was reset to none, the networktype was unchanged which leads to inconsistent data. This update is to clear the networktype when the interface class is set to none. Closes-Bug: 1794576 Change-Id: If9e3593c6888981c3cd13ef5a338950f5d2fe24d Signed-off-by: Teresa Ho --- sysinv/sysinv/sysinv/sysinv/api/controllers/v1/interface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/interface.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/interface.py index 9547aeb91d..fe9ca082f9 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/interface.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/interface.py @@ -563,6 +563,7 @@ class InterfaceController(rest.RestController): interface['ifclass'] == constants.INTERFACE_CLASS_NONE): # If the interface class is reset, make sure any network # specific fields are reset as well + interface['networktype'] = None interface['sriov_numvfs'] = 0 interface['ipv4_mode'] = None interface['ipv6_mode'] = None