class Nodeum::PoolsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/nodeum_sdk/api/pools_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

create_pool(pool_body, opts = {}) click to toggle source

Creates a new pool. **API Key Scope**: pools / create @param pool_body [PoolUp] @param [Hash] opts the optional parameters @return [Pool]

# File lib/nodeum_sdk/api/pools_api.rb, line 27
def create_pool(pool_body, opts = {})
  data, _status_code, _headers = create_pool_with_http_info(pool_body, opts)
  data
end
create_pool_with_http_info(pool_body, opts = {}) click to toggle source

Creates a new pool. **API Key Scope**: pools / create @param pool_body [PoolUp] @param [Hash] opts the optional parameters @return [Array<(Pool, Integer, Hash)>] Pool data, response status code and response headers

# File lib/nodeum_sdk/api/pools_api.rb, line 37
def create_pool_with_http_info(pool_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PoolsApi.create_pool ...'
  end
  # verify the required parameter 'pool_body' is set
  if @api_client.config.client_side_validation && pool_body.nil?
    fail ArgumentError, "Missing the required parameter 'pool_body' when calling PoolsApi.create_pool"
  end
  # resource path
  local_var_path = '/pools'

  # 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(pool_body) 

  # return_type
  return_type = opts[:return_type] || 'Pool' 

  # 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: PoolsApi#create_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_primary_scan(pool_id, primary_scan_body, opts = {}) click to toggle source

Set a new primary pool scan option. **API Key Scope**: primary_scans / create @param pool_id [String] Numeric ID, or name of pool. @param primary_scan_body [PrimaryScan] @param [Hash] opts the optional parameters @return [PrimaryScan]

# File lib/nodeum_sdk/api/pools_api.rb, line 92
def create_primary_scan(pool_id, primary_scan_body, opts = {})
  data, _status_code, _headers = create_primary_scan_with_http_info(pool_id, primary_scan_body, opts)
  data
end
create_primary_scan_with_http_info(pool_id, primary_scan_body, opts = {}) click to toggle source

Set a new primary pool scan option. **API Key Scope**: primary_scans / create @param pool_id [String] Numeric ID, or name of pool. @param primary_scan_body [PrimaryScan] @param [Hash] opts the optional parameters @return [Array<(PrimaryScan, Integer, Hash)>] PrimaryScan data, response status code and response headers

# File lib/nodeum_sdk/api/pools_api.rb, line 103
def create_primary_scan_with_http_info(pool_id, primary_scan_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PoolsApi.create_primary_scan ...'
  end
  # verify the required parameter 'pool_id' is set
  if @api_client.config.client_side_validation && pool_id.nil?
    fail ArgumentError, "Missing the required parameter 'pool_id' when calling PoolsApi.create_primary_scan"
  end
  # verify the required parameter 'primary_scan_body' is set
  if @api_client.config.client_side_validation && primary_scan_body.nil?
    fail ArgumentError, "Missing the required parameter 'primary_scan_body' when calling PoolsApi.create_primary_scan"
  end
  # resource path
  local_var_path = '/pools/{pool_id}/primary_scan'.sub('{' + 'pool_id' + '}', CGI.escape(pool_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(primary_scan_body) 

  # return_type
  return_type = opts[:return_type] || 'PrimaryScan' 

  # 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: PoolsApi#create_primary_scan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
destroy_pool(pool_id, opts = {}) click to toggle source

Destroys a specific tape pool. **API Key Scope**: pools / destroy @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [nil]

# File lib/nodeum_sdk/api/pools_api.rb, line 161
def destroy_pool(pool_id, opts = {})
  destroy_pool_with_http_info(pool_id, opts)
  nil
end
destroy_pool_with_http_info(pool_id, opts = {}) click to toggle source

Destroys a specific tape pool. **API Key Scope**: pools / destroy @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/nodeum_sdk/api/pools_api.rb, line 171
def destroy_pool_with_http_info(pool_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PoolsApi.destroy_pool ...'
  end
  # verify the required parameter 'pool_id' is set
  if @api_client.config.client_side_validation && pool_id.nil?
    fail ArgumentError, "Missing the required parameter 'pool_id' when calling PoolsApi.destroy_pool"
  end
  # resource path
  local_var_path = '/pools/{pool_id}'.sub('{' + 'pool_id' + '}', CGI.escape(pool_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: PoolsApi#destroy_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
destroy_primary_scan(pool_id, opts = {}) click to toggle source

Disable the primary pool scan. **API Key Scope**: primary_scans / destroy @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [nil]

# File lib/nodeum_sdk/api/pools_api.rb, line 221
def destroy_primary_scan(pool_id, opts = {})
  destroy_primary_scan_with_http_info(pool_id, opts)
  nil
end
destroy_primary_scan_with_http_info(pool_id, opts = {}) click to toggle source

Disable the primary pool scan. **API Key Scope**: primary_scans / destroy @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/nodeum_sdk/api/pools_api.rb, line 231
def destroy_primary_scan_with_http_info(pool_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PoolsApi.destroy_primary_scan ...'
  end
  # verify the required parameter 'pool_id' is set
  if @api_client.config.client_side_validation && pool_id.nil?
    fail ArgumentError, "Missing the required parameter 'pool_id' when calling PoolsApi.destroy_primary_scan"
  end
  # resource path
  local_var_path = '/pools/{pool_id}/primary_scan'.sub('{' + 'pool_id' + '}', CGI.escape(pool_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: PoolsApi#destroy_primary_scan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
index_pools(opts = {}) click to toggle source

Lists all pools. **API Key Scope**: pools / 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 &#x60;|&#x60;. Order direction can be suffixing the attribute by either &#x60;:asc&#x60; (default) or &#x60;:desc&#x60;. @option opts [String] :id Filter on id @option opts [String] :name Filter on name @option opts [String] :comment Filter on comment @option opts [String] :type Filter on type @option opts [String] :content Filter on content @option opts [String] :primary_id Filter on primary id @return [PoolCollection]

# File lib/nodeum_sdk/api/pools_api.rb, line 289
def index_pools(opts = {})
  data, _status_code, _headers = index_pools_with_http_info(opts)
  data
end
index_pools_with_http_info(opts = {}) click to toggle source

Lists all pools. **API Key Scope**: pools / 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 &#x60;|&#x60;. Order direction can be suffixing the attribute by either &#x60;:asc&#x60; (default) or &#x60;:desc&#x60;. @option opts [String] :id Filter on id @option opts [String] :name Filter on name @option opts [String] :comment Filter on comment @option opts [String] :type Filter on type @option opts [String] :content Filter on content @option opts [String] :primary_id Filter on primary id @return [Array<(PoolCollection, Integer, Hash)>] PoolCollection data, response status code and response headers

# File lib/nodeum_sdk/api/pools_api.rb, line 307
def index_pools_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PoolsApi.index_pools ...'
  end
  # resource path
  local_var_path = '/pools'

  # 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[:'comment'] = opts[:'comment'] if !opts[:'comment'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'content'] = opts[:'content'] if !opts[:'content'].nil?
  query_params[:'primary_id'] = opts[:'primary_id'] if !opts[:'primary_id'].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] || 'PoolCollection' 

  # 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: PoolsApi#index_pools\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
mount_pool(pool_id, opts = {}) click to toggle source

Mount Pool. **API Key Scope**: pools / mount @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [MountStatus]

# File lib/nodeum_sdk/api/pools_api.rb, line 364
def mount_pool(pool_id, opts = {})
  data, _status_code, _headers = mount_pool_with_http_info(pool_id, opts)
  data
end
mount_pool_with_http_info(pool_id, opts = {}) click to toggle source

Mount Pool. **API Key Scope**: pools / mount @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [Array<(MountStatus, Integer, Hash)>] MountStatus data, response status code and response headers

# File lib/nodeum_sdk/api/pools_api.rb, line 374
def mount_pool_with_http_info(pool_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PoolsApi.mount_pool ...'
  end
  # verify the required parameter 'pool_id' is set
  if @api_client.config.client_side_validation && pool_id.nil?
    fail ArgumentError, "Missing the required parameter 'pool_id' when calling PoolsApi.mount_pool"
  end
  # resource path
  local_var_path = '/pools/{pool_id}/mount'.sub('{' + 'pool_id' + '}', CGI.escape(pool_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] || 'MountStatus' 

  # 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: PoolsApi#mount_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
mount_status_pool(pool_id, opts = {}) click to toggle source

Get mount status of Pool. **API Key Scope**: pools / mount_status @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [MountStatus]

# File lib/nodeum_sdk/api/pools_api.rb, line 426
def mount_status_pool(pool_id, opts = {})
  data, _status_code, _headers = mount_status_pool_with_http_info(pool_id, opts)
  data
end
mount_status_pool_with_http_info(pool_id, opts = {}) click to toggle source

Get mount status of Pool. **API Key Scope**: pools / mount_status @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [Array<(MountStatus, Integer, Hash)>] MountStatus data, response status code and response headers

# File lib/nodeum_sdk/api/pools_api.rb, line 436
def mount_status_pool_with_http_info(pool_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PoolsApi.mount_status_pool ...'
  end
  # verify the required parameter 'pool_id' is set
  if @api_client.config.client_side_validation && pool_id.nil?
    fail ArgumentError, "Missing the required parameter 'pool_id' when calling PoolsApi.mount_status_pool"
  end
  # resource path
  local_var_path = '/pools/{pool_id}/mount'.sub('{' + 'pool_id' + '}', CGI.escape(pool_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] || 'MountStatus' 

  # 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: PoolsApi#mount_status_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
show_pool(pool_id, opts = {}) click to toggle source

Displays a specific pool. **API Key Scope**: pools / show @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [Pool]

# File lib/nodeum_sdk/api/pools_api.rb, line 488
def show_pool(pool_id, opts = {})
  data, _status_code, _headers = show_pool_with_http_info(pool_id, opts)
  data
end
show_pool_with_http_info(pool_id, opts = {}) click to toggle source

Displays a specific pool. **API Key Scope**: pools / show @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [Array<(Pool, Integer, Hash)>] Pool data, response status code and response headers

# File lib/nodeum_sdk/api/pools_api.rb, line 498
def show_pool_with_http_info(pool_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PoolsApi.show_pool ...'
  end
  # verify the required parameter 'pool_id' is set
  if @api_client.config.client_side_validation && pool_id.nil?
    fail ArgumentError, "Missing the required parameter 'pool_id' when calling PoolsApi.show_pool"
  end
  # resource path
  local_var_path = '/pools/{pool_id}'.sub('{' + 'pool_id' + '}', CGI.escape(pool_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] || 'Pool' 

  # 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: PoolsApi#show_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
show_primary_scan(pool_id, opts = {}) click to toggle source

Displays the primary pool scan status. **API Key Scope**: primary_scans / show @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [PrimaryScan]

# File lib/nodeum_sdk/api/pools_api.rb, line 550
def show_primary_scan(pool_id, opts = {})
  data, _status_code, _headers = show_primary_scan_with_http_info(pool_id, opts)
  data
end
show_primary_scan_with_http_info(pool_id, opts = {}) click to toggle source

Displays the primary pool scan status. **API Key Scope**: primary_scans / show @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [Array<(PrimaryScan, Integer, Hash)>] PrimaryScan data, response status code and response headers

# File lib/nodeum_sdk/api/pools_api.rb, line 560
def show_primary_scan_with_http_info(pool_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PoolsApi.show_primary_scan ...'
  end
  # verify the required parameter 'pool_id' is set
  if @api_client.config.client_side_validation && pool_id.nil?
    fail ArgumentError, "Missing the required parameter 'pool_id' when calling PoolsApi.show_primary_scan"
  end
  # resource path
  local_var_path = '/pools/{pool_id}/primary_scan'.sub('{' + 'pool_id' + '}', CGI.escape(pool_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] || 'PrimaryScan' 

  # 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: PoolsApi#show_primary_scan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
sync_primary_pool(pool_id, tx, opts = {}) click to toggle source

Synchronize a primary after a scan (for internal use only). **API Key Scope**: pools / sync_primary @param pool_id [String] Numeric ID, or name of pool. @param tx [Integer] New transaction number. @param [Hash] opts the optional parameters @return [nil]

# File lib/nodeum_sdk/api/pools_api.rb, line 613
def sync_primary_pool(pool_id, tx, opts = {})
  sync_primary_pool_with_http_info(pool_id, tx, opts)
  nil
end
sync_primary_pool_with_http_info(pool_id, tx, opts = {}) click to toggle source

Synchronize a primary after a scan (for internal use only). **API Key Scope**: pools / sync_primary @param pool_id [String] Numeric ID, or name of pool. @param tx [Integer] New transaction number. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers

# File lib/nodeum_sdk/api/pools_api.rb, line 624
def sync_primary_pool_with_http_info(pool_id, tx, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PoolsApi.sync_primary_pool ...'
  end
  # verify the required parameter 'pool_id' is set
  if @api_client.config.client_side_validation && pool_id.nil?
    fail ArgumentError, "Missing the required parameter 'pool_id' when calling PoolsApi.sync_primary_pool"
  end
  # verify the required parameter 'tx' is set
  if @api_client.config.client_side_validation && tx.nil?
    fail ArgumentError, "Missing the required parameter 'tx' when calling PoolsApi.sync_primary_pool"
  end
  # resource path
  local_var_path = '/pools/{pool_id}/sync'.sub('{' + 'pool_id' + '}', CGI.escape(pool_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'tx'] = tx

  # 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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PoolsApi#sync_primary_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
unmount_pool(pool_id, opts = {}) click to toggle source

Unmount Pool. **API Key Scope**: pools / unmount @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [MountStatus]

# File lib/nodeum_sdk/api/pools_api.rb, line 679
def unmount_pool(pool_id, opts = {})
  data, _status_code, _headers = unmount_pool_with_http_info(pool_id, opts)
  data
end
unmount_pool_with_http_info(pool_id, opts = {}) click to toggle source

Unmount Pool. **API Key Scope**: pools / unmount @param pool_id [String] Numeric ID, or name of pool. @param [Hash] opts the optional parameters @return [Array<(MountStatus, Integer, Hash)>] MountStatus data, response status code and response headers

# File lib/nodeum_sdk/api/pools_api.rb, line 689
def unmount_pool_with_http_info(pool_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PoolsApi.unmount_pool ...'
  end
  # verify the required parameter 'pool_id' is set
  if @api_client.config.client_side_validation && pool_id.nil?
    fail ArgumentError, "Missing the required parameter 'pool_id' when calling PoolsApi.unmount_pool"
  end
  # resource path
  local_var_path = '/pools/{pool_id}/mount'.sub('{' + 'pool_id' + '}', CGI.escape(pool_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] || 'MountStatus' 

  # 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: PoolsApi#unmount_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_pool(pool_id, pool_body, opts = {}) click to toggle source

Updates a specific pool. **API Key Scope**: pools / update @param pool_id [String] Numeric ID, or name of pool. @param pool_body [PoolUp] @param [Hash] opts the optional parameters @return [Pool]

# File lib/nodeum_sdk/api/pools_api.rb, line 742
def update_pool(pool_id, pool_body, opts = {})
  data, _status_code, _headers = update_pool_with_http_info(pool_id, pool_body, opts)
  data
end
update_pool_with_http_info(pool_id, pool_body, opts = {}) click to toggle source

Updates a specific pool. **API Key Scope**: pools / update @param pool_id [String] Numeric ID, or name of pool. @param pool_body [PoolUp] @param [Hash] opts the optional parameters @return [Array<(Pool, Integer, Hash)>] Pool data, response status code and response headers

# File lib/nodeum_sdk/api/pools_api.rb, line 753
def update_pool_with_http_info(pool_id, pool_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PoolsApi.update_pool ...'
  end
  # verify the required parameter 'pool_id' is set
  if @api_client.config.client_side_validation && pool_id.nil?
    fail ArgumentError, "Missing the required parameter 'pool_id' when calling PoolsApi.update_pool"
  end
  # verify the required parameter 'pool_body' is set
  if @api_client.config.client_side_validation && pool_body.nil?
    fail ArgumentError, "Missing the required parameter 'pool_body' when calling PoolsApi.update_pool"
  end
  # resource path
  local_var_path = '/pools/{pool_id}'.sub('{' + 'pool_id' + '}', CGI.escape(pool_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(pool_body) 

  # return_type
  return_type = opts[:return_type] || 'Pool' 

  # 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: PoolsApi#update_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_primary_scan(pool_id, primary_scan_body, opts = {}) click to toggle source

Updates the existing primary pool scan option. **API Key Scope**: primary_scans / update @param pool_id [String] Numeric ID, or name of pool. @param primary_scan_body [PrimaryScan] @param [Hash] opts the optional parameters @return [PrimaryScan]

# File lib/nodeum_sdk/api/pools_api.rb, line 812
def update_primary_scan(pool_id, primary_scan_body, opts = {})
  data, _status_code, _headers = update_primary_scan_with_http_info(pool_id, primary_scan_body, opts)
  data
end
update_primary_scan_with_http_info(pool_id, primary_scan_body, opts = {}) click to toggle source

Updates the existing primary pool scan option. **API Key Scope**: primary_scans / update @param pool_id [String] Numeric ID, or name of pool. @param primary_scan_body [PrimaryScan] @param [Hash] opts the optional parameters @return [Array<(PrimaryScan, Integer, Hash)>] PrimaryScan data, response status code and response headers

# File lib/nodeum_sdk/api/pools_api.rb, line 823
def update_primary_scan_with_http_info(pool_id, primary_scan_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PoolsApi.update_primary_scan ...'
  end
  # verify the required parameter 'pool_id' is set
  if @api_client.config.client_side_validation && pool_id.nil?
    fail ArgumentError, "Missing the required parameter 'pool_id' when calling PoolsApi.update_primary_scan"
  end
  # verify the required parameter 'primary_scan_body' is set
  if @api_client.config.client_side_validation && primary_scan_body.nil?
    fail ArgumentError, "Missing the required parameter 'primary_scan_body' when calling PoolsApi.update_primary_scan"
  end
  # resource path
  local_var_path = '/pools/{pool_id}/primary_scan'.sub('{' + 'pool_id' + '}', CGI.escape(pool_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(primary_scan_body) 

  # return_type
  return_type = opts[:return_type] || 'PrimaryScan' 

  # 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: PoolsApi#update_primary_scan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end