Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System-modify: Add ability to modify MAC Address #231

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Client/src/bkr/client/commands/cmd_system_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@

Physical location of the system.

.. option:: --mac-address <mac-address>

MAC address of the system.

.. option:: --power-type <power-type>

Remote power control type. This value must be a valid power type configured
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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:
Expand Down