Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
adjusted default port
Browse files Browse the repository at this point in the history
  • Loading branch information
felbinger authored Oct 8, 2023
1 parent 656741a commit 52216d0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions debian/opt/vyatta-wpm-api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def generate(wpm_api):
return None

# merge web/listen-address with subelement web/listen-address/port
# {'web': {'listen-address': {'0.0.0.0': {'port': '8080'}}}
# {'web': {'listen-address': {'0.0.0.0': {'port': '8002'}}}
if 'listen-address' in wpm_api:
address = list(wpm_api['listen-address'].keys())[0]
port = wpm_api['listen-address'][address].get("port", 8080)
port = wpm_api['listen-address'][address].get("port", 8002)
wpm_api['listen-address'] = f"{address}:{port}"

with open('/opt/vyatta-wpm-api/config.j2', 'r') as tmpl, open(config_file, 'w') as out:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type: txt
help: Port for wpm-api service (default: '8080')
help: Port for wpm-api service (default: '8002')
val_help: u32:1-65535; Numeric IP port
syntax:expression: exec "${vyos_libexec_dir}/validate-value --exec \"${vyos_validators_dir}/numeric --range 1-65535\" --value \'$VAR(@)\'"; "Port number must be in range 1 to 65535"
2 changes: 1 addition & 1 deletion src/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use clap::Parser;
#[derive(Parser)]
#[clap(version)]
pub(crate) struct ClientCfg {
#[arg(env = "WPM_LISTEN_ADDR", long = "listen_addr", default_value = "0.0.0.0:8080")]
#[arg(env = "WPM_LISTEN_ADDR", long = "listen_addr", default_value = "0.0.0.0:8002")]
pub(crate) listen_addr: SocketAddr,

#[arg(env = "WPM_SECRET")]
Expand Down

0 comments on commit 52216d0

Please sign in to comment.