module HammerCliBluecat
Constants
- VERSION
Public Instance Methods
bluecat() { |client| ... }
click to toggle source
# File lib/hammer_cli_bluecat.rb, line 118 def bluecat username = HammerCLI::Settings.get(:bluecat, :username) password = HammerCLI::Settings.get(:bluecat, :password) client = Bluecat::Client.new(wsdl: HammerCLI::Settings.get(:bluecat, :wsdl)) client.login(username, password) yield client client.logout end
domain_ids()
click to toggle source
# File lib/hammer_cli_bluecat.rb, line 142 def domain_ids foreman.resource(:domains).call(:index)['results'].map { |e| e['id'] } end
foreman()
click to toggle source
# File lib/hammer_cli_bluecat.rb, line 130 def foreman uri = HammerCLI::Settings.get(:foreman, :host) username = HammerCLI::Settings.get(:foreman, :username) password = HammerCLI::Settings.get(:foreman, :password) HammerCLI::Apipie::ApiConnection.new( :uri => uri, :username => username, :password => password, :api_version => '2') end
location_ids()
click to toggle source
# File lib/hammer_cli_bluecat.rb, line 146 def location_ids begin foreman.resource(:locations).call(:index)['results'].map { |e| e['id'] } rescue [] end end
organization_ids()
click to toggle source
# File lib/hammer_cli_bluecat.rb, line 154 def organization_ids begin foreman.resource(:organizations).call(:index)['results'].map { |e| e['id'] } rescue [] end end
tftp_id()
click to toggle source
# File lib/hammer_cli_bluecat.rb, line 162 def tftp_id 1 end