mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
test_fileio: Fix mutable default arguments
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -75,15 +75,19 @@ class FileIOTest(LFCliBase):
|
|||||||
use_test_groups=False,
|
use_test_groups=False,
|
||||||
write_only_test_group=None,
|
write_only_test_group=None,
|
||||||
read_only_test_group=None,
|
read_only_test_group=None,
|
||||||
port_list=[],
|
port_list=None,
|
||||||
ip_list=None,
|
ip_list=None,
|
||||||
connections_per_port=1,
|
connections_per_port=1,
|
||||||
mode="both",
|
mode="both",
|
||||||
update_group_args={"name": None, "action": None, "cxs": None},
|
update_group_args=None,
|
||||||
_debug_on=False,
|
_debug_on=False,
|
||||||
_exit_on_error=False,
|
_exit_on_error=False,
|
||||||
_exit_on_fail=False):
|
_exit_on_fail=False):
|
||||||
super().__init__(host, port, _debug=_debug_on, _exit_on_fail=_exit_on_fail)
|
super().__init__(host, port, _debug=_debug_on, _exit_on_fail=_exit_on_fail)
|
||||||
|
if port_list is None:
|
||||||
|
port_list = []
|
||||||
|
if update_group_args is None:
|
||||||
|
update_group_args = {"name": None, "action": None, "cxs": None}
|
||||||
self.host = host
|
self.host = host
|
||||||
self.port = port
|
self.port = port
|
||||||
self.radio = radio
|
self.radio = radio
|
||||||
@@ -658,8 +662,7 @@ Generic command layout:
|
|||||||
tg_group = parser.add_mutually_exclusive_group()
|
tg_group = parser.add_mutually_exclusive_group()
|
||||||
tg_group.add_argument('--add_to_group', help='name of test group to add cxs to', default=None)
|
tg_group.add_argument('--add_to_group', help='name of test group to add cxs to', default=None)
|
||||||
tg_group.add_argument('--del_from_group', help='name of test group to delete cxs from', default=None)
|
tg_group.add_argument('--del_from_group', help='name of test group to delete cxs from', default=None)
|
||||||
parser.add_argument('--cxs', help='list of cxs to add/remove depending on use of --add_to_group or --del_from_group'
|
parser.add_argument('--cxs', help='list of cxs to add/remove depending on use of --add_to_group or --del_from_group', default=None)
|
||||||
, default=None)
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
update_group_args = {
|
update_group_args = {
|
||||||
|
|||||||
Reference in New Issue
Block a user