class OneviewSDK::API200::LogicalEnclosure

Logical enclosure resource implementation

Constants

BASE_URI

Public Class Methods

new(client, params = {}, api_ver = nil) click to toggle source

Create a resource object, associate it with a client, and set its properties. @param [OneviewSDK::Client] client The client object for the OneView appliance @param [Hash] params The options for this resource (key-value pairs) @param [Integer] api_ver The api version to use when interracting with this resource.

Calls superclass method OneviewSDK::Resource::new
# File lib/oneview-sdk/resource/api200/logical_enclosure.rb, line 24
def initialize(client, params = {}, api_ver = nil)
  super
end

Public Instance Methods

get_script() click to toggle source

Get the configuration script @raise [OneviewSDK::IncompleteResource] if the client is not set @raise [OneviewSDK::IncompleteResource] if the uri is not set @raise [StandardError] if retrieving fails @return [String] script

# File lib/oneview-sdk/resource/api200/logical_enclosure.rb, line 57
def get_script
  ensure_client && ensure_uri
  response = @client.rest_get("#{@data['uri']}/script", {}, @api_version)
  response.body
end
reconfigure() click to toggle source

Reapplies the appliance's configuration on the enclosures @raise [OneviewSDK::IncompleteResource] if the client is not set @raise [OneviewSDK::IncompleteResource] if the uri is not set @raise [StandardError] if the reapply fails @return [OneviewSDK::LogicalEnclosure] self

# File lib/oneview-sdk/resource/api200/logical_enclosure.rb, line 33
def reconfigure
  ensure_client && ensure_uri
  response = @client.rest_put("#{@data['uri']}/configuration", {}, @api_version)
  @client.response_handler(response)
  self
end
set_script(script) click to toggle source

Updates the configuration script for the logical enclosure @raise [OneviewSDK::IncompleteResource] if the client is not set @raise [OneviewSDK::IncompleteResource] if the uri is not set @raise [StandardError] if the reapply fails @return [OneviewSDK::LogicalEnclosure] self

# File lib/oneview-sdk/resource/api200/logical_enclosure.rb, line 68
def set_script(script)
  ensure_client && ensure_uri
  response = @client.rest_put("#{@data['uri']}/script", { 'body' => script }, @api_version)
  @client.response_handler(response)
  self
end
support_dump(options) click to toggle source

Generates a support dump for the logical enclosure @raise [OneviewSDK::IncompleteResource] if the client is not set @raise [OneviewSDK::IncompleteResource] if the uri is not set @raise [StandardError] if the process fails when generating the support dump @return [OneviewSDK::LogicalEnclosure] self

# File lib/oneview-sdk/resource/api200/logical_enclosure.rb, line 80
def support_dump(options)
  ensure_client && ensure_uri
  response = @client.rest_post("#{@data['uri']}/support-dumps", { 'body' => options }, @api_version)
  @client.wait_for(response.header['location'])
  self
end
update_from_group() click to toggle source

Makes this logical enclosure consistent with the enclosure group @raise [OneviewSDK::IncompleteResource] if the client is not set @raise [OneviewSDK::IncompleteResource] if the uri is not set @raise [StandardError] if the process fails @return [OneviewSDK::LogicalEnclosure] self

# File lib/oneview-sdk/resource/api200/logical_enclosure.rb, line 45
def update_from_group
  ensure_client && ensure_uri
  response = @client.rest_put("#{@data['uri']}/updateFromGroup", {}, @api_version)
  @client.response_handler(response)
  self
end