Class: Crowbar::Client::App::HostIP

Inherits:
Base
  • Object
show all
Defined in:
lib/crowbar/client/app/host_ip.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Crowbar::Client::App::Base

Instance Method Details

#allocate(proposal, node, network, range, suggestion = nil) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/crowbar/client/app/host_ip.rb', line 29

def allocate(proposal, node, network, range, suggestion = nil)
  Command::HostIP::Allocate.new(
    *command_params(
      proposal: proposal,
      node: node,
      network: network,
      range: range,
      suggestion: suggestion
    )
  ).execute
rescue SimpleCatchableError => e
  err e.message, 1
end

#deallocate(proposal, node, network) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
# File 'lib/crowbar/client/app/host_ip.rb', line 51

def deallocate(proposal, node, network)
  Command::HostIP::Allocate.new(
    *command_params(
      proposal: proposal,
      node: node,
      network: network
    )
  ).execute
rescue SimpleCatchableError => e
  err e.message, 1
end