[rancid] MLNX-OS support

Shkelzen Rugovac shkelzen.rugovac at gmail.com
Wed Feb 15 07:28:08 UTC 2017


Hello,

I would like to know if there is way to make rancid work with Mellanox
Ethernet switches running MLNX-OS eg model SX1016.

I already tried to adapt the following doc:
http://lesser-evil.com/2015/04/wraprancid-and-rancid-3-x/

This is what I used as wrapplugin

**********************************************************************************

#!/usr/bin/perl -w
#
#######################################################
# Modules
#######################################################

# Load any modules needed
use strict;
use Getopt::Std;
use Net::SSH::Perl;

#######################################################
# Variables
#######################################################

# Initialize variables used in this script

my $debug = 0;

my %options = ();
getopts('df:', \%options);
my $file = $options{'f'};
my $fh;
my $host = $ARGV[0];

$debug = $options{'d'};

print STDERR "to host: $host\n" if $debug;

my $ssh = Net::SSH::Perl->new($host, protocol => '2,1', debug => $debug );

print STDERR "made ssh obj\n" if $debug;
$ssh->login("root");

print STDERR "login\n" if $debug;
my ($stdout, $stderr, $exit) = $ssh->cmd("true");
print STDERR "got output\n" if $debug;

# Open the output file.
open($fh, ">", $file) or die "Cannot open output file\n";
print $fh "#RANCID-CONTENT-TYPE: wrapper.mlnx\n#\n";

print $fh $stdout;
print STDERR "wrote output of ". length($stdout)." bytes\n" if $debug;

#######
# End #
#######
close($fh);
print STDERR "done\n" if $debug;

****************************************************************************************

But it only shows this part of the config:

*****************************************************************************************

   1. RANCID-CONTENT-TYPE: cisco
   2. !
   3. !
   4. !
   5. !
   6. !
   7. !Image: % Unrecognized command "install".
   8. !Image: Type "show ?" for help.
   9. !
   10. !
   11. !
   12. !
   13. !
   14. !BootFlash: show bootvar
   15. !BootFlash: Installed images:
   16. !BootFlash:   Partition 1:
   17. !BootFlash:   SX_PPC_M460EX SX_3.2.0506 2012-10-14 19:50:50 ppc
   18. !BootFlash:   Partition 2:
   19. !BootFlash:   SX_PPC_M460EX SX_3.2.0506 2012-10-14 19:50:50 ppc
   20. !BootFlash: Last boot partition: 1
   21. !BootFlash: Next boot partition: 1
   22. !BootFlash: Boot manager password is set.
   23. !BootFlash: No image install currently in progress.
   24. !BootFlash: Image signing: trusted signature always required
   25. !BootFlash: Admin require signed images: yes
   26. !BootFlash: Settings for next boot only:
   27. !BootFlash:    Fallback reboot on configuration failure: yes (default)
   28. !
   29. !BootFlash: show variables boot
   30. !BootFlash: Installed images:
   31. !BootFlash:   Partition 1:
   32. !BootFlash:   SX_PPC_M460EX SX_3.2.0506 2012-10-14 19:50:50 ppc
   33. !BootFlash:   Partition 2:
   34. !BootFlash:   SX_PPC_M460EX SX_3.2.0506 2012-10-14 19:50:50 ppc
   35. !BootFlash: Last boot partition: 1
   36. !BootFlash: Next boot partition: 1
   37. !BootFlash: Boot manager password is set.
   38. !BootFlash: No image install currently in progress.
   39. !BootFlash: Image signing: trusted signature always required
   40. !BootFlash: Admin require signed images: yes
   41. !BootFlash: Settings for next boot only:
   42. !BootFlash:    Fallback reboot on configuration failure: yes (default)
   43. !
   44. !BootFlash: % Unrecognized command "variables".
   45. !BootFlash: Type "show ?" for help.
   46. !
   47. !Flash: % Unrecognized command "flash".
   48. !Flash: Type "show ?" for help.
   49. !
   50. !Flash: [standalone: % Unrecognized command "dir".
   51. !Flash: [standalone: Type "?" for help.
   52. !
   53. !Flash: [standalone: % Unrecognized command "dir".
   54. !Flash: [standalone: Type "?" for help.
   55. !
   56. !Flash: [standalone: % Unrecognized command "dir".
   57. !Flash: [standalone: Type "?" for help.


***********************************************************************************

Does anyone have already a workaround for this? Is there any development on
a possible "mlxlogin"?

Cheers,

Shkelzen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20170215/46983f34/attachment.html>


More information about the Rancid-discuss mailing list