Adding shell functions to change/get network policy with nitb
This commit is contained in:
parent
f0caa13e62
commit
40860f04e2
1 changed files with 13 additions and 0 deletions
|
@ -193,3 +193,16 @@ smsq-max()
|
|||
expect -c 'set queue '$1'; set port <% if @osmo_stack != "split" -%>4242<% else -%>4254<% end -%>; spawn telnet localhost $port; expect ">"; send "enable\r"; expect "#"; send "sms-queue max-pending $queue\r"; expect "#";
|
||||
send "sms-queue trigger\r"; expect "#";'
|
||||
}
|
||||
<% if @osmo_stack != "split" %>
|
||||
close-net () {
|
||||
expect -c 'spawn -noecho telnet 0 4242; expect >; send enable\r; expect #; send "configure terminal\r"; expect #; send network\r; expect #; send "auth policy closed\r"; expect #; send \r' ; echo -e " \r Closed Network"
|
||||
}
|
||||
|
||||
open-net () {
|
||||
expect -c 'spawn -noecho telnet 0 4242; expect >; send enable\r; expect #; send "configure terminal\r"; expect #; send network\r; expect #; send "auth policy accept-all \r";expect #; send \r' ; echo -e " \r Opened Network"
|
||||
}
|
||||
|
||||
p-net (){
|
||||
echo "show network" | nc -q1 localhost 4242 | grep "policy" | awk -F "," '{print $1 }'
|
||||
}
|
||||
<% end %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue