Class: OcciClient
- Inherits:
-
Object
- Object
- OcciClient
- Defined in:
- lib/probe/occi/client.rb
Overview
OCCI Client class.
Options
-
options - Hash with provided command line arguments.
Instance Method Summary collapse
- #compute ⇒ Object
-
#initialize(options) ⇒ OcciClient
constructor
A new instance of OcciClient.
-
#network ⇒ Object
Dynamically selects the proper class.
- #storage ⇒ Object
Constructor Details
#initialize(options) ⇒ OcciClient
Returns a new instance of OcciClient.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/probe/occi/client.rb', line 27 def initialize() @connection = # Select OCCI version if [:occi].to_s == 'rocci' @occi_ver = 'Rocci' else @occi_ver = 'Occi' end end |
Instance Method Details
#compute ⇒ Object
47 48 49 |
# File 'lib/probe/occi/client.rb', line 47 def compute @compute ||= eval("#{@occi_ver}::Compute.new @connection") end |
#network ⇒ Object
Dynamically selects the proper class
39 40 41 |
# File 'lib/probe/occi/client.rb', line 39 def network @network ||= eval("#{@occi_ver}::Network.new @connection") end |
#storage ⇒ Object
43 44 45 |
# File 'lib/probe/occi/client.rb', line 43 def storage @storage ||= eval("#{@occi_ver}::Storage.new @connection") end |