mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 22:07:10 +00:00
Add proxmoxve SSLError check and remove log spam (#30818)
* Add SSLError check and remove log spam * Update homeassistant/components/proxmoxve/manifest.json remove unnecessary requirement * Remove log level change Moved to proxmoxer library * Update homeassistant/components/proxmoxve/__init__.py * Update manifest.json Update to new version of dependency which fixes log issue * Run formatter and requires updates * oops, tabs * Fix quote marks When you can't get black running, just fix whatever CI says is wrong!
This commit is contained in:
parent
8ceef72853
commit
c3cef7227c
@ -5,6 +5,7 @@ import time
|
|||||||
|
|
||||||
from proxmoxer import ProxmoxAPI
|
from proxmoxer import ProxmoxAPI
|
||||||
from proxmoxer.backends.https import AuthenticationError
|
from proxmoxer.backends.https import AuthenticationError
|
||||||
|
from requests.exceptions import SSLError
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
@ -18,6 +19,7 @@ import homeassistant.helpers.config_validation as cv
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
DOMAIN = "proxmoxve"
|
DOMAIN = "proxmoxve"
|
||||||
PROXMOX_CLIENTS = "proxmox_clients"
|
PROXMOX_CLIENTS = "proxmox_clients"
|
||||||
CONF_REALM = "realm"
|
CONF_REALM = "realm"
|
||||||
@ -94,6 +96,11 @@ def setup(hass, config):
|
|||||||
"Invalid credentials for proxmox instance %s:%d", host, port
|
"Invalid credentials for proxmox instance %s:%d", host, port
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
except SSLError:
|
||||||
|
_LOGGER.error(
|
||||||
|
'Unable to verify proxmox server SSL. Try using "verify_ssl: false"'
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
|
||||||
hass.data[PROXMOX_CLIENTS][f"{host}:{port}"] = proxmox_client
|
hass.data[PROXMOX_CLIENTS][f"{host}:{port}"] = proxmox_client
|
||||||
|
|
||||||
|
@ -4,5 +4,5 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/proxmoxve",
|
"documentation": "https://www.home-assistant.io/integrations/proxmoxve",
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"codeowners": ["@k4ds3"],
|
"codeowners": ["@k4ds3"],
|
||||||
"requirements": ["proxmoxer==1.0.3"]
|
"requirements": ["proxmoxer==1.0.4"]
|
||||||
}
|
}
|
||||||
|
@ -1043,7 +1043,7 @@ prometheus_client==0.7.1
|
|||||||
protobuf==3.6.1
|
protobuf==3.6.1
|
||||||
|
|
||||||
# homeassistant.components.proxmoxve
|
# homeassistant.components.proxmoxve
|
||||||
proxmoxer==1.0.3
|
proxmoxer==1.0.4
|
||||||
|
|
||||||
# homeassistant.components.systemmonitor
|
# homeassistant.components.systemmonitor
|
||||||
psutil==5.6.7
|
psutil==5.6.7
|
||||||
|
Loading…
x
Reference in New Issue
Block a user