Class: Miasma::Models::Compute
- Inherits:
-
Types::Api
- Object
- Types::Api
- Miasma::Models::Compute
- Defined in:
- lib/miasma/models/compute.rb,
lib/miasma/models/compute/server.rb,
lib/miasma/models/compute/servers.rb
Overview
Abstract compute API
Defined Under Namespace
Instance Method Summary (collapse)
-
- (Array<Models::Compute::Server>) server_all
Return all servers.
-
- (TrueClass, FalseClass) server_change_state(server, action)
Change server to desired state.
-
- (TrueClass, FalseClass) server_destroy(server)
Delete server instance.
-
- (Array<Server>) server_filter(filter = {})
Filtered compute instances.
-
- (Models::Compute::Server) server_reload(server)
Reload the server data from the API.
-
- (Models::Compute::Server) server_save(server)
Create new server instance.
-
- (Types::Collection<Models::Compute::Server>) servers
All compute instances.
Constructor Details
This class inherits a constructor from Miasma::Types::Api
Instance Method Details
- (Array<Models::Compute::Server>) server_all
Return all servers
55 56 57 |
# File 'lib/miasma/models/compute.rb', line 55 def server_all raise NotImplementedError end |
- (TrueClass, FalseClass) server_change_state(server, action)
Change server to desired state
64 65 66 |
# File 'lib/miasma/models/compute.rb', line 64 def server_change_state(server, action) raise NotImplementedError end |
- (TrueClass, FalseClass) server_destroy(server)
Delete server instance
48 49 50 |
# File 'lib/miasma/models/compute.rb', line 48 def server_destroy(server) raise NotImplementedError end |
- (Array<Server>) server_filter(filter = {})
Filtered compute instances
25 26 |
# File 'lib/miasma/models/compute.rb', line 25 def server_filter(filter={}) end |
- (Models::Compute::Server) server_reload(server)
Reload the server data from the API
40 41 42 |
# File 'lib/miasma/models/compute.rb', line 40 def server_reload(server) raise NotImplementedError end |
- (Models::Compute::Server) server_save(server)
Create new server instance
32 33 34 |
# File 'lib/miasma/models/compute.rb', line 32 def server_save(server) raise NotImplementedError end |
- (Types::Collection<Models::Compute::Server>) servers
All compute instances
14 15 16 17 18 |
# File 'lib/miasma/models/compute.rb', line 14 def servers memoize(:servers) do Servers.new(self) end end |