rortel

DESCRIPTION:

CLI lib for nortel networks devices

FEATURES/PROBLEMS:

CLI lib for nortel networks devices

SYNOPSIS:

REQUIREMENTS:

INSTALL:

sudo gem install rortel

Example:

require ‘rubygems’ require ‘rortel’ include Rortel

msc=Msc.new :ip=>‘atcag2’, :user=>‘user’, :password=>‘pass’ web_patch_list=msc.get_web_patch_list ‘MSCS0200.PPC4’ msc.login msc.run “prsm;report dest cm” patch_list=msc.parse_patch_list missing_patch_list=web_patch_list-patch_list time=Time.new File.open(“missing_patch_#timetime.to_i.txt”,‘w’) do |f|

f.puts missing_patch_list

end pacs=PacsHost.new :ip=>‘rnd94’, :user=>‘davidrua’, :password=>TestData::Password pacs.login pacs.enter_pacs missing_patch_list.each do |patch_id|

pacs.download patch_id

end pacs.logout msc.connect_ftp_access(‘user’,‘pass’) msc.setup_ftp_access do |f|

f.site('lrecl 128')

end missing_patch_list.each do |patch_id|

patch_path='/home/ruan/sshfs/pacs_dir/'+patch_id.downcase+'.ptchppcp'
if File.exists? patch_path
  msc.upload_patch patch_path
  msc.run "listsf all"
  msc.change_patch "apply", patch_id
  msc.run "prsm;report prsu #{patch_id}"
  msc.delete_patch(patch_id)
else
  puts "patch file for #{patch_id} is not found in local disk"
end

end msc.upload_all_patch_in_dir ‘/home/ruan/sshfs/pacs_dir’ msc.disconnect_ftp_access msc.logout

LICENSE:

(The MIT License)

Copyright © 2010 David Ruan

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.