New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gong's .gorc not working for Arista and Juniper devices #258

Closed
teomcpy opened this Issue Mar 25, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@teomcpy

teomcpy commented Mar 25, 2016

Trying to use gong with the Arista vEOS and Juniper JunOS. Currently, the tool seems to work only on Cisco devices.

This is the .gorc file:

_juniper:
set cli timestamp
show interfaces terse
show system users

cisco:
show clock
show ip interface brief
terminal width 132

arista:
show clock
show uptime
show ip interface brief

foundry:
show clock_

When running gong on this device:

ubuntu@ubuntu-VirtualBox:~/MyFiles/Bonuses/Bonus#06$ gong 172.16.1.4
_Connecting to 172.16.1.4. Use ^X to exit.

Fetching credentials from /home/ubuntu/.tacacsrc
Last login: Fri Mar 25 13:34:28 2016 from 172.16.1.1
localhost#
localhost#
localhost#_

A few times, it also appeared like this:

ubuntu@ubuntu-VirtualBox:~/MyFiles/Bonuses/Bonus#06$ gong 172.16.1.4
_Connecting to 172.16.1.4. Use ^X to exit.

Fetching credentials from /home/ubuntu/.tacacsrc
Last login: Fri Mar 25 13:34:28 2016 from 172.16.1.1
show clock
show uptime
show ip interface brief

localhost#
localhost#
localhost#_

Now, for Juniper, again, nothing is shown - commands are not executed:

gong 172.16.1.3
Connecting to 172.16.1.3. Use ^X to exit.

Fetching credentials from /home/ubuntu/.tacacsrc
--- JUNOS 10.2R3.10 built 2010-10-16 20:36:59 UTC
mihai1@abcd>

@teomcpy teomcpy changed the title from gong not working for Arista devices to gong not working for Arista and Juniper devices Mar 25, 2016

@jathanism

This comment has been minimized.

Member

jathanism commented Mar 25, 2016

This is a bug in the documentation. The .gorc file should start with an [init_commands] section, so your file should look like this:

[init_commands]
_juniper:
    set cli timestamp
    show interfaces terse
    show system users

cisco:
    show clock
    show ip interface brief
    terminal width 132

arista:
    show clock
    show uptime
    show ip interface brief

foundry:
    show clock_

Thanks for catching this.

@jathanism

This comment has been minimized.

Member

jathanism commented Mar 25, 2016

Hm. Looks like there's also a bug with the commands being sent out of order, too. I'm investigating that as well.

@teomcpy

This comment has been minimized.

teomcpy commented Mar 26, 2016

Thank you so much for your support!

@teomcpy

This comment has been minimized.

teomcpy commented Mar 29, 2016

Ok, I already had [init_commands] at the top of the file, before all the comments. I have deleted the comments and I now have this in the file:

[init_commands]
juniper:
    set cli timestamp
    show interfaces terse
    show system users

cisco:
    show clock
    show ip interface brief
    terminal width 132

arista:
    show clock
    show uptime
    show ip interface brief

foundry:
    show clock_

However, after trying again on my Arista vEOS:

First try:

gong 172.16.1.4
Connecting to 172.16.1.4.  Use ^X to exit.

Fetching credentials from /home/ubuntu/.tacacsrc
^[[0nlocalhost#n**


Second try:

**gong 172.16.1.4
Connecting to 172.16.1.4.  Use ^X to exit.

Fetching credentials from /home/ubuntu/.tacacsrc
Last login: Tue Mar 29 06:55:29 2016 from 172.16.1.1
show clock

show uptime

show ip interface brief

show clock

show uptime

show ip interface brief

localhost#

Third try - same results as in the second try.

On a Cisco router, this works fine:

gong 172.16.1.100
Connecting to 172.16.1.100.  Use ^X to exit.

Fetching credentials from /home/ubuntu/.tacacsrc

Cisco-R1#show clock
*00:01:01.559 UTC Fri Mar 1 2002
Cisco-R1#
Cisco-R1#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            172.16.1.100    YES NVRAM  up                    up      
FastEthernet0/1            unassigned      YES NVRAM  administratively down down    
Cisco-R1#
Cisco-R1#terminal width 132
Cisco-R1#
@jathanism

This comment has been minimized.

Member

jathanism commented Mar 29, 2016

Ok, narrowing it down to Arista helps. Thanks!

@jathanism jathanism changed the title from gong not working for Arista and Juniper devices to gong's .gorc not working for Arista and Juniper devices Mar 29, 2016

@johnfzc johnfzc closed this in eb883b2 Apr 1, 2016

johnfzc added a commit that referenced this issue Apr 1, 2016

Merge pull request #263 from jathanism/gorc-fix
Fixes #258 - Bugfix in .gorc commands would be sent too soon.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment