Skip to content

ipaddress parameter is unused in Community.remove_host #3

@pederhan

Description

@pederhan

A params dict is constructed, but never used.

def remove_host(self, host: Host, ipaddress: IP_AddressT | None) -> bool:
"""Remove a host from the community.
:param host: The host to remove.
:returns: True if the host was removed, False otherwise.
"""
from mreg_api.client import MregClient # noqa: PLC0415
params: QueryParams = {}
if ipaddress:
params["ipaddress"] = str(ipaddress)
resp = MregClient().delete(
Endpoint.NetworkCommunityHost.with_params(
self.network_address,
self.id,
host.id,
)
)
return resp.is_success if resp else False

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions