Class: ProviderTesting::Helper
- Inherits:
-
Object
- Object
- ProviderTesting::Helper
- Defined in:
- lib/provider-testing/helper.rb
Class Method Summary collapse
- .cimom ⇒ Object
-
.cimom=(name) ⇒ Object
called from rake.
-
.setup(klass = "", namespace = "root/cimv2") ⇒ Object
called from test/unit.
- .teardown ⇒ Object
Class Method Details
.cimom ⇒ Object
24 25 26 |
# File 'lib/provider-testing/helper.rb', line 24 def self.cimom @@cimom rescue (self.cimom = :sfcb; @@cimom) end |
.cimom=(name) ⇒ Object
called from rake
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/provider-testing/helper.rb', line 12 def self.cimom= name @@cimom ||= case name when :sfcb require_relative "./sfcb" Sfcb.new :tmpdir => TMPDIR, :provider => PROVIDERDIR when :pegasus require_relative "./pegasus" Pegasus.new :tmpdir => TMPDIR, :provider => PROVIDERDIR else raise "Unknown CIMOM #{@cimom}" end end |
.setup(klass = "", namespace = "root/cimv2") ⇒ Object
called from test/unit
30 31 32 33 34 35 |
# File 'lib/provider-testing/helper.rb', line 30 def self.setup klass = "", namespace = "root/cimv2" client = Sfcc::Cim::Client.connect(:uri => self.cimom.uri, :verify => false) raise "Connection error" unless client op = Sfcc::Cim::ObjectPath.new(namespace, klass, client) return client, op end |
.teardown ⇒ Object
36 37 38 |
# File 'lib/provider-testing/helper.rb', line 36 def self.teardown self.cimom.stop end |