summaryrefslogtreecommitdiff
path: root/src/conf_mode/host_name.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2020-08-10 18:58:27 -0500
committerJohn Estabrook <jestabro@vyos.io>2020-08-10 20:09:30 -0500
commitf8112b64a9ddfddf1c24a11ba3db236a15df14e6 (patch)
tree56487e6f77f107f9254baf352263aecd4a217cef /src/conf_mode/host_name.py
parente9b954a9e4d0a7af907c5add4c706591c50d2297 (diff)
downloadvyos-1x-f8112b64a9ddfddf1c24a11ba3db236a15df14e6.tar.gz
vyos-1x-f8112b64a9ddfddf1c24a11ba3db236a15df14e6.zip
host_name: T2784: remove unused arg in verify, unneeded arg in get_config
Diffstat (limited to 'src/conf_mode/host_name.py')
-rwxr-xr-xsrc/conf_mode/host_name.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py
index f2fa64233..65c981d6a 100755
--- a/src/conf_mode/host_name.py
+++ b/src/conf_mode/host_name.py
@@ -47,7 +47,9 @@ default_config_data = {
hostsd_tag = 'system'
-def get_config(conf):
+def get_config():
+ conf = Config()
+
hosts = copy.deepcopy(default_config_data)
hosts['hostname'] = conf.return_value("system host-name")
@@ -77,7 +79,7 @@ def get_config(conf):
return hosts
-def verify(conf, hosts):
+def verify(hosts):
if hosts is None:
return None
@@ -168,9 +170,8 @@ def apply(config):
if __name__ == '__main__':
try:
- conf = Config()
- c = get_config(conf)
- verify(conf, c)
+ c = get_config()
+ verify(c)
generate(c)
apply(c)
except ConfigError as e: