def modify_host_ip_to_dhcp(api):
    engine = api.system_service()

    host = test_utils.hosts_in_cluster_v4(engine, CLUSTER_NAME)[0]
    host_service = engine.hosts_service().host_service(id=host.id)
    ip_configuration = network_utils_v4.create_dhcp_ip_configuration()

    network_utils_v4.modify_ip_config(engine, host_service, VM_NETWORK,
                                      ip_configuration)
def modify_host_0_ip_to_dhcp(api):
    engine = api.system_service()

    host = test_utils.hosts_in_cluster_v4(engine, CLUSTER_NAME)[0]
    host_service = engine.hosts_service().host_service(id=host.id)
    ip_configuration = network_utils_v4.create_dhcp_ip_configuration()

    network_utils_v4.modify_ip_config(engine, host_service, VM_NETWORK,
                                      ip_configuration)