class Crowbar::Client::App::VirtualIP

A Thor based CLI wrapper for virtual IP commands

Public Instance Methods

allocate(proposal, service, network, range, suggestion = nil) click to toggle source

Virtual IP allocate command

It will try to allocate a virtual IP address for the specified service.

@param proposal [String] the proposal name @param service [String] the service name @param network [String] the network name @param range [String] the network range @param suggestion [String] an optional suggestion

# 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) click to toggle source

Virtual IP deallocate command

It will try to deallocate a virtual IP address.

@param proposal [String] the proposal name @param service [String] the service name @param network [String] the network name

# 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