Module: Occi::Api::Client::Base::Stubs
- Included in:
- ClientBase
- Defined in:
- lib/occi/api/client/base/stubs.rb
Instance Method Summary collapse
-
#create(entity) ⇒ String
Creates a new resource on the server.
-
#delete(resource_type_identifier) ⇒ Boolean
Deletes a resource or all resource of a certain resource type from the server.
-
#describe(resource_type_identifier = nil) ⇒ Occi::Core::Resources, Occi::Core::Links
Retrieves descriptions for available resources specified by a type identifier or resource location.
-
#list(resource_type_identifier = nil) ⇒ Array<String>
Retrieves available resources represented by resource locations (URIs).
-
#refresh ⇒ Object
Refreshes the Occi::Model used inside the client.
-
#trigger(resource_type_identifier, action_instance) ⇒ Boolean
Triggers given action on a specific resource.
-
#update(resource_type_identifier, mixins) ⇒ Boolean
Updates given resource with the specified mixin(s).
Instance Method Details
#create(entity) ⇒ String
Creates a new resource on the server. Resource must be provided as an instance of Occi::Core::Entity, e.g. instantiated using the get_resource method.
63 64 65 |
# File 'lib/occi/api/client/base/stubs.rb', line 63 def create(entity) raise Occi::Api::Client::Errors::NotImplementedError, "#{__method__} is just a stub!" end |
#delete(resource_type_identifier) ⇒ Boolean
Deletes a resource or all resource of a certain resource type from the server.
77 78 79 |
# File 'lib/occi/api/client/base/stubs.rb', line 77 def delete(resource_type_identifier) raise Occi::Api::Client::Errors::NotImplementedError, "#{__method__} is just a stub!" end |
#describe(resource_type_identifier = nil) ⇒ Occi::Core::Resources, Occi::Core::Links
Retrieves descriptions for available resources specified by a type identifier or resource location. If no type identifier or location is specified, all available resources in all available resource types will be described.
44 45 46 |
# File 'lib/occi/api/client/base/stubs.rb', line 44 def describe(resource_type_identifier=nil) raise Occi::Api::Client::Errors::NotImplementedError, "#{__method__} is just a stub!" end |
#list(resource_type_identifier = nil) ⇒ Array<String>
Retrieves available resources represented by resource locations (URIs). If no type identifier is specified, all available resource are listed. Type identifier can be specified in its shortened format (e.g. "compute", "storage", "network").
23 24 25 |
# File 'lib/occi/api/client/base/stubs.rb', line 23 def list(resource_type_identifier=nil) raise Occi::Api::Client::Errors::NotImplementedError, "#{__method__} is just a stub!" end |
#refresh ⇒ Object
Refreshes the Occi::Model used inside the client. Useful for updating the model without creating a new instance or reconnecting. Saves a lot of time in an interactive mode.
111 112 113 |
# File 'lib/occi/api/client/base/stubs.rb', line 111 def refresh raise Occi::Api::Client::Errors::NotImplementedError, "#{__method__} is just a stub!" end |
#trigger(resource_type_identifier, action_instance) ⇒ Boolean
Triggers given action on a specific resource.
89 90 91 |
# File 'lib/occi/api/client/base/stubs.rb', line 89 def trigger(resource_type_identifier, action_instance) raise Occi::Api::Client::Errors::NotImplementedError, "#{__method__} is just a stub!" end |
#update(resource_type_identifier, mixins) ⇒ Boolean
Updates given resource with the specified mixin(s).
101 102 103 |
# File 'lib/occi/api/client/base/stubs.rb', line 101 def update(resource_type_identifier, mixins) raise Occi::Api::Client::Errors::NotImplementedError, "#{__method__} is just a stub!" end |