class Courgette::Fetchers::CommutateursFetcher
Constants
- VENDORS
Public Class Methods
new(ip, details)
click to toggle source
# File lib/courgette/fetchers/commutateurs_fetcher.rb, line 15 def initialize(ip, details) @ip = ip @klass = VENDORS[details['vendor']] @credentials = Commutateurs::Credentials.new(details['login'], details['password'], details['enable']) end
responsible_of(vendor)
click to toggle source
# File lib/courgette/fetchers/commutateurs_fetcher.rb, line 21 def self.responsible_of(vendor) VENDORS.keys.include? vendor end
Public Instance Methods
fetch()
click to toggle source
# File lib/courgette/fetchers/commutateurs_fetcher.rb, line 25 def fetch device = @klass.new(@ip, @credentials, false) device.connect device.enable device.configuration end