summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_macsec.py2
-rwxr-xr-xsrc/conf_mode/interfaces-macsec.py5
2 files changed, 3 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_macsec.py b/smoketest/scripts/cli/test_interfaces_macsec.py
index 6d1be86ba..177d2b946 100755
--- a/smoketest/scripts/cli/test_interfaces_macsec.py
+++ b/smoketest/scripts/cli/test_interfaces_macsec.py
@@ -105,7 +105,7 @@ class MACsecInterfaceTest(BasicInterfaceTest.BaseTest):
# Check for running process
self.assertTrue(process_named_running('wpa_supplicant'))
- def test_mandatory_toptions(self):
+ def test_mandatory_options(self):
interface = 'macsec1'
self.session.set(self._base_path + [interface])
diff --git a/src/conf_mode/interfaces-macsec.py b/src/conf_mode/interfaces-macsec.py
index 706b8edb0..2c8367ff3 100755
--- a/src/conf_mode/interfaces-macsec.py
+++ b/src/conf_mode/interfaces-macsec.py
@@ -59,8 +59,7 @@ def get_config(config=None):
# Check if interface has been removed
if 'deleted' in macsec:
- source_interface = conf.return_effective_value(
- base + ['source-interface'])
+ source_interface = conf.return_effective_value(['source-interface'])
macsec.update({'source_interface': source_interface})
return macsec
@@ -111,7 +110,7 @@ def generate(macsec):
def apply(macsec):
# Remove macsec interface
- if 'deleted' in macsec.keys():
+ if 'deleted' in macsec:
call('systemctl stop wpa_supplicant-macsec@{source_interface}'
.format(**macsec))