On Thu, Feb 13, 2020 at 01:22:37AM -0800, Gerhard Van Der Wath wrote:
> Thank you Kai.
> 
> I think I am making progress, is this the output that is expected:
> 
>         "*                                                                
> *", 
>         "*   Disconnect IMMEDIATELY if you are not an authorized user!    
> *", 
>         "*    All access and use may be monitored and/or recorded.        * 
> ", 
>         "*                                                                
> *", 
>         
> "******************************************************************", 
>         "", 
>         "", 
>         "SBCHA1# show sessions", 
>         "11:17:24-107 Capacity=4000", 
>         "Session Statistics            -- Period -- -------- Lifetime 
> --------", 
>         "                    Active    High   Total      Total  PerMax    
> High", 
>         "Total Sessions        1606    1661    3346  128530803   15238    
> 2452", 
>         "SIP Sessions          1606    1661    3346  128530803   15238    
> 2452", 
>         "H.323 Calls              0       0       0          0       0      
>  0", 
>         "", 
>         "SIP Audio/Video Statistics    -- Period -- -------- Lifetime 
> --------", 
>         "                    Active    High   Total      Total  PerMax    
> High", 
>         "Audio Calls           1541    1592    2582   90699117    8060    
> 2096", 
>         "Video Calls              0       0       0        113       7      
>  2", 
>         "Messaging Sessions       0       0       0          0       0      
>  0", 
>         "SBCHA1# sh platform cpu-load", 
>         "Timestamp: 11:17:24 Thu 2020-02-13", 
>         "Total load   :     9%", 
>         "CPU 00 load  :     9%", 
>         "CPU 01 load  :     9%", 
>         "CPU 02 load  :     10%", 
>         "CPU 03 load  :     9%", 
>         "SBCHA1# exit", 
>         "SBCHA1> "
>     ]

It is as expected.
Expect doesn't do any magic it only looks for the key in the output and types
the response an hit enter and shows all the output.


> 
> As a note, the SBC does have a ASCII banner, not sure if it may cause 
> issues.

If the banner contain the same string as in our responses it will. That why
it's important that the responses are unique.


-- 
Kai Stian Olstad

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20200213101427.veliswrhdqjka2nw%40olstad.com.

Reply via email to