Class: MixinController

Inherits:
ApplicationController show all
Defined in:
app/controllers/mixin_controller.rb

Overview

Controller class handling all mixin-related requests. Implements listing, assignment, creation, deletion and triggering actions on mixin-tagged instances.

`os_tpl` and `resource_tpl` mixins are a special case and are handled separately. See OsTplController and ResourceTplController.

TODO: Not yet implemented! Returns HTTP 501 for all requests!

Constant Summary

Constants inherited from ApplicationController

ApplicationController::INDEX_LINK_FORMATS

Instance Method Summary collapse

Methods inherited from ApplicationController

#authenticate!, #current_user, #request_occi_collection, #warden

Methods included from Mixins::ErrorHandling

#handle_auth_err, #handle_authz_err, #handle_backend_unavailable_err, #handle_internal_backend_err, #handle_invalid_resource_err, #handle_not_impl_err, #handle_parser_input_err, #handle_parser_type_err, #handle_resource_not_found_err, #handle_wrong_args_err

Instance Method Details

#assignObject

POST /mixin/:term*/


25
26
27
28
29
# File 'app/controllers/mixin_controller.rb', line 25

def assign
  # TODO: impl
  collection = Occi::Collection.new
  respond_with(collection, status: 501)
end

#deleteObject

DELETE /mixin/:term*/


39
40
41
42
43
# File 'app/controllers/mixin_controller.rb', line 39

def delete
  # TODO: impl
  collection = Occi::Collection.new
  respond_with(collection, status: 501)
end

#indexObject

GET /mixin/:term*/


11
12
13
14
15
# File 'app/controllers/mixin_controller.rb', line 11

def index
  # TODO: impl
  @resources = Occi::Collection.new
  respond_with(@resources, status: 501)
end

#triggerObject

POST /mixin/:term*/?action=:action


18
19
20
21
22
# File 'app/controllers/mixin_controller.rb', line 18

def trigger
  # TODO: impl
  collection = Occi::Collection.new
  respond_with(collection, status: 501)
end

#updateObject

PUT /mixin/:term*/


32
33
34
35
36
# File 'app/controllers/mixin_controller.rb', line 32

def update
  # TODO: impl
  collection = Occi::Collection.new
  respond_with(collection, status: 501)
end