Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 463b76f8 authored by vernada's avatar vernada
Browse files

cacti is officialy deprecated

parent c8cac8e1
Branches EDELIVERY-13982-upgrade-libraries-and-plugins
No related tags found
No related merge requests found
...@@ -128,61 +128,6 @@ if ( $errors ) { ...@@ -128,61 +128,6 @@ if ( $errors ) {
exit 1; exit 1;
} }
=head2
Create user on LMS
=cut
metaprint( 'info', "Starting LMS" );
$cmd = '(/bin/sh /opt/NMS/bin/ciscoPrime/importUsersIntoLMS.sh 2>&1 >> /var/adm/CSCOpx/log/SNET_UsersSync.log)';
metaprint( 'info', "processing LMS servers..." );
foreach my $server ( split( /,/, $lms_servers ) ) {
# SSH to server.
metaprint 'info', 'Working on ' . $server . '...';
my $ssh = new SNET::SSHDeviceInterfacer::Linux( $debug, $server, $lms_user, $lms_passwd );
if ( !$cli_mode ) {
$ssh->set_webmode( 1 );
}
if ( $ssh->openSSHConnection() ) {
metaprint 'info', "-> ok connected";
} else {
metaprint 'error', "-> connection failed";
$errors++;
next;
}
my $out = $ssh->sendCMD( '' );
print "\tIssuing command to get shell..." if $ssh->doDebug();
$out = $ssh->sendCMD( 'shell' );
if ( $out =~ m/password/i ) {
$out = $ssh->sendCMD( $lms_passwd );
if ( $out =~ m/root-ade/i ) {
print "done" . $ssh->nl if $ssh->doDebug();
$out = $ssh->sendCMD( $cmd );
print $out;
} else {
metaprint 'error', 'failed, Unexpected prompt: ' . $out . "" . $ssh->nl if $ssh->doDebug();
$errors++;
next;
}
}
eval { $out = $ssh->sendCMD( "exit" ); };
eval { $out = $ssh->sendCMD( "exit" ); };
undef( $ssh );
}
if ( $errors ) {
metaprint( 'error', "Some errors have been found, please contact SS Team!" . nl() . "Please copy/paste the output to the email!" );
exit 1;
}
=head2 =head2
Create user on Proteus Create user on Proteus
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment