pass email correctly in net_set_dhcp
This commit is contained in:
parent
1cdd918e28
commit
aed35c43eb
@ -278,7 +278,7 @@ class CapsulFlaskHub(VirtualizationInterface):
|
||||
result_status = None
|
||||
host = get_model().host_by_id(host_id)
|
||||
if host is not None:
|
||||
payload = json.dumps(dict(type="net_set_dhcp", network_name=network_name, macs=macs, remove_ipv4=remove_ipv4, add_ipv4=add_ipv4))
|
||||
payload = json.dumps(dict(type="net_set_dhcp", email=email, network_name=network_name, macs=macs, remove_ipv4=remove_ipv4, add_ipv4=add_ipv4))
|
||||
results = self.synchronous_operation([host], email, payload)
|
||||
result_json_string = "<no response from host>"
|
||||
for result in results:
|
||||
|
@ -227,7 +227,7 @@ def handle_vm_state_command(operation_id, request_body):
|
||||
|
||||
def handle_net_set_dhcp(operation_id, request_body):
|
||||
|
||||
required_properties = ['network_name', 'macs']
|
||||
required_properties = ['email', 'network_name', 'macs']
|
||||
for required_property in required_properties:
|
||||
if required_property not in request_body:
|
||||
current_app.logger.error(f"/hosts/operation returned 400: {required_property} is required for net_set_dhcp")
|
||||
|
Loading…
Reference in New Issue
Block a user