Class: Crowbar::Client::App::Interface

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

Overview

A Thor based CLI wrapper for interface commands

Instance Method Summary collapse

Methods inherited from Base

banner, handle_argument_error, #initialize

Constructor Details

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

Instance Method Details

#disable(proposal, node, network) ⇒ Object

Interface disable command

Disable a network interface.

Parameters:

  • proposal (String)

    the proposal name

  • node (String)

    the node name or alias

  • network (String)

    the network name



72
73
74
75
76
77
78
79
80
81
82
# File 'lib/crowbar/client/app/interface.rb', line 72

def disable(proposal, node, network)
  Command::Interface::Disable.new(
    *command_params(
      proposal: proposal,
      node: node,
      network: network
    )
  ).execute
rescue => e
  catch_errors(e)
end

#enable(proposal, node, network) ⇒ Object

Interface enable command

Enable a network interface.

Parameters:

  • proposal (String)

    the proposal name

  • node (String)

    the node name or alias

  • network (String)

    the network name



43
44
45
46
47
48
49
50
51
52
53
# File 'lib/crowbar/client/app/interface.rb', line 43

def enable(proposal, node, network)
  Command::Interface::Enable.new(
    *command_params(
      proposal: proposal,
      node: node,
      network: network
    )
  ).execute
rescue => e
  catch_errors(e)
end