auto-t: add iftype/cipher disable to hwsim.py

This commit is contained in:
James Prestwood 2020-12-17 11:36:09 -08:00 committed by Denis Kenzior
parent 5567caf64a
commit 55e7caa8e0
1 changed files with 8 additions and 1 deletions

View File

@ -249,7 +249,8 @@ class RadioList(collections.Mapping):
def _interfaces_removed_handler(self, path, interfaces):
del _dict[path]
def create(self, name=None, p2p_device=False):
def create(self, name=None, p2p_device=False, iftype_disable=None,
cipher_disable=None):
args = dbus.Dictionary({
'P2P': p2p_device,
}, signature='sv')
@ -257,6 +258,12 @@ class RadioList(collections.Mapping):
if name:
args['Name'] = name
if iftype_disable:
args['InterfaceTypeDisable'] = iftype_disable
if cipher_disable:
args['CipherTypeDisable'] = cipher_disable
path = self._radio_manager.CreateRadio(args)
obj = Radio(path)
self._dict[path] = obj