summaryrefslogtreecommitdiff
path: root/src/conf_mode/https.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@sentrium.io>2019-08-13 15:48:04 -0500
committerJohn Estabrook <jestabro@sentrium.io>2019-08-14 12:52:21 -0500
commitae7501bd0aeef87b708eb033907aab470ea764b7 (patch)
tree90ad83fc00f47244eedb9dbcbe2ac0ba99f78455 /src/conf_mode/https.py
parent8d1e768a6f3285ed717f588f356db9340871b043 (diff)
downloadvyos-1x-ae7501bd0aeef87b708eb033907aab470ea764b7.tar.gz
vyos-1x-ae7501bd0aeef87b708eb033907aab470ea764b7.zip
[service https] T1443: move https and api default data to vyos.defaults
Diffstat (limited to 'src/conf_mode/https.py')
-rwxr-xr-xsrc/conf_mode/https.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/conf_mode/https.py b/src/conf_mode/https.py
index e1e81eef1..2495cf7e7 100755
--- a/src/conf_mode/https.py
+++ b/src/conf_mode/https.py
@@ -21,6 +21,7 @@ import os
import jinja2
+import vyos.defaults
from vyos.config import Config
from vyos import ConfigError
@@ -75,16 +76,8 @@ server {
}
"""
-default_config_data = {
- 'listen_address' : [ '127.0.0.1' ]
-}
-
-default_api_config_data = {
- 'port' : '8080',
-}
-
def get_config():
- https = default_config_data
+ https = vyos.defaults.https_data
conf = Config()
if not conf.exists('service https'):
return None
@@ -96,7 +89,7 @@ def get_config():
https['listen_address'] = addrs[:]
if conf.exists('api'):
- https['api'] = default_api_config_data
+ https['api'] = vyos.defaults.api_data
if conf.exists('api port'):
port = conf.return_value('api port')