Class: Crowbar::Client::App::HostIP
- Defined in:
- lib/crowbar/client/app/host_ip.rb
Overview
A Thor based CLI wrapper for host IP commands
Instance Method Summary collapse
-
#allocate(proposal, node, network, range, suggestion = nil) ⇒ Object
Host IP allocate command.
-
#deallocate(proposal, node, network) ⇒ Object
Host IP deallocate command.
Methods inherited from Base
banner, handle_argument_error, #initialize
Constructor Details
This class inherits a constructor from Crowbar::Client::App::Base
Instance Method Details
permalink #allocate(proposal, node, network, range, suggestion = nil) ⇒ Object
Host IP allocate command
It will try to allocate a host IP address for the specified node.
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/crowbar/client/app/host_ip.rb', line 46 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 => e catch_errors(e) end |
permalink #deallocate(proposal, node, network) ⇒ Object
Host IP deallocate command
It will try to deallocate a host IP address.
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/crowbar/client/app/host_ip.rb', line 77 def deallocate(proposal, node, network) Command::HostIP::Deallocate.new( *command_params( proposal: proposal, node: node, network: network ) ).execute rescue => e catch_errors(e) end |