From 0faa58308678286590784b534482cf1cbad91a79 Mon Sep 17 00:00:00 2001 From: Shawn Doherty Date: Sat, 10 Aug 2024 09:06:51 -0500 Subject: [PATCH] System-modify: Add ability to modify MAC Address Add setting MAC Address to the system-modify command to modify via the command line. Previously could only change them via the GUI. Signed-off-by: Shawn Doherty --- Client/src/bkr/client/commands/cmd_system_modify.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Client/src/bkr/client/commands/cmd_system_modify.py b/Client/src/bkr/client/commands/cmd_system_modify.py index af06bd177..2b7ee4132 100644 --- a/Client/src/bkr/client/commands/cmd_system_modify.py +++ b/Client/src/bkr/client/commands/cmd_system_modify.py @@ -60,6 +60,10 @@ Physical location of the system. +.. option:: --mac-address + + MAC address of the system. + .. option:: --power-type Remote power control type. This value must be a valid power type configured @@ -146,6 +150,8 @@ def options(self): "system's custom access policy") self.parser.add_option('--location', help='Physical location of the system') + self.parser.add_option('--mac-address', + help='MAC address of the system') self.parser.add_option('--power-type', metavar='TYPE', help='Remote power control type') self.parser.add_option('--power-address', metavar='ADDRESS', @@ -190,9 +196,9 @@ def run(self, *args, **kwargs): if custom_policy: system_attr['active_access_policy'] = {'custom': True} - attrs = ['location', 'power_type', 'power_address', 'power_user', - 'power_password', 'power_id', 'power_quiescent_period', - 'release_action'] + attrs = ['location', 'mac_address', 'power_type', 'power_address', + 'power_user', 'power_password', 'power_id', + 'power_quiescent_period', 'release_action'] for attr in attrs: value = kwargs.pop(attr, None) if value is not None: