class OneviewSDK::API200::FirmwareBundle

Firmware bundle resource implementation

Constants

BASE_URI

Public Class Methods

add(client, file_path, timeout = OneviewSDK::Rest::READ_TIMEOUT) click to toggle source

Uploads a firmware bundle file @param [OneviewSDK::Client] client The client object for the OneView appliance @param [String] file_path @param [Integer] timeout The number of seconds to wait for completing the request @return [OneviewSDK::FirmwareDriver] if the upload was successful, return a FirmwareDriver object

# File lib/oneview-sdk/resource/api200/firmware_bundle.rb, line 23
def self.add(client, file_path, timeout = OneviewSDK::Rest::READ_TIMEOUT)
  options = { 'header' => { 'uploadfilename' => File.basename(file_path) } }
  result = client.upload_file(file_path, BASE_URI, options, timeout)
  variant = name.split('::').at(-2)
  OneviewSDK.resource_named('FirmwareDriver', client.api_version, variant).new(client, result)
end