Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
brian-polling-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
brian
brian-polling-manager
Commits
f98d4689
Commit
f98d4689
authored
1 year ago
by
Pelle Koster
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
brian_polling_manager/interface_stats/config.py
+3
-9
3 additions, 9 deletions
brian_polling_manager/interface_stats/config.py
test/interface_stats/test_interface_stats.py
+5
-3
5 additions, 3 deletions
test/interface_stats/test_interface_stats.py
with
8 additions
and
12 deletions
brian_polling_manager/interface_stats/config.py
+
3
−
9
View file @
f98d4689
...
@@ -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
This diff is collapsed.
Click to expand it.
test/interface_stats/test_interface_stats.py
+
5
−
3
View file @
f98d4689
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment