Module: HammerCliBluecat
- Included in:
- BluecatCommand::SyncNetworkCommand
- Defined in:
- lib/hammer_cli_bluecat.rb,
lib/hammer_cli_bluecat/version.rb
Defined Under Namespace
Classes: BluecatCommand
Constant Summary collapse
- VERSION =
"0.2.0"
Instance Method Summary collapse
Instance Method Details
#bluecat {|client| ... } ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/hammer_cli_bluecat.rb', line 112 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 ⇒ Object
136 137 138 |
# File 'lib/hammer_cli_bluecat.rb', line 136 def domain_ids foreman.resource(:domains).call(:index)['results'].map { |e| e['id'] } end |
#foreman ⇒ Object
124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/hammer_cli_bluecat.rb', line 124 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 |
#tftp_id ⇒ Object
140 141 142 |
# File 'lib/hammer_cli_bluecat.rb', line 140 def tftp_id 1 end |