Fix dhcp_release when client_id is specified
Appending a string to a list results in each character being appended as list items, this results in an invalid release command. This change appends the client_id string to the list instead. Change-Id: I71a114308e3b68f6daf6e1a202a47b6a453bb81a Closes-Bug: #1896850
This commit is contained in:
parent
0fdcc4b1b6
commit
2864957ca5
@ -23,7 +23,7 @@ def dhcp_release(interface_name, ip_address, mac_address, client_id,
|
|||||||
cmd += ['ip', 'netns', 'exec', namespace]
|
cmd += ['ip', 'netns', 'exec', namespace]
|
||||||
cmd += ['dhcp_release', interface_name, ip_address, mac_address]
|
cmd += ['dhcp_release', interface_name, ip_address, mac_address]
|
||||||
if client_id:
|
if client_id:
|
||||||
cmd += client_id
|
cmd.append(client_id)
|
||||||
log_errors = processutils.LOG_FINAL_ERROR
|
log_errors = processutils.LOG_FINAL_ERROR
|
||||||
return processutils.execute(*cmd, log_errors=log_errors)
|
return processutils.execute(*cmd, log_errors=log_errors)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user