Skip to content
Snippets Groups Projects
Commit f98d4689 authored by Pelle Koster's avatar Pelle Koster
Browse files

rm influx default ssl and port from config as this is handled differently

parent 8c24f3b9
No related branches found
No related tags found
No related merge requests found
...@@ -6,8 +6,6 @@ import jsonschema ...@@ -6,8 +6,6 @@ import jsonschema
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
DEFAULT_INFLUX_SSL = True
DEFAULT_INFLUX_PORT = 8086
DEFAULT_NETCONF_PORT = 830 DEFAULT_NETCONF_PORT = 830
DEFAULT_HOSTKEY_VERIFY = False DEFAULT_HOSTKEY_VERIFY = False
...@@ -71,9 +69,9 @@ CONFIG_SCHEMA = { ...@@ -71,9 +69,9 @@ CONFIG_SCHEMA = {
"properties": { "properties": {
"dry_run": {"type": "boolean"}, "dry_run": {"type": "boolean"},
"no-out": {"type": "boolean"}, "no-out": {"type": "boolean"},
"netconf-source-dir": {"type": "string"} "netconf-source-dir": {"type": "string"},
} },
} },
}, },
"required": ["influx"], "required": ["influx"],
"additionalProperties": False, "additionalProperties": False,
...@@ -111,8 +109,4 @@ def load(config_file): ...@@ -111,8 +109,4 @@ def load(config_file):
ssh_params[_k] ssh_params[_k]
), f"{ssh_params[_k]} does not exist" ), f"{ssh_params[_k]} does not exist"
for db in config["influx"].values():
db.setdefault("ssl", DEFAULT_INFLUX_SSL)
db.setdefault("port", DEFAULT_INFLUX_PORT)
return config return config
...@@ -483,11 +483,13 @@ def test_write_points_to_stdout(): ...@@ -483,11 +483,13 @@ def test_write_points_to_stdout():
dict(host="localhost", port=1234, ssl=True, verify_ssl=True), dict(host="localhost", port=1234, ssl=True, verify_ssl=True),
), ),
( (
dict( dict(hostname="http://localhost:1234", port=456, ssl=True, verify_ssl=True),
hostname="http://localhost:1234", port=456, ssl=True, verify_ssl=True
),
dict(host="localhost", port=456, ssl=True, verify_ssl=True), dict(host="localhost", port=456, ssl=True, verify_ssl=True),
), ),
(
dict(hostname="http://localhost", port=456),
dict(host="localhost", port=456, ssl=False, verify_ssl=False),
),
], ],
) )
def test_prepare_influx_params(input_params, expected): def test_prepare_influx_params(input_params, expected):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment