Class: Crowbar::Client::App::Restricted
- Inherits:
-
Base
- Object
- Thor
- Base
- Crowbar::Client::App::Restricted
show all
- Defined in:
- lib/crowbar/client/app/restricted.rb
Overview
A Thor based CLI wrapper for restricted commands
Instance Method Summary
collapse
Methods inherited from Base
banner, handle_argument_error, #initialize
Instance Method Details
#allocate(name) ⇒ Object
32
33
34
35
36
37
38
39
40
|
# File 'lib/crowbar/client/app/restricted.rb', line 32
def allocate(name)
Command::Restricted::Allocate.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#ping ⇒ Object
49
50
51
52
53
54
55
|
# File 'lib/crowbar/client/app/restricted.rb', line 49
def ping
Command::Restricted::Ping.new(
*command_params
).execute
rescue => e
catch_errors(e)
end
|
#show(name) ⇒ Object
105
106
107
108
109
110
111
112
113
|
# File 'lib/crowbar/client/app/restricted.rb', line 105
def show(name)
Command::Restricted::Show.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#transition(name, state) ⇒ Object
123
124
125
126
127
128
129
130
131
132
|
# File 'lib/crowbar/client/app/restricted.rb', line 123
def transition(name, state)
Command::Restricted::Transition.new(
*command_params(
name: name,
state: state
)
).execute
rescue => e
catch_errors(e)
end
|