class Nodeum::TapeLibrariesApi
Attributes
Public Class Methods
# File lib/nodeum_sdk/api/tape_libraries_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Creates a new tape library. **API Key Scope**: tape_libraries / create @param tape_library_body [TapeLibrary] @param [Hash] opts the optional parameters @return [TapeLibrary]
# File lib/nodeum_sdk/api/tape_libraries_api.rb, line 27 def create_tape_library(tape_library_body, opts = {}) data, _status_code, _headers = create_tape_library_with_http_info(tape_library_body, opts) data end
Creates a new tape library. **API Key Scope**: tape_libraries / create @param tape_library_body [TapeLibrary] @param [Hash] opts the optional parameters @return [Array<(TapeLibrary
, Integer, Hash)>] TapeLibrary
data, response status code and response headers
# File lib/nodeum_sdk/api/tape_libraries_api.rb, line 37 def create_tape_library_with_http_info(tape_library_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TapeLibrariesApi.create_tape_library ...' end # verify the required parameter 'tape_library_body' is set if @api_client.config.client_side_validation && tape_library_body.nil? fail ArgumentError, "Missing the required parameter 'tape_library_body' when calling TapeLibrariesApi.create_tape_library" end # resource path local_var_path = '/tape_libraries' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(tape_library_body) # return_type return_type = opts[:return_type] || 'TapeLibrary' # auth_names auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: TapeLibrariesApi#create_tape_library\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Destroys a specific tape library. **API Key Scope**: tape_libraries / destroy @param tape_library_id [String] Numeric ID, serial, or name of tape library. @param [Hash] opts the optional parameters @return [nil]
# File lib/nodeum_sdk/api/tape_libraries_api.rb, line 91 def destroy_tape_library(tape_library_id, opts = {}) destroy_tape_library_with_http_info(tape_library_id, opts) nil end
Destroys a specific tape library. **API Key Scope**: tape_libraries / destroy @param tape_library_id [String] Numeric ID, serial, or name of tape library. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/nodeum_sdk/api/tape_libraries_api.rb, line 101 def destroy_tape_library_with_http_info(tape_library_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TapeLibrariesApi.destroy_tape_library ...' end # verify the required parameter 'tape_library_id' is set if @api_client.config.client_side_validation && tape_library_id.nil? fail ArgumentError, "Missing the required parameter 'tape_library_id' when calling TapeLibrariesApi.destroy_tape_library" end # resource path local_var_path = '/tape_libraries/{tape_library_id}'.sub('{' + 'tape_library_id' + '}', CGI.escape(tape_library_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: TapeLibrariesApi#destroy_tape_library\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Lists all tape libraries. **API Key Scope**: tape_libraries / index @param [Hash] opts the optional parameters @option opts [Integer] :limit The number of items to display for pagination. @option opts [Integer] :offset The number of items to skip for pagination. @option opts [Array<String>] :sort_by Sort results by attribute. Can sort on multiple attributes, separated by `|`. Order direction can be suffixing the attribute by either `:asc` (default) or `:desc`. @option opts [String] :id Filter on id @option opts [String] :name Filter on name @option opts [String] :serial Filter on serial @option opts [String] :comment Filter on comment @option opts [String] :protocol Filter on protocol @option opts [String] :vendor Filter on vendor @option opts [String] :product Filter on product @option opts [String] :firmware Filter on firmware @option opts [String] :device Filter on device @option opts [String] :libso Filter on libso @option opts [String] :acs Filter on acs @option opts [String] :status Filter on status @option opts [String] :storage_slots Filter on storage slots @option opts [String] :storage_slots_address Filter on storage slots address @option opts [String] :io_slots Filter on io slots @option opts [String] :io_slots_address Filter on io slots address @option opts [String] :price Filter on price @return [TapeLibraryCollection]
# File lib/nodeum_sdk/api/tape_libraries_api.rb, line 170 def index_tape_libraries(opts = {}) data, _status_code, _headers = index_tape_libraries_with_http_info(opts) data end
Lists all tape libraries. **API Key Scope**: tape_libraries / index @param [Hash] opts the optional parameters @option opts [Integer] :limit The number of items to display for pagination. @option opts [Integer] :offset The number of items to skip for pagination. @option opts [Array<String>] :sort_by Sort results by attribute. Can sort on multiple attributes, separated by `|`. Order direction can be suffixing the attribute by either `:asc` (default) or `:desc`. @option opts [String] :id Filter on id @option opts [String] :name Filter on name @option opts [String] :serial Filter on serial @option opts [String] :comment Filter on comment @option opts [String] :protocol Filter on protocol @option opts [String] :vendor Filter on vendor @option opts [String] :product Filter on product @option opts [String] :firmware Filter on firmware @option opts [String] :device Filter on device @option opts [String] :libso Filter on libso @option opts [String] :acs Filter on acs @option opts [String] :status Filter on status @option opts [String] :storage_slots Filter on storage slots @option opts [String] :storage_slots_address Filter on storage slots address @option opts [String] :io_slots Filter on io slots @option opts [String] :io_slots_address Filter on io slots address @option opts [String] :price Filter on price @return [Array<(TapeLibraryCollection
, Integer, Hash)>] TapeLibraryCollection
data, response status code and response headers
# File lib/nodeum_sdk/api/tape_libraries_api.rb, line 199 def index_tape_libraries_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TapeLibrariesApi.index_tape_libraries ...' end # resource path local_var_path = '/tape_libraries' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'sort_by'] = @api_client.build_collection_param(opts[:'sort_by'], :pipe) if !opts[:'sort_by'].nil? query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'serial'] = opts[:'serial'] if !opts[:'serial'].nil? query_params[:'comment'] = opts[:'comment'] if !opts[:'comment'].nil? query_params[:'protocol'] = opts[:'protocol'] if !opts[:'protocol'].nil? query_params[:'vendor'] = opts[:'vendor'] if !opts[:'vendor'].nil? query_params[:'product'] = opts[:'product'] if !opts[:'product'].nil? query_params[:'firmware'] = opts[:'firmware'] if !opts[:'firmware'].nil? query_params[:'device'] = opts[:'device'] if !opts[:'device'].nil? query_params[:'libso'] = opts[:'libso'] if !opts[:'libso'].nil? query_params[:'acs'] = opts[:'acs'] if !opts[:'acs'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'storage_slots'] = opts[:'storage_slots'] if !opts[:'storage_slots'].nil? query_params[:'storage_slots_address'] = opts[:'storage_slots_address'] if !opts[:'storage_slots_address'].nil? query_params[:'io_slots'] = opts[:'io_slots'] if !opts[:'io_slots'].nil? query_params[:'io_slots_address'] = opts[:'io_slots_address'] if !opts[:'io_slots_address'].nil? query_params[:'price'] = opts[:'price'] if !opts[:'price'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'TapeLibraryCollection' # auth_names auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: TapeLibrariesApi#index_tape_libraries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Lists tape libraries devices. **API Key Scope**: tape_libraries / devices @param job_id [String] ID of active job @param [Hash] opts the optional parameters @return [TapeLibraryDeviceCollection]
# File lib/nodeum_sdk/api/tape_libraries_api.rb, line 267 def index_tape_library_devices(job_id, opts = {}) data, _status_code, _headers = index_tape_library_devices_with_http_info(job_id, opts) data end
Lists tape libraries devices. **API Key Scope**: tape_libraries / devices @param job_id [String] ID of active job @param [Hash] opts the optional parameters @return [Array<(TapeLibraryDeviceCollection
, Integer, Hash)>] TapeLibraryDeviceCollection
data, response status code and response headers
# File lib/nodeum_sdk/api/tape_libraries_api.rb, line 277 def index_tape_library_devices_with_http_info(job_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TapeLibrariesApi.index_tape_library_devices ...' end # verify the required parameter 'job_id' is set if @api_client.config.client_side_validation && job_id.nil? fail ArgumentError, "Missing the required parameter 'job_id' when calling TapeLibrariesApi.index_tape_library_devices" end # resource path local_var_path = '/tape_libraries/-/devices' # query parameters query_params = opts[:query_params] || {} query_params[:'job_id'] = job_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'queued', 'working', 'failed', ]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'TapeLibraryDeviceCollection' # auth_names auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: TapeLibrariesApi#index_tape_library_devices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Displays a specific tape library. **API Key Scope**: tape_libraries / show @param tape_library_id [String] Numeric ID, serial, or name of tape library. @param [Hash] opts the optional parameters @return [TapeLibrary]
# File lib/nodeum_sdk/api/tape_libraries_api.rb, line 330 def show_tape_library(tape_library_id, opts = {}) data, _status_code, _headers = show_tape_library_with_http_info(tape_library_id, opts) data end
Displays a specific tape library. **API Key Scope**: tape_libraries / show @param tape_library_id [String] Numeric ID, serial, or name of tape library. @param [Hash] opts the optional parameters @return [Array<(TapeLibrary
, Integer, Hash)>] TapeLibrary
data, response status code and response headers
# File lib/nodeum_sdk/api/tape_libraries_api.rb, line 340 def show_tape_library_with_http_info(tape_library_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TapeLibrariesApi.show_tape_library ...' end # verify the required parameter 'tape_library_id' is set if @api_client.config.client_side_validation && tape_library_id.nil? fail ArgumentError, "Missing the required parameter 'tape_library_id' when calling TapeLibrariesApi.show_tape_library" end # resource path local_var_path = '/tape_libraries/{tape_library_id}'.sub('{' + 'tape_library_id' + '}', CGI.escape(tape_library_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'TapeLibrary' # auth_names auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: TapeLibrariesApi#show_tape_library\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific tape library. **API Key Scope**: tape_libraries / update @param tape_library_id [String] Numeric ID, serial, or name of tape library. @param tape_library_body [TapeLibrary] @param [Hash] opts the optional parameters @return [TapeLibrary]
# File lib/nodeum_sdk/api/tape_libraries_api.rb, line 393 def update_tape_library(tape_library_id, tape_library_body, opts = {}) data, _status_code, _headers = update_tape_library_with_http_info(tape_library_id, tape_library_body, opts) data end
Updates a specific tape library. **API Key Scope**: tape_libraries / update @param tape_library_id [String] Numeric ID, serial, or name of tape library. @param tape_library_body [TapeLibrary] @param [Hash] opts the optional parameters @return [Array<(TapeLibrary
, Integer, Hash)>] TapeLibrary
data, response status code and response headers
# File lib/nodeum_sdk/api/tape_libraries_api.rb, line 404 def update_tape_library_with_http_info(tape_library_id, tape_library_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TapeLibrariesApi.update_tape_library ...' end # verify the required parameter 'tape_library_id' is set if @api_client.config.client_side_validation && tape_library_id.nil? fail ArgumentError, "Missing the required parameter 'tape_library_id' when calling TapeLibrariesApi.update_tape_library" end # verify the required parameter 'tape_library_body' is set if @api_client.config.client_side_validation && tape_library_body.nil? fail ArgumentError, "Missing the required parameter 'tape_library_body' when calling TapeLibrariesApi.update_tape_library" end # resource path local_var_path = '/tape_libraries/{tape_library_id}'.sub('{' + 'tape_library_id' + '}', CGI.escape(tape_library_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(tape_library_body) # return_type return_type = opts[:return_type] || 'TapeLibrary' # auth_names auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: TapeLibrariesApi#update_tape_library\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end