fix(tools): pass tunnel list to start, stop tunnel
This commit is contained in:
parent
19f6cefd8d
commit
0210323730
@ -115,6 +115,7 @@ sub build_tunnel_call
|
||||
my $lport = $parameters->{lport};
|
||||
my $rport = $parameters->{rport};
|
||||
my $svr_uuid = $parameters->{svr_uuid};
|
||||
my $tunnel_ls_path = $parameters->{tunnel_ls_path};
|
||||
|
||||
$anvil->Log->variables({ source => $THIS_FILE, line => __LINE__, level => $debug, list => $parameters, prefix => "build_tunnel_call" });
|
||||
|
||||
@ -122,9 +123,10 @@ sub build_tunnel_call
|
||||
|| (not defined $lport)
|
||||
|| (not defined $rport) );
|
||||
|
||||
my $ls_path_opt = defined $tunnel_ls_path ? "--tunnel-ls-path '$tunnel_ls_path'" : "";
|
||||
my $ls_prefix_opt = defined $svr_uuid ? "--tunnel-ls-prefix '$svr_uuid'" : "";
|
||||
|
||||
my $call = "$manage_tunnel --child --ctl-cmd $ctl_cmd --ctl-path '$ctl_path' --debug $debug --forward-lport $lport --forward-rport $rport $ls_prefix_opt";
|
||||
my $call = "$manage_tunnel --child --ctl-cmd $ctl_cmd --ctl-path '$ctl_path' --debug $debug --forward-lport $lport --forward-rport $rport $ls_path_opt $ls_prefix_opt";
|
||||
|
||||
return (0, $call);
|
||||
}
|
||||
@ -590,6 +592,7 @@ sub start_pipe
|
||||
tp_ctl_path => $tp_process->{ctl_path},
|
||||
tp_target => $host_name,
|
||||
tp_target_uuid => $host_uuid,
|
||||
tp_tunnel_ls_path => $tp_process->{tunnel_ls_path},
|
||||
tunnels => $tunnels,
|
||||
ws_sport => $ws_process->{sport},
|
||||
%$common_params,
|
||||
@ -665,6 +668,7 @@ sub start_tunnel
|
||||
my $tp_ctl_path = $parameters->{tp_ctl_path};
|
||||
my $tp_target = $parameters->{tp_target};
|
||||
my $tp_target_uuid = $parameters->{tp_target_uuid};
|
||||
my $tp_tunnel_ls_path = $parameters->{tp_tunnel_ls_path};
|
||||
my $tunnels = $parameters->{tunnels};
|
||||
my $ws_sport = $parameters->{ws_sport};
|
||||
|
||||
@ -715,6 +719,7 @@ sub start_tunnel
|
||||
lport => $ws_sport,
|
||||
rport => $tunnel_rport,
|
||||
svr_uuid => $svr_uuid,
|
||||
tunnel_ls_path => $tp_tunnel_ls_path,
|
||||
});
|
||||
|
||||
return (1) if ($build_rcode);
|
||||
@ -822,7 +827,12 @@ sub stop_pipe
|
||||
|
||||
next if (not defined $tunnel);
|
||||
|
||||
stop_tunnel({ %$tunnel, tp_ctl_path => $tp_process->{ctl_path}, %$common_params });
|
||||
stop_tunnel({
|
||||
%$tunnel,
|
||||
tp_ctl_path => $tp_process->{ctl_path},
|
||||
tp_tunnel_ls_path => $tp_process->{tunnel_ls_path},
|
||||
%$common_params
|
||||
});
|
||||
}
|
||||
|
||||
return (0);
|
||||
@ -849,6 +859,7 @@ sub stop_tunnel
|
||||
my $lport = $parameters->{lport};
|
||||
my $rport = $parameters->{rport};
|
||||
my $tp_ctl_path = $parameters->{tp_ctl_path};
|
||||
my $tp_tunnel_ls_path = $parameters->{tp_tunnel_ls_path};
|
||||
|
||||
$anvil->Log->variables({ source => $THIS_FILE, line => __LINE__, level => $debug, list => $parameters, prefix => "stop_tunnel" });
|
||||
|
||||
@ -858,6 +869,7 @@ sub stop_tunnel
|
||||
debug => $debug,
|
||||
lport => $lport,
|
||||
rport => $rport,
|
||||
tunnel_ls_path => $tp_tunnel_ls_path,
|
||||
});
|
||||
|
||||
return (1) if ($build_rcode);
|
||||
|
Loading…
Reference in New Issue
Block a user