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

Redact host information in diagnostic file #154

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions custom_components/proxmoxve/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
coordinator_node = ProxmoxNodeCoordinator(
hass=hass,
proxmox=proxmox,
host_name=config_entry.data[CONF_HOST],
api_category=ProxmoxType.Node,
node_name=node,
)
await coordinator_node.async_refresh()
Expand Down Expand Up @@ -365,7 +365,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
coordinator_qemu = ProxmoxQEMUCoordinator(
hass=hass,
proxmox=proxmox,
host_name=config_entry.data[CONF_HOST],
api_category=ProxmoxType.QEMU,
qemu_id=vm_id,
)
await coordinator_qemu.async_refresh()
Expand Down Expand Up @@ -401,7 +401,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
coordinator_lxc = ProxmoxLXCCoordinator(
hass=hass,
proxmox=proxmox,
host_name=config_entry.data[CONF_HOST],
api_category=ProxmoxType.LXC,
container_id=container_id,
)
await coordinator_lxc.async_refresh()
Expand Down
12 changes: 6 additions & 6 deletions custom_components/proxmoxve/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ def __init__(
self,
hass: HomeAssistant,
proxmox: ProxmoxAPI,
host_name: str,
api_category: str,
node_name: str,
) -> None:
"""Initialize the Proxmox Node coordinator."""

super().__init__(
hass,
LOGGER,
name=f"proxmox_coordinator_{host_name}_{node_name}",
name=f"proxmox_coordinator_{api_category}_{node_name}",
update_interval=timedelta(seconds=UPDATE_INTERVAL),
)

Expand Down Expand Up @@ -137,15 +137,15 @@ def __init__(
self,
hass: HomeAssistant,
proxmox: ProxmoxAPI,
host_name: str,
api_category: str,
qemu_id: int,
) -> None:
"""Initialize the Proxmox QEMU coordinator."""

super().__init__(
hass,
LOGGER,
name=f"proxmox_coordinator_{host_name}_{qemu_id}",
name=f"proxmox_coordinator_{api_category}_{qemu_id}",
update_interval=timedelta(seconds=UPDATE_INTERVAL),
)

Expand Down Expand Up @@ -245,15 +245,15 @@ def __init__(
self,
hass: HomeAssistant,
proxmox: ProxmoxAPI,
host_name: str,
api_category: str,
container_id: int,
) -> None:
"""Initialize the Proxmox LXC coordinator."""

super().__init__(
hass,
LOGGER,
name=f"proxmox_coordinator_{host_name}_{container_id}",
name=f"proxmox_coordinator_{api_category}_{container_id}",
update_interval=timedelta(seconds=UPDATE_INTERVAL),
)

Expand Down
2 changes: 1 addition & 1 deletion custom_components/proxmoxve/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

TO_REDACT_API = []

TO_REDACT_DATA = []
TO_REDACT_DATA = ["configuration_url"]


async def async_get_config_entry_diagnostics(
Expand Down
2 changes: 1 addition & 1 deletion custom_components/proxmoxve/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"issue_tracker": "https://github.com/dougiteixeira/proxmoxve/issues",
"loggers": ["proxmoxer"],
"requirements": ["proxmoxer==2.0.1"],
"version": "2.1.0"
"version": "2.1.1"
}
Loading