Class: ServersController
- Inherits:
-
MVCLI::Controller
- Object
- MVCLI::Controller
- ServersController
- Defined in:
- app/controllers/servers_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/controllers/servers_controller.rb', line 12 def create = { name: generate_name, flavor_id: 2, image_id: '9922a7c7-5a42-4a56-bc6a-93f857ae2346' } compute.servers.create end |
#destroy ⇒ Object
21 22 23 24 25 |
# File 'app/controllers/servers_controller.rb', line 21 def destroy server.tap do |s| s.destroy end end |
#index ⇒ Object
4 5 6 |
# File 'app/controllers/servers_controller.rb', line 4 def index compute.servers.all end |
#show ⇒ Object
8 9 10 |
# File 'app/controllers/servers_controller.rb', line 8 def show server end |