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 <teresa.ho@windriver.com>
This commit is contained in:
Teresa Ho 2018-09-26 14:17:34 -04:00
parent 6b6aebff4f
commit b5fd521f8e
1 changed files with 1 additions and 0 deletions

View File

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