Class: Crowbar::Client::App::VirtualIP
- Defined in:
- lib/crowbar/client/app/virtual_ip.rb
Overview
A Thor based CLI wrapper for virtual IP commands
Instance Method Summary collapse
-
#allocate(proposal, service, network, range, suggestion = nil) ⇒ Object
Virtual IP allocate command.
-
#deallocate(proposal, service, network) ⇒ Object
Virtual 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
#allocate(proposal, service, network, range, suggestion = nil) ⇒ Object
Virtual IP allocate command
It will try to allocate a virtual IP address for the specified service.
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/crowbar/client/app/virtual_ip.rb', line 46 def allocate(proposal, service, network, range, suggestion = nil) Command::VirtualIP::Allocate.new( *command_params( proposal: proposal, service: service, network: network, range: range, suggestion: suggestion ) ).execute rescue => e catch_errors(e) end |
#deallocate(proposal, service, network) ⇒ Object
Virtual IP deallocate command
It will try to deallocate a virtual IP address.
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/crowbar/client/app/virtual_ip.rb', line 77 def deallocate(proposal, service, network) Command::VirtualIP::Deallocate.new( *command_params( proposal: proposal, service: service, network: network ) ).execute rescue => e catch_errors(e) end |