Class: Puppet::ImageStreamerResource
- Inherits:
-
OneviewResource
- Object
- Provider
- OneviewResource
- Puppet::ImageStreamerResource
- Defined in:
- lib/puppet/provider/image_streamer_resource.rb
Overview
Base provider for Image Streamer resources
Class Method Summary collapse
Methods inherited from OneviewResource
api_version, #api_version, #client, #create, #data, #data_parse, #destroy, #exists?, #found, #initialize, instances, #ov_resource_type, resource_name, #resource_name, resource_variant, #resource_variant
Constructor Details
This class inherits a constructor from Puppet::OneviewResource
Class Method Details
.client ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/puppet/provider/image_streamer_resource.rb', line 24 def self.client credentials_set = ENV['ONEVIEW_AUTH_FILE'] || ENV['ONEVIEW_URL'] || File.exist?(File.(Dir.pwd + '/login.json', __FILE__)) return OneviewSDK::Client.new(login).new_i3s_client(login_image_streamer) if credentials_set OneviewSDK::ImageStreamer::Client.new(login_image_streamer) end |
.ov_resource_type ⇒ Object
32 33 34 35 |
# File 'lib/puppet/provider/image_streamer_resource.rb', line 32 def self.ov_resource_type api_version = login_image_streamer[:api_version] || 300 OneviewSDK::ImageStreamer.resource_named(resource_name, api_version) end |