class IbmCloudPower::PCloudStorageCapacityApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

pcloud_storagecapacity_pools_get(cloud_instance_id, storage_pool_name, opts = {}) click to toggle source

Storage capacity for a storage pool in a region @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param storage_pool_name [String] Storage pool name @param [Hash] opts the optional parameters @return [StoragePoolCapacity]

# File lib/ibm_cloud_power/api/p_cloud_storage_capacity_api.rb, line 27
def pcloud_storagecapacity_pools_get(cloud_instance_id, storage_pool_name, opts = {})
  data, _status_code, _headers = pcloud_storagecapacity_pools_get_with_http_info(cloud_instance_id, storage_pool_name, opts)
  data
end
pcloud_storagecapacity_pools_get_with_http_info(cloud_instance_id, storage_pool_name, opts = {}) click to toggle source

Storage capacity for a storage pool in a region @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param storage_pool_name [String] Storage pool name @param [Hash] opts the optional parameters @return [Array<(StoragePoolCapacity, Integer, Hash)>] StoragePoolCapacity data, response status code and response headers

# File lib/ibm_cloud_power/api/p_cloud_storage_capacity_api.rb, line 37
def pcloud_storagecapacity_pools_get_with_http_info(cloud_instance_id, storage_pool_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudStorageCapacityApi.pcloud_storagecapacity_pools_get ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudStorageCapacityApi.pcloud_storagecapacity_pools_get"
  end
  # verify the required parameter 'storage_pool_name' is set
  if @api_client.config.client_side_validation && storage_pool_name.nil?
    fail ArgumentError, "Missing the required parameter 'storage_pool_name' when calling PCloudStorageCapacityApi.pcloud_storagecapacity_pools_get"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'storage_pool_name' + '}', CGI.escape(storage_pool_name.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] || 'StoragePoolCapacity' 

  # auth_names
  auth_names = opts[:auth_names] || []

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

Storage capacity for all available storage pools in a region @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param [Hash] opts the optional parameters @return [StoragePoolsCapacity]

# File lib/ibm_cloud_power/api/p_cloud_storage_capacity_api.rb, line 92
def pcloud_storagecapacity_pools_getall(cloud_instance_id, opts = {})
  data, _status_code, _headers = pcloud_storagecapacity_pools_getall_with_http_info(cloud_instance_id, opts)
  data
end
pcloud_storagecapacity_pools_getall_with_http_info(cloud_instance_id, opts = {}) click to toggle source

Storage capacity for all available storage pools in a region @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param [Hash] opts the optional parameters @return [Array<(StoragePoolsCapacity, Integer, Hash)>] StoragePoolsCapacity data, response status code and response headers

# File lib/ibm_cloud_power/api/p_cloud_storage_capacity_api.rb, line 101
def pcloud_storagecapacity_pools_getall_with_http_info(cloud_instance_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudStorageCapacityApi.pcloud_storagecapacity_pools_getall ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudStorageCapacityApi.pcloud_storagecapacity_pools_getall"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_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] || 'StoragePoolsCapacity' 

  # auth_names
  auth_names = opts[:auth_names] || []

  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: PCloudStorageCapacityApi#pcloud_storagecapacity_pools_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
pcloud_storagecapacity_types_get(cloud_instance_id, storage_type_name, opts = {}) click to toggle source

Storage capacity for a storage type in a region @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param storage_type_name [String] Storage type name @param [Hash] opts the optional parameters @return [StorageTypeCapacity]

# File lib/ibm_cloud_power/api/p_cloud_storage_capacity_api.rb, line 153
def pcloud_storagecapacity_types_get(cloud_instance_id, storage_type_name, opts = {})
  data, _status_code, _headers = pcloud_storagecapacity_types_get_with_http_info(cloud_instance_id, storage_type_name, opts)
  data
end
pcloud_storagecapacity_types_get_with_http_info(cloud_instance_id, storage_type_name, opts = {}) click to toggle source

Storage capacity for a storage type in a region @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param storage_type_name [String] Storage type name @param [Hash] opts the optional parameters @return [Array<(StorageTypeCapacity, Integer, Hash)>] StorageTypeCapacity data, response status code and response headers

# File lib/ibm_cloud_power/api/p_cloud_storage_capacity_api.rb, line 163
def pcloud_storagecapacity_types_get_with_http_info(cloud_instance_id, storage_type_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudStorageCapacityApi.pcloud_storagecapacity_types_get ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudStorageCapacityApi.pcloud_storagecapacity_types_get"
  end
  # verify the required parameter 'storage_type_name' is set
  if @api_client.config.client_side_validation && storage_type_name.nil?
    fail ArgumentError, "Missing the required parameter 'storage_type_name' when calling PCloudStorageCapacityApi.pcloud_storagecapacity_types_get"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'storage_type_name' + '}', CGI.escape(storage_type_name.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] || 'StorageTypeCapacity' 

  # auth_names
  auth_names = opts[:auth_names] || []

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

Storage capacity for all available storage types in a region @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param [Hash] opts the optional parameters @return [StorageTypesCapacity]

# File lib/ibm_cloud_power/api/p_cloud_storage_capacity_api.rb, line 218
def pcloud_storagecapacity_types_getall(cloud_instance_id, opts = {})
  data, _status_code, _headers = pcloud_storagecapacity_types_getall_with_http_info(cloud_instance_id, opts)
  data
end
pcloud_storagecapacity_types_getall_with_http_info(cloud_instance_id, opts = {}) click to toggle source

Storage capacity for all available storage types in a region @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance @param [Hash] opts the optional parameters @return [Array<(StorageTypesCapacity, Integer, Hash)>] StorageTypesCapacity data, response status code and response headers

# File lib/ibm_cloud_power/api/p_cloud_storage_capacity_api.rb, line 227
def pcloud_storagecapacity_types_getall_with_http_info(cloud_instance_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudStorageCapacityApi.pcloud_storagecapacity_types_getall ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudStorageCapacityApi.pcloud_storagecapacity_types_getall"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_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] || 'StorageTypesCapacity' 

  # auth_names
  auth_names = opts[:auth_names] || []

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