class LinstorClient::DevelopersApi
Attributes
Public Class Methods
# File lib/ruby-linstor-client/api/developers_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Deletes a controller property Delete a controller property @param key [String] @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 27 def controller_property_delete(key, opts = {}) data, _status_code, _headers = controller_property_delete_with_http_info(key, opts) data end
Deletes a controller property Delete a controller property @param key [String] @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 37 def controller_property_delete_with_http_info(key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.controller_property_delete ...' end # verify the required parameter 'key' is set if @api_client.config.client_side_validation && key.nil? fail ArgumentError, "Missing the required parameter 'key' when calling DevelopersApi.controller_property_delete" end # resource path local_var_path = '/v1/controller/properties/{key}'.sub('{' + 'key' + '}', CGI.escape(key.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.controller_property_delete", :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: DevelopersApi#controller_property_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists all controller properties Lists all controller properties. @param [Hash] opts the optional parameters @return [Hash<String, String>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 89 def controller_property_list(opts = {}) data, _status_code, _headers = controller_property_list_with_http_info(opts) data end
lists all controller properties Lists all controller properties. @param [Hash] opts the optional parameters @return [Array<(Hash<String, String>, Integer, Hash)>] Hash<String, String> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 98 def controller_property_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.controller_property_list ...' end # resource path local_var_path = '/v1/controller/properties' # 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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, String>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.controller_property_list", :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: DevelopersApi#controller_property_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
sets or modifies controller properties Sets or modifies properties Possible properties are: - ‘TcpPortAutoRange` - regex[`-[0-9]
`] Range for auto-allocation of resource TCP ports - `MinorNrAutoRange` - regex[`-[0-9]
`] Range for auto-allocation of volume minor numbers - `PeerSlotsNewResource` - range DRBD peer slots to allocate for newly created resources (default 7), the number of peer slots cannot be changed once the resource is created, so allow sufficient slots to increase redundancy in the future - `StorDriver/DMStats` - boolean_true_false Enable dmstats on lvm create - `GlobSeqApiCalls` - boolean_true_false Globally sequentialize all ctrl -> stlt api calls - `REST/bindAddress` - string Bind address of the REST API - `REST/port` - range TCP Port of the REST API - `REST/enabled` - boolean_true_false Bool if REST API should be enabled - `NVMe/enabled` - enum * rdma * tcp - `NVMe/enabled` - range - `NVMe/PrefNic` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Preferred network interface to use - `StorDriver/WaitTimeoutAfterCreate` - regex[`+`] - `sys/fs/blkio_throttle_read` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - `sys/fs/blkio_throttle_write` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device - `SearchDomain` - string Search domain node names, if no FQDN is given. - `ExtCmdWaitTimeout` - long Wait timeout for an external command in milliseconds - `DrbdOptions/auto-quorum` - enum Enables automatic setting of the ’quroum’ and ‘on-no-quroum’ property * io-error * suspend-io * disabled - ‘DrbdOptions/auto-add-quorum-tiebreaker` - boolean_true_false Enables automatic management (creation and deletion) of tie breaking resource - `Writecache/PoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name for writecache - `Writecache/Size` - regex[`^100%|{1,2}([.][0-9]*)?%|[0-9]{2,}$`] Size of the writecache in % (0-100) or KiB otherwise - `Writecache/Blocksize` - long 4096 is recommended; the maximum block size is the page size - `Writecache/Options/StartSector` - long offset from the start of cache device in 512-byte sectors - `Writecache/Options/HighWatermark` - long start writeback when the number of used blocks reach this watermark - `Writecache/Options/LowWatermark` - long stop writeback when the number of used blocks drops below this watermark - `Writecache/Options/WritebackJobs` - long limit the number of blocks that are in flight during writeback. Setting this value reduces writeback throughput, but it may improve latency of read requests - `Writecache/Options/AutocommitBlocks` - long when the application writes this amount of blocks without issuing the FLUSH request, the blocks are automatically commited - `Writecache/Options/AutocommitTime` - long autocommit time in milliseconds. The data is automatically commited if this time passes and no FLUSH request is received - `Writecache/Options/Fua` - enum "On" results in "fua" as argument, whereas the value "Off" results in "nofua" argument * On * Off - `Writecache/Options/Additional` - string Additional arguments passed through - `DrbdOptions/Disk/read-balancing` - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - `DrbdOptions/Disk/on-io-error` - enum * pass_on * call-local-io-error * detach - `DrbdOptions/Disk/disk-drain` - boolean - `DrbdOptions/Disk/resync-after` - string - `DrbdOptions/Disk/disk-timeout` - range - `DrbdOptions/Disk/disable-write-same` - boolean - `DrbdOptions/Disk/rs-discard-granularity` - range - `DrbdOptions/Disk/disk-flushes` - boolean - `DrbdOptions/Disk/al-extents` - range - `DrbdOptions/Disk/al-updates` - boolean - `DrbdOptions/Disk/md-flushes` - boolean - `DrbdOptions/Disk/disk-barrier` - boolean - `DrbdOptions/Disk/discard-zeroes-if-aligned` - boolean - `DrbdOptions/PeerDevice/c-fill-target` - range - `DrbdOptions/PeerDevice/c-max-rate` - range - `DrbdOptions/PeerDevice/resync-rate` - range - `DrbdOptions/PeerDevice/c-delay-target` - range - `DrbdOptions/PeerDevice/c-min-rate` - range - `DrbdOptions/PeerDevice/bitmap` - boolean - `DrbdOptions/PeerDevice/c-plan-ahead` - range - `DrbdOptions/Resource/peer-ack-delay` - range - `DrbdOptions/Resource/quorum-minimum-redundancy` - enum [`1-32`] * off * majority * all - `DrbdOptions/Resource/max-io-depth` - range - `DrbdOptions/Resource/auto-promote-timeout` - range - `DrbdOptions/Resource/quorum` - enum [`1-32`] * off * majority * all - `DrbdOptions/Resource/on-no-data-accessible` - enum * io-error * suspend-io - `DrbdOptions/Resource/auto-promote` - boolean - `DrbdOptions/Resource/cpu-mask` - string - `DrbdOptions/Resource/twopc-timeout` - range - `DrbdOptions/Resource/twopc-retry-timeout` - range - `DrbdOptions/Resource/peer-ack-window` - range - `DrbdOptions/Resource/on-no-quorum` - enum * io-error * suspend-io - `DrbdOptions/Net/max-epoch-size` - range - `DrbdOptions/Net/protocol` - enum * A * B * C - `DrbdOptions/Net/allow-two-primaries` - boolean - `DrbdOptions/Net/after-sb-0pri` - enum * disconnect * discard-younger-primary * discard-older-primary * discard-zero-changes * discard-least-changes * discard-local * discard-remote - `DrbdOptions/Net/ko-count` - range - `DrbdOptions/Net/data-integrity-alg` - string - `DrbdOptions/Net/ping-timeout` - range - `DrbdOptions/Net/sndbuf-size` - range - `DrbdOptions/Net/transport` - string - `DrbdOptions/Net/rcvbuf-size` - range - `DrbdOptions/Net/max-buffers` - range - `DrbdOptions/Net/fencing` - enum * dont-care * resource-only * resource-and-stonith - `DrbdOptions/Net/csums-alg` - string - `DrbdOptions/Net/always-asbp` - boolean - `DrbdOptions/Net/congestion-extents` - range - `DrbdOptions/Net/on-congestion` - enum * block * pull-ahead * disconnect - `DrbdOptions/Net/ping-int` - range - `DrbdOptions/Net/rr-conflict` - enum * disconnect * call-pri-lost * violently - `DrbdOptions/Net/tcp-cork` - boolean - `DrbdOptions/Net/use-rle` - boolean - `DrbdOptions/Net/csums-after-crash-only` - boolean - `DrbdOptions/Net/socket-check-timeout` - range - `DrbdOptions/Net/congestion-fill` - range - `DrbdOptions/Net/cram-hmac-alg` - string - `DrbdOptions/Net/verify-alg` - string - `DrbdOptions/Net/shared-secret` - string - `DrbdOptions/Net/connect-int` - range - `DrbdOptions/Net/timeout` - range - `DrbdOptions/Net/after-sb-2pri` - enum * disconnect * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Net/after-sb-1pri` - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Handlers/after-resync-target` - string - `DrbdOptions/Handlers/before-resync-target` - string - `DrbdOptions/Handlers/before-resync-source` - string - `DrbdOptions/Handlers/out-of-sync` - string - `DrbdOptions/Handlers/quorum-lost` - string - `DrbdOptions/Handlers/fence-peer` - string - `DrbdOptions/Handlers/unfence-peer` - string - `DrbdOptions/Handlers/initial-split-brain` - string - `DrbdOptions/Handlers/local-io-error` - string - `DrbdOptions/Handlers/pri-lost` - string - `DrbdOptions/Handlers/pri-lost-after-sb` - string - `DrbdOptions/Handlers/pri-on-incon-degr` - string - `DrbdOptions/Handlers/split-brain` - string @param [Hash] opts the optional parameters @option opts [ControllerPropsModify] :controller_props_modify @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 147 def controller_property_modify(opts = {}) data, _status_code, _headers = controller_property_modify_with_http_info(opts) data end
sets or modifies controller properties Sets or modifies properties Possible properties are: - `TcpPortAutoRange` - regex[`-[0-9]
`] Range for auto-allocation of resource TCP ports - `MinorNrAutoRange` - regex[`-[0-9]
`] Range for auto-allocation of volume minor numbers - `PeerSlotsNewResource` - range DRBD peer slots to allocate for newly created resources (default 7), the number of peer slots cannot be changed once the resource is created, so allow sufficient slots to increase redundancy in the future - `StorDriver/DMStats` - boolean_true_false Enable dmstats on lvm create - `GlobSeqApiCalls` - boolean_true_false Globally sequentialize all ctrl -> stlt api calls - `REST/bindAddress` - string Bind address of the REST API - `REST/port` - range TCP Port of the REST API - `REST/enabled` - boolean_true_false Bool if REST API should be enabled - `NVMe/enabled` - enum * rdma * tcp - `NVMe/enabled` - range - `NVMe/PrefNic` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Preferred network interface to use - `StorDriver/WaitTimeoutAfterCreate` - regex[`+`] - `sys/fs/blkio_throttle_read` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - `sys/fs/blkio_throttle_write` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device - `SearchDomain` - string Search domain node names, if no FQDN is given. - `ExtCmdWaitTimeout` - long Wait timeout for an external command in milliseconds - `DrbdOptions/auto-quorum` - enum Enables automatic setting of the 'quroum' and 'on-no-quroum' property * io-error * suspend-io * disabled - `DrbdOptions/auto-add-quorum-tiebreaker` - boolean_true_false Enables automatic management (creation and deletion) of tie breaking resource - `Writecache/PoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name for writecache - `Writecache/Size` - regex[`^100%|{1,2}([.][0-9]*)?%|[0-9]{2,}$`] Size of the writecache in % (0-100) or KiB otherwise - `Writecache/Blocksize` - long 4096 is recommended; the maximum block size is the page size - `Writecache/Options/StartSector` - long offset from the start of cache device in 512-byte sectors - `Writecache/Options/HighWatermark` - long start writeback when the number of used blocks reach this watermark - `Writecache/Options/LowWatermark` - long stop writeback when the number of used blocks drops below this watermark - `Writecache/Options/WritebackJobs` - long limit the number of blocks that are in flight during writeback. Setting this value reduces writeback throughput, but it may improve latency of read requests - `Writecache/Options/AutocommitBlocks` - long when the application writes this amount of blocks without issuing the FLUSH request, the blocks are automatically commited - `Writecache/Options/AutocommitTime` - long autocommit time in milliseconds. The data is automatically commited if this time passes and no FLUSH request is received - `Writecache/Options/Fua` - enum "On" results in "fua" as argument, whereas the value "Off" results in "nofua" argument * On * Off - `Writecache/Options/Additional` - string Additional arguments passed through - `DrbdOptions/Disk/read-balancing` - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - `DrbdOptions/Disk/on-io-error` - enum * pass_on * call-local-io-error * detach - `DrbdOptions/Disk/disk-drain` - boolean - `DrbdOptions/Disk/resync-after` - string - `DrbdOptions/Disk/disk-timeout` - range - `DrbdOptions/Disk/disable-write-same` - boolean - `DrbdOptions/Disk/rs-discard-granularity` - range - `DrbdOptions/Disk/disk-flushes` - boolean - `DrbdOptions/Disk/al-extents` - range - `DrbdOptions/Disk/al-updates` - boolean - `DrbdOptions/Disk/md-flushes` - boolean - `DrbdOptions/Disk/disk-barrier` - boolean - `DrbdOptions/Disk/discard-zeroes-if-aligned` - boolean - `DrbdOptions/PeerDevice/c-fill-target` - range - `DrbdOptions/PeerDevice/c-max-rate` - range - `DrbdOptions/PeerDevice/resync-rate` - range - `DrbdOptions/PeerDevice/c-delay-target` - range - `DrbdOptions/PeerDevice/c-min-rate` - range - `DrbdOptions/PeerDevice/bitmap` - boolean - `DrbdOptions/PeerDevice/c-plan-ahead` - range - `DrbdOptions/Resource/peer-ack-delay` - range - `DrbdOptions/Resource/quorum-minimum-redundancy` - enum [`1-32`] * off * majority * all - `DrbdOptions/Resource/max-io-depth` - range - `DrbdOptions/Resource/auto-promote-timeout` - range - `DrbdOptions/Resource/quorum` - enum [`1-32`] * off * majority * all - `DrbdOptions/Resource/on-no-data-accessible` - enum * io-error * suspend-io - `DrbdOptions/Resource/auto-promote` - boolean - `DrbdOptions/Resource/cpu-mask` - string - `DrbdOptions/Resource/twopc-timeout` - range - `DrbdOptions/Resource/twopc-retry-timeout` - range - `DrbdOptions/Resource/peer-ack-window` - range - `DrbdOptions/Resource/on-no-quorum` - enum * io-error * suspend-io - `DrbdOptions/Net/max-epoch-size` - range - `DrbdOptions/Net/protocol` - enum * A * B * C - `DrbdOptions/Net/allow-two-primaries` - boolean - `DrbdOptions/Net/after-sb-0pri` - enum * disconnect * discard-younger-primary * discard-older-primary * discard-zero-changes * discard-least-changes * discard-local * discard-remote - `DrbdOptions/Net/ko-count` - range - `DrbdOptions/Net/data-integrity-alg` - string - `DrbdOptions/Net/ping-timeout` - range - `DrbdOptions/Net/sndbuf-size` - range - `DrbdOptions/Net/transport` - string - `DrbdOptions/Net/rcvbuf-size` - range - `DrbdOptions/Net/max-buffers` - range - `DrbdOptions/Net/fencing` - enum * dont-care * resource-only * resource-and-stonith - `DrbdOptions/Net/csums-alg` - string - `DrbdOptions/Net/always-asbp` - boolean - `DrbdOptions/Net/congestion-extents` - range - `DrbdOptions/Net/on-congestion` - enum * block * pull-ahead * disconnect - `DrbdOptions/Net/ping-int` - range - `DrbdOptions/Net/rr-conflict` - enum * disconnect * call-pri-lost * violently - `DrbdOptions/Net/tcp-cork` - boolean - `DrbdOptions/Net/use-rle` - boolean - `DrbdOptions/Net/csums-after-crash-only` - boolean - `DrbdOptions/Net/socket-check-timeout` - range - `DrbdOptions/Net/congestion-fill` - range - `DrbdOptions/Net/cram-hmac-alg` - string - `DrbdOptions/Net/verify-alg` - string - `DrbdOptions/Net/shared-secret` - string - `DrbdOptions/Net/connect-int` - range - `DrbdOptions/Net/timeout` - range - `DrbdOptions/Net/after-sb-2pri` - enum * disconnect * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Net/after-sb-1pri` - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Handlers/after-resync-target` - string - `DrbdOptions/Handlers/before-resync-target` - string - `DrbdOptions/Handlers/before-resync-source` - string - `DrbdOptions/Handlers/out-of-sync` - string - `DrbdOptions/Handlers/quorum-lost` - string - `DrbdOptions/Handlers/fence-peer` - string - `DrbdOptions/Handlers/unfence-peer` - string - `DrbdOptions/Handlers/initial-split-brain` - string - `DrbdOptions/Handlers/local-io-error` - string - `DrbdOptions/Handlers/pri-lost` - string - `DrbdOptions/Handlers/pri-lost-after-sb` - string - `DrbdOptions/Handlers/pri-on-incon-degr` - string - `DrbdOptions/Handlers/split-brain` - string @param [Hash] opts the optional parameters @option opts [ControllerPropsModify] :controller_props_modify @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 157 def controller_property_modify_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.controller_property_modify ...' end # resource path local_var_path = '/v1/controller/properties' # 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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'controller_props_modify']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.controller_property_modify", :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: DevelopersApi#controller_property_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
show controller version info Show Controller version info @param [Hash] opts the optional parameters @return [ControllerVersion]
# File lib/ruby-linstor-client/api/developers_api.rb, line 210 def controller_version(opts = {}) data, _status_code, _headers = controller_version_with_http_info(opts) data end
show controller version info Show Controller version info @param [Hash] opts the optional parameters @return [Array<(ControllerVersion
, Integer, Hash)>] ControllerVersion
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 219 def controller_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.controller_version ...' end # resource path local_var_path = '/v1/controller/version' # 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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ControllerVersion' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.controller_version", :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: DevelopersApi#controller_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
creates an LVM, LVM-thin or ZFS pool, optional VDO under it Creates a LVM/LVM-thin, ZFS pool on the given device and if supported VDO(optional) under it. logcal_size_kib parameter is only needed if LVM-thin or vdo is used is used. Also note VDO can only used with LVM-fat. @param node [String] node to use @param [Hash] opts the optional parameters @option opts [PhysicalStorageCreate] :physical_storage_create @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 269 def create_device_pool(node, opts = {}) data, _status_code, _headers = create_device_pool_with_http_info(node, opts) data end
creates an LVM, LVM-thin or ZFS pool, optional VDO under it Creates a LVM/LVM-thin, ZFS pool on the given device and if supported VDO(optional) under it. logcal_size_kib parameter is only needed if LVM-thin or vdo is used is used. Also note VDO can only used with LVM-fat. @param node [String] node to use @param [Hash] opts the optional parameters @option opts [PhysicalStorageCreate] :physical_storage_create @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 280 def create_device_pool_with_http_info(node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.create_device_pool ...' end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.create_device_pool" end # resource path local_var_path = '/v1/physical-storage/{node}'.sub('{' + 'node' + '}', CGI.escape(node.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'physical_storage_create']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.create_device_pool", :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: DevelopersApi#create_device_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
create a encryption passphrase @param [Hash] opts the optional parameters @option opts [PassPhraseCreate] :pass_phrase_create @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 337 def encryption_passphrase_create(opts = {}) data, _status_code, _headers = encryption_passphrase_create_with_http_info(opts) data end
create a encryption passphrase @param [Hash] opts the optional parameters @option opts [PassPhraseCreate] :pass_phrase_create @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 346 def encryption_passphrase_create_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.encryption_passphrase_create ...' end # resource path local_var_path = '/v1/encryption/passphrase' # 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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'pass_phrase_create']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.encryption_passphrase_create", :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: DevelopersApi#encryption_passphrase_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
enter the encryption passphrase @param [Hash] opts the optional parameters @option opts [String] :body @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 399 def encryption_passphrase_enter(opts = {}) data, _status_code, _headers = encryption_passphrase_enter_with_http_info(opts) data end
enter the encryption passphrase @param [Hash] opts the optional parameters @option opts [String] :body @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 408 def encryption_passphrase_enter_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.encryption_passphrase_enter ...' end # resource path local_var_path = '/v1/encryption/passphrase' # 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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.encryption_passphrase_enter", :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(:PATCH, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DevelopersApi#encryption_passphrase_enter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modifies the encryption passphrase @param [Hash] opts the optional parameters @option opts [PassPhraseCreate] :pass_phrase_create @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 461 def encryption_passphrase_modify(opts = {}) data, _status_code, _headers = encryption_passphrase_modify_with_http_info(opts) data end
modifies the encryption passphrase @param [Hash] opts the optional parameters @option opts [PassPhraseCreate] :pass_phrase_create @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 470 def encryption_passphrase_modify_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.encryption_passphrase_modify ...' end # resource path local_var_path = '/v1/encryption/passphrase' # 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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'pass_phrase_create']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.encryption_passphrase_modify", :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: DevelopersApi#encryption_passphrase_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
list all error reports List all error reports @param [Hash] opts the optional parameters @option opts [String] :node Only show error reports of this node @option opts [Integer] :since Unix timestamp from the starting interval @option opts [Integer] :to Unix timestamp to the ending interval @option opts [Boolean] :with_content Include error report text in response. (default to false) @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<ErrorReport>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 529 def error_report_list(opts = {}) data, _status_code, _headers = error_report_list_with_http_info(opts) data end
list all error reports List all error reports @param [Hash] opts the optional parameters @option opts [String] :node Only show error reports of this node @option opts [Integer] :since Unix timestamp from the starting interval @option opts [Integer] :to Unix timestamp to the ending interval @option opts [Boolean] :with_content Include error report text in response. @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<ErrorReport>, Integer, Hash)>] Array<ErrorReport> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 544 def error_report_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.error_report_list ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.error_report_list, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.error_report_list, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.error_report_list, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/error-reports' # query parameters query_params = opts[:query_params] || {} query_params[:'node'] = opts[:'node'] if !opts[:'node'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? query_params[:'withContent'] = opts[:'with_content'] if !opts[:'with_content'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ErrorReport>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.error_report_list", :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: DevelopersApi#error_report_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
query the specified reportid Query the specified reportid @param reportid [String] Error id to select @param [Hash] opts the optional parameters @option opts [String] :node Only show error reports of this node @option opts [Integer] :since Unix timestamp from the starting interval @option opts [Integer] :to Unix timestamp to the ending interval @option opts [Boolean] :with_content Include error report text in response. (default to true) @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<ErrorReport>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 617 def error_report_show(reportid, opts = {}) data, _status_code, _headers = error_report_show_with_http_info(reportid, opts) data end
query the specified reportid Query the specified reportid @param reportid [String] Error id to select @param [Hash] opts the optional parameters @option opts [String] :node Only show error reports of this node @option opts [Integer] :since Unix timestamp from the starting interval @option opts [Integer] :to Unix timestamp to the ending interval @option opts [Boolean] :with_content Include error report text in response. @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<ErrorReport>, Integer, Hash)>] Array<ErrorReport> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 633 def error_report_show_with_http_info(reportid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.error_report_show ...' end # verify the required parameter 'reportid' is set if @api_client.config.client_side_validation && reportid.nil? fail ArgumentError, "Missing the required parameter 'reportid' when calling DevelopersApi.error_report_show" end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.error_report_show, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.error_report_show, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.error_report_show, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/error-reports/{reportid}'.sub('{' + 'reportid' + '}', CGI.escape(reportid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'node'] = opts[:'node'] if !opts[:'node'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? query_params[:'withContent'] = opts[:'with_content'] if !opts[:'with_content'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ErrorReport>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.error_report_show", :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: DevelopersApi#error_report_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
delete a key value store Delete a key value store @param instance [String] @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 704 def key_value_store_delete(instance, opts = {}) data, _status_code, _headers = key_value_store_delete_with_http_info(instance, opts) data end
delete a key value store Delete a key value store @param instance [String] @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 714 def key_value_store_delete_with_http_info(instance, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.key_value_store_delete ...' end # verify the required parameter 'instance' is set if @api_client.config.client_side_validation && instance.nil? fail ArgumentError, "Missing the required parameter 'instance' when calling DevelopersApi.key_value_store_delete" end # resource path local_var_path = '/v1/key-value-store/{instance}'.sub('{' + 'instance' + '}', CGI.escape(instance.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.key_value_store_delete", :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: DevelopersApi#key_value_store_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
list all key value stores List all known key value store instances @param instance [String] @param [Hash] opts the optional parameters @return [Array<KeyValueStore>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 767 def key_value_store_list(instance, opts = {}) data, _status_code, _headers = key_value_store_list_with_http_info(instance, opts) data end
list all key value stores List all known key value store instances @param instance [String] @param [Hash] opts the optional parameters @return [Array<(Array<KeyValueStore>, Integer, Hash)>] Array<KeyValueStore> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 777 def key_value_store_list_with_http_info(instance, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.key_value_store_list ...' end # verify the required parameter 'instance' is set if @api_client.config.client_side_validation && instance.nil? fail ArgumentError, "Missing the required parameter 'instance' when calling DevelopersApi.key_value_store_list" end # resource path local_var_path = '/v1/key-value-store/{instance}'.sub('{' + 'instance' + '}', CGI.escape(instance.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<KeyValueStore>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.key_value_store_list", :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: DevelopersApi#key_value_store_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modify a key value store Modify a key value store @param instance [String] @param [Hash] opts the optional parameters @option opts [KeyValueStoreModify] :key_value_store_modify @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 831 def key_value_store_modify(instance, opts = {}) data, _status_code, _headers = key_value_store_modify_with_http_info(instance, opts) data end
modify a key value store Modify a key value store @param instance [String] @param [Hash] opts the optional parameters @option opts [KeyValueStoreModify] :key_value_store_modify @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 842 def key_value_store_modify_with_http_info(instance, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.key_value_store_modify ...' end # verify the required parameter 'instance' is set if @api_client.config.client_side_validation && instance.nil? fail ArgumentError, "Missing the required parameter 'instance' when calling DevelopersApi.key_value_store_modify" end # resource path local_var_path = '/v1/key-value-store/{instance}'.sub('{' + 'instance' + '}', CGI.escape(instance.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'key_value_store_modify']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.key_value_store_modify", :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: DevelopersApi#key_value_store_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
list all key value stores List all known key value store instances @param [Hash] opts the optional parameters @return [Array<KeyValueStore>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 899 def key_value_stores_list(opts = {}) data, _status_code, _headers = key_value_stores_list_with_http_info(opts) data end
list all key value stores List all known key value store instances @param [Hash] opts the optional parameters @return [Array<(Array<KeyValueStore>, Integer, Hash)>] Array<KeyValueStore> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 908 def key_value_stores_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.key_value_stores_list ...' end # resource path local_var_path = '/v1/key-value-store' # 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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<KeyValueStore>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.key_value_stores_list", :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: DevelopersApi#key_value_stores_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
create a netinterface on a node Create a netinterface on a node If satellite_port and satellite_encryption_type are given the netinterface can also work as connection to the controller @param node [String] node to use @param [Hash] opts the optional parameters @option opts [NetInterface] :net_interface @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 958 def netinterface_create(node, opts = {}) data, _status_code, _headers = netinterface_create_with_http_info(node, opts) data end
create a netinterface on a node Create a netinterface on a node If satellite_port and satellite_encryption_type are given the netinterface can also work as connection to the controller @param node [String] node to use @param [Hash] opts the optional parameters @option opts [NetInterface] :net_interface @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 969 def netinterface_create_with_http_info(node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.netinterface_create ...' end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.netinterface_create" end # resource path local_var_path = '/v1/nodes/{node}/net-interfaces'.sub('{' + 'node' + '}', CGI.escape(node.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'net_interface']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.netinterface_create", :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: DevelopersApi#netinterface_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
delete a netinterface from a node Delete a netinterface from a node @param node [String] node to use @param netinterface [String] netinterface name to use @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1028 def netinterface_delete(node, netinterface, opts = {}) data, _status_code, _headers = netinterface_delete_with_http_info(node, netinterface, opts) data end
delete a netinterface from a node Delete a netinterface from a node @param node [String] node to use @param netinterface [String] netinterface name to use @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1039 def netinterface_delete_with_http_info(node, netinterface, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.netinterface_delete ...' end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.netinterface_delete" end # verify the required parameter 'netinterface' is set if @api_client.config.client_side_validation && netinterface.nil? fail ArgumentError, "Missing the required parameter 'netinterface' when calling DevelopersApi.netinterface_delete" end # resource path local_var_path = '/v1/nodes/{node}/net-interfaces/{netinterface}'.sub('{' + 'node' + '}', CGI.escape(node.to_s)).sub('{' + 'netinterface' + '}', CGI.escape(netinterface.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.netinterface_delete", :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: DevelopersApi#netinterface_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
return the list of net-interfaces Returns the list of netinterfaces for this node @param node [String] node to use @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<NetInterface>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1098 def netinterface_list(node, opts = {}) data, _status_code, _headers = netinterface_list_with_http_info(node, opts) data end
return the list of net-interfaces Returns the list of netinterfaces for this node @param node [String] node to use @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<NetInterface>, Integer, Hash)>] Array<NetInterface> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1110 def netinterface_list_with_http_info(node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.netinterface_list ...' end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.netinterface_list" end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.netinterface_list, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.netinterface_list, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.netinterface_list, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/nodes/{node}/net-interfaces'.sub('{' + 'node' + '}', CGI.escape(node.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<NetInterface>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.netinterface_list", :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: DevelopersApi#netinterface_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modify a netinterface from a node Modify a netinterface from a node @param node [String] node to use @param netinterface [String] netinterface name to use @param [Hash] opts the optional parameters @option opts [NetInterface] :net_interface @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1179 def netinterface_modified(node, netinterface, opts = {}) data, _status_code, _headers = netinterface_modified_with_http_info(node, netinterface, opts) data end
modify a netinterface from a node Modify a netinterface from a node @param node [String] node to use @param netinterface [String] netinterface name to use @param [Hash] opts the optional parameters @option opts [NetInterface] :net_interface @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1191 def netinterface_modified_with_http_info(node, netinterface, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.netinterface_modified ...' end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.netinterface_modified" end # verify the required parameter 'netinterface' is set if @api_client.config.client_side_validation && netinterface.nil? fail ArgumentError, "Missing the required parameter 'netinterface' when calling DevelopersApi.netinterface_modified" end # resource path local_var_path = '/v1/nodes/{node}/net-interfaces/{netinterface}'.sub('{' + 'node' + '}', CGI.escape(node.to_s)).sub('{' + 'netinterface' + '}', CGI.escape(netinterface.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'net_interface']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.netinterface_modified", :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: DevelopersApi#netinterface_modified\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
add a node to Linstor Adds a node to Linstor If only one net-interface is specified and it is does not specify a ‘satellite_port` it will apply the default port and `satellite_encryption_type` for this net-interface. @param [Hash] opts the optional parameters @option opts [Node] :node Node
to add to Linstor @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1253 def node_add(opts = {}) data, _status_code, _headers = node_add_with_http_info(opts) data end
add a node to Linstor Adds a node to Linstor If only one net-interface is specified and it is does not specify a `satellite_port` it will apply the default port and `satellite_encryption_type` for this net-interface. @param [Hash] opts the optional parameters @option opts [Node] :node Node
to add to Linstor @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1263 def node_add_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.node_add ...' end # resource path local_var_path = '/v1/nodes' # 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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'node']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.node_add", :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: DevelopersApi#node_add\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
delete a node Delete a node from Linstor @param node [String] node to use @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1317 def node_delete(node, opts = {}) data, _status_code, _headers = node_delete_with_http_info(node, opts) data end
delete a node Delete a node from Linstor @param node [String] node to use @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1327 def node_delete_with_http_info(node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.node_delete ...' end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.node_delete" end # resource path local_var_path = '/v1/nodes/{node}'.sub('{' + 'node' + '}', CGI.escape(node.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.node_delete", :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: DevelopersApi#node_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Lists nodes registered to the controller Returns an array of all nodes registered to Linstor. @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<Node>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1381 def node_list(opts = {}) data, _status_code, _headers = node_list_with_http_info(opts) data end
Lists nodes registered to the controller Returns an array of all nodes registered to Linstor. @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<Node>, Integer, Hash)>] Array<Node> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1392 def node_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.node_list ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.node_list, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.node_list, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.node_list, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/nodes' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Node>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.node_list", :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: DevelopersApi#node_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
delete an unrecoverable node Delete an unrecoverable node @param node [String] node to use @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1455 def node_lost(node, opts = {}) data, _status_code, _headers = node_lost_with_http_info(node, opts) data end
delete an unrecoverable node Delete an unrecoverable node @param node [String] node to use @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1465 def node_lost_with_http_info(node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.node_lost ...' end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.node_lost" end # resource path local_var_path = '/v1/nodes/{node}/lost'.sub('{' + 'node' + '}', CGI.escape(node.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.node_lost", :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: DevelopersApi#node_lost\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modify a node Sets or modifies properties Possible properties are: - ‘PrefNic` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Preferred network interface to use - `StorPoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `StorPoolNameDrbdMeta` - regex[`^|.internal|[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `DrbdMetaType` - enum * external * internal - `sys/fs/blkio_throttle_read` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - `sys/fs/blkio_throttle_write` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device - `Writecache/PoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name for writecache - `Writecache/Size` - regex[`^100%|{1,2}([.][0-9]*)?%|[0-9]{2,}$`] Size of the writecache in % (0-100) or KiB otherwise - `Writecache/Blocksize` - long 4096 is recommended; the maximum block size is the page size - `Writecache/Options/StartSector` - long offset from the start of cache device in 512-byte sectors - `Writecache/Options/HighWatermark` - long start writeback when the number of used blocks reach this watermark - `Writecache/Options/LowWatermark` - long stop writeback when the number of used blocks drops below this watermark - `Writecache/Options/WritebackJobs` - long limit the number of blocks that are in flight during writeback. Setting this value reduces writeback throughput, but it may improve latency of read requests - `Writecache/Options/AutocommitBlocks` - long when the application writes this amount of blocks without issuing the FLUSH request, the blocks are automatically commited - `Writecache/Options/AutocommitTime` - long autocommit time in milliseconds. The data is automatically commited if this time passes and no FLUSH request is received - `Writecache/Options/Fua` - enum "On" results in "fua" as argument, whereas the value "Off" results in "nofua" argument * On * Off - `Writecache/Options/Additional` - string Additional arguments passed through
@param node [String] node to use @param [Hash] opts the optional parameters @option opts [NodeModify] :node_modify @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1519 def node_modify(node, opts = {}) data, _status_code, _headers = node_modify_with_http_info(node, opts) data end
modify a node Sets or modifies properties Possible properties are: - `PrefNic` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Preferred network interface to use - `StorPoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `StorPoolNameDrbdMeta` - regex[`^|.internal|[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `DrbdMetaType` - enum * external * internal - `sys/fs/blkio_throttle_read` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - `sys/fs/blkio_throttle_write` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device - `Writecache/PoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name for writecache - `Writecache/Size` - regex[`^100%|{1,2}([.][0-9]*)?%|[0-9]{2,}$`] Size of the writecache in % (0-100) or KiB otherwise - `Writecache/Blocksize` - long 4096 is recommended; the maximum block size is the page size - `Writecache/Options/StartSector` - long offset from the start of cache device in 512-byte sectors - `Writecache/Options/HighWatermark` - long start writeback when the number of used blocks reach this watermark - `Writecache/Options/LowWatermark` - long stop writeback when the number of used blocks drops below this watermark - `Writecache/Options/WritebackJobs` - long limit the number of blocks that are in flight during writeback. Setting this value reduces writeback throughput, but it may improve latency of read requests - `Writecache/Options/AutocommitBlocks` - long when the application writes this amount of blocks without issuing the FLUSH request, the blocks are automatically commited - `Writecache/Options/AutocommitTime` - long autocommit time in milliseconds. The data is automatically commited if this time passes and no FLUSH request is received - `Writecache/Options/Fua` - enum "On" results in "fua" as argument, whereas the value "Off" results in "nofua" argument * On * Off - `Writecache/Options/Additional` - string Additional arguments passed through
@param node [String] node to use @param [Hash] opts the optional parameters @option opts [NodeModify] :node_modify @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1530 def node_modify_with_http_info(node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.node_modify ...' end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.node_modify" end # resource path local_var_path = '/v1/nodes/{node}'.sub('{' + 'node' + '}', CGI.escape(node.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'node_modify']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.node_modify", :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: DevelopersApi#node_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
reconnect a node to the controller Reconnect a node to the controller @param node [String] node to use @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1588 def node_reconnect(node, opts = {}) data, _status_code, _headers = node_reconnect_with_http_info(node, opts) data end
reconnect a node to the controller Reconnect a node to the controller @param node [String] node to use @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1598 def node_reconnect_with_http_info(node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.node_reconnect ...' end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.node_reconnect" end # resource path local_var_path = '/v1/nodes/{node}/reconnect'.sub('{' + 'node' + '}', CGI.escape(node.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.node_reconnect", :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: DevelopersApi#node_reconnect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
creates a new storage pool on this node Creates a new storage pool on this node. ‘provider_kind` has to be specified and additional to that the linked `StorDriver` property that has the value to the backing pool: * `LVM`: `StorDriver/LvmVg` * `LVM_THIN`: `StorDriver/LvmVg` and `StorDriver/ThinPool` * `ZFS`: `StorDriver/ZPool` * `ZFS_THIN`: `StorDriver/ZPoolThin` * `DISKLESS`: Does not need a property as it has no backing pool @param node [String] node to use @param [Hash] opts the optional parameters @option opts [StoragePool] :storage_pool @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1652 def node_storage_pool_create(node, opts = {}) data, _status_code, _headers = node_storage_pool_create_with_http_info(node, opts) data end
creates a new storage pool on this node Creates a new storage pool on this node. `provider_kind` has to be specified and additional to that the linked `StorDriver` property that has the value to the backing pool: * `LVM`: `StorDriver/LvmVg` * `LVM_THIN`: `StorDriver/LvmVg` and `StorDriver/ThinPool` * `ZFS`: `StorDriver/ZPool` * `ZFS_THIN`: `StorDriver/ZPoolThin` * `DISKLESS`: Does not need a property as it has no backing pool @param node [String] node to use @param [Hash] opts the optional parameters @option opts [StoragePool] :storage_pool @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1663 def node_storage_pool_create_with_http_info(node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.node_storage_pool_create ...' end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.node_storage_pool_create" end # resource path local_var_path = '/v1/nodes/{node}/storage-pools'.sub('{' + 'node' + '}', CGI.escape(node.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'storage_pool']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.node_storage_pool_create", :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: DevelopersApi#node_storage_pool_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
delete a storage pool Delete a storage pool @param node [String] node to use @param storagepool [String] @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1722 def node_storage_pool_delete(node, storagepool, opts = {}) data, _status_code, _headers = node_storage_pool_delete_with_http_info(node, storagepool, opts) data end
delete a storage pool Delete a storage pool @param node [String] node to use @param storagepool [String] @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1733 def node_storage_pool_delete_with_http_info(node, storagepool, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.node_storage_pool_delete ...' end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.node_storage_pool_delete" end # verify the required parameter 'storagepool' is set if @api_client.config.client_side_validation && storagepool.nil? fail ArgumentError, "Missing the required parameter 'storagepool' when calling DevelopersApi.node_storage_pool_delete" end # resource path local_var_path = '/v1/nodes/{node}/storage-pools/{storagepool}'.sub('{' + 'node' + '}', CGI.escape(node.to_s)).sub('{' + 'storagepool' + '}', CGI.escape(storagepool.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.node_storage_pool_delete", :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: DevelopersApi#node_storage_pool_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists all storage pools for a node Lists all storage pools of a node @param node [String] node to use @param [Hash] opts the optional parameters @option opts [Array<String>] :nodes Filter only for the specified nodes, if not specified no filtering. @option opts [Array<String>] :storage_pools Filter only for the specified storage pools, if not specified no filtering. @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<StoragePool>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1794 def node_storage_pool_list(node, opts = {}) data, _status_code, _headers = node_storage_pool_list_with_http_info(node, opts) data end
lists all storage pools for a node Lists all storage pools of a node @param node [String] node to use @param [Hash] opts the optional parameters @option opts [Array<String>] :nodes Filter only for the specified nodes, if not specified no filtering. @option opts [Array<String>] :storage_pools Filter only for the specified storage pools, if not specified no filtering. @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<StoragePool>, Integer, Hash)>] Array<StoragePool> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1808 def node_storage_pool_list_with_http_info(node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.node_storage_pool_list ...' end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.node_storage_pool_list" end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.node_storage_pool_list, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.node_storage_pool_list, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.node_storage_pool_list, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/nodes/{node}/storage-pools'.sub('{' + 'node' + '}', CGI.escape(node.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'nodes'] = @api_client.build_collection_param(opts[:'nodes'], :multi) if !opts[:'nodes'].nil? query_params[:'storage_pools'] = @api_client.build_collection_param(opts[:'storage_pools'], :multi) if !opts[:'storage_pools'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<StoragePool>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.node_storage_pool_list", :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: DevelopersApi#node_storage_pool_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modify a storage pool Sets or modifies properties Possible properties are: - ‘StorDriver/LvmVg` - regex[`+`] - `StorDriver/ThinPool` - regex[`+`] - `StorDriver/ZPool` - regex[`+`] - `StorDriver/ZPoolThin` - regex[`+`] - `StorDriver/FileDir` - regex - `PrefNic` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Preferred network interface to use - `NVMe/PrefNic` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Preferred network interface to use - `StorDriver/LvcreateType` - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - `StorDriver/WaitTimeoutAfterCreate` - regex[`+`] - `sys/fs/blkio_throttle_read` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - `sys/fs/blkio_throttle_write` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device
@param node [String] node to use @param storagepool [String] @param [Hash] opts the optional parameters @option opts [StoragePoolDefinitionModify] :storage_pool_definition_modify @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1879 def node_storage_pool_modify(node, storagepool, opts = {}) data, _status_code, _headers = node_storage_pool_modify_with_http_info(node, storagepool, opts) data end
modify a storage pool Sets or modifies properties Possible properties are: - `StorDriver/LvmVg` - regex[`+`] - `StorDriver/ThinPool` - regex[`+`] - `StorDriver/ZPool` - regex[`+`] - `StorDriver/ZPoolThin` - regex[`+`] - `StorDriver/FileDir` - regex - `PrefNic` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Preferred network interface to use - `NVMe/PrefNic` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Preferred network interface to use - `StorDriver/LvcreateType` - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - `StorDriver/WaitTimeoutAfterCreate` - regex[`+`] - `sys/fs/blkio_throttle_read` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - `sys/fs/blkio_throttle_write` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device
@param node [String] node to use @param storagepool [String] @param [Hash] opts the optional parameters @option opts [StoragePoolDefinitionModify] :storage_pool_definition_modify @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1891 def node_storage_pool_modify_with_http_info(node, storagepool, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.node_storage_pool_modify ...' end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.node_storage_pool_modify" end # verify the required parameter 'storagepool' is set if @api_client.config.client_side_validation && storagepool.nil? fail ArgumentError, "Missing the required parameter 'storagepool' when calling DevelopersApi.node_storage_pool_modify" end # resource path local_var_path = '/v1/nodes/{node}/storage-pools/{storagepool}'.sub('{' + 'node' + '}', CGI.escape(node.to_s)).sub('{' + 'storagepool' + '}', CGI.escape(storagepool.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'storage_pool_definition_modify']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.node_storage_pool_modify", :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: DevelopersApi#node_storage_pool_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
query the maximum volume size Query the maximum possible volume size storage pools @param [Hash] opts the optional parameters @option opts [AutoSelectFilter] :auto_select_filter @return [MaxVolumeSizes]
# File lib/ruby-linstor-client/api/developers_api.rb, line 1953 def query_max_volume_size(opts = {}) data, _status_code, _headers = query_max_volume_size_with_http_info(opts) data end
query the maximum volume size from a given resource group Query the maximum possible volume size storage pools @param resource_group [String] resource group to use @param [Hash] opts the optional parameters @return [MaxVolumeSizes]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2017 def query_max_volume_size_from_rsc_grp(resource_group, opts = {}) data, _status_code, _headers = query_max_volume_size_from_rsc_grp_with_http_info(resource_group, opts) data end
query the maximum volume size from a given resource group Query the maximum possible volume size storage pools @param resource_group [String] resource group to use @param [Hash] opts the optional parameters @return [Array<(MaxVolumeSizes
, Integer, Hash)>] MaxVolumeSizes
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2027 def query_max_volume_size_from_rsc_grp_with_http_info(resource_group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.query_max_volume_size_from_rsc_grp ...' end # verify the required parameter 'resource_group' is set if @api_client.config.client_side_validation && resource_group.nil? fail ArgumentError, "Missing the required parameter 'resource_group' when calling DevelopersApi.query_max_volume_size_from_rsc_grp" end # resource path local_var_path = '/v1/resource-groups/{resource_group}/query-max-volume-size'.sub('{' + 'resource_group' + '}', CGI.escape(resource_group.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MaxVolumeSizes' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.query_max_volume_size_from_rsc_grp", :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: DevelopersApi#query_max_volume_size_from_rsc_grp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
query the maximum volume size Query the maximum possible volume size storage pools @param [Hash] opts the optional parameters @option opts [AutoSelectFilter] :auto_select_filter @return [Array<(MaxVolumeSizes
, Integer, Hash)>] MaxVolumeSizes
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 1963 def query_max_volume_size_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.query_max_volume_size ...' end # resource path local_var_path = '/v1/query-max-volume-size' # 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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'auto_select_filter']) # return_type return_type = opts[:debug_return_type] || 'MaxVolumeSizes' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.query_max_volume_size", :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(:OPTIONS, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DevelopersApi#query_max_volume_size\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
autoplace resource Auto place the resource on the specified place_count redundency. If place_count isn’t given 2 is the default. @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [AutoPlaceRequest] :auto_place_request @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2081 def resource_autoplace(resource, opts = {}) data, _status_code, _headers = resource_autoplace_with_http_info(resource, opts) data end
autoplace resource Auto place the resource on the specified place_count redundency. If place_count isn't given 2 is the default. @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [AutoPlaceRequest] :auto_place_request @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2092 def resource_autoplace_with_http_info(resource, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_autoplace ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_autoplace" end # resource path local_var_path = '/v1/resource-definitions/{resource}/autoplace'.sub('{' + 'resource' + '}', CGI.escape(resource.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'auto_place_request']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_autoplace", :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: DevelopersApi#resource_autoplace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
show the specified resource connection show the specified resource connection @param resource [String] resource to use @param node_a [String] source node of the connection @param node_b [String] target node of the connection @param [Hash] opts the optional parameters @return [Array<ResourceConnection>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2152 def resource_connection_list(resource, node_a, node_b, opts = {}) data, _status_code, _headers = resource_connection_list_with_http_info(resource, node_a, node_b, opts) data end
show the specified resource connection show the specified resource connection @param resource [String] resource to use @param node_a [String] source node of the connection @param node_b [String] target node of the connection @param [Hash] opts the optional parameters @return [Array<(Array<ResourceConnection>, Integer, Hash)>] Array<ResourceConnection> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2164 def resource_connection_list_with_http_info(resource, node_a, node_b, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_connection_list ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_connection_list" end # verify the required parameter 'node_a' is set if @api_client.config.client_side_validation && node_a.nil? fail ArgumentError, "Missing the required parameter 'node_a' when calling DevelopersApi.resource_connection_list" end # verify the required parameter 'node_b' is set if @api_client.config.client_side_validation && node_b.nil? fail ArgumentError, "Missing the required parameter 'node_b' when calling DevelopersApi.resource_connection_list" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resource-connections/{node_a}/{node_b}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node_a' + '}', CGI.escape(node_a.to_s)).sub('{' + 'node_b' + '}', CGI.escape(node_b.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ResourceConnection>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_connection_list", :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: DevelopersApi#resource_connection_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modify a resource connection Sets or modifies properties Possible properties are: - ‘DrbdOptions/PeerDevice/c-fill-target` - range - `DrbdOptions/PeerDevice/c-max-rate` - range - `DrbdOptions/PeerDevice/resync-rate` - range - `DrbdOptions/PeerDevice/c-delay-target` - range - `DrbdOptions/PeerDevice/c-min-rate` - range - `DrbdOptions/PeerDevice/bitmap` - boolean - `DrbdOptions/PeerDevice/c-plan-ahead` - range - `DrbdOptions/Net/max-epoch-size` - range - `DrbdOptions/Net/protocol` - enum * A * B * C - `DrbdOptions/Net/allow-two-primaries` - boolean - `DrbdOptions/Net/after-sb-0pri` - enum * disconnect * discard-younger-primary * discard-older-primary * discard-zero-changes * discard-least-changes * discard-local * discard-remote - `DrbdOptions/Net/ko-count` - range - `DrbdOptions/Net/data-integrity-alg` - string - `DrbdOptions/Net/ping-timeout` - range - `DrbdOptions/Net/sndbuf-size` - range - `DrbdOptions/Net/transport` - string - `DrbdOptions/Net/rcvbuf-size` - range - `DrbdOptions/Net/max-buffers` - range - `DrbdOptions/Net/fencing` - enum * dont-care * resource-only * resource-and-stonith - `DrbdOptions/Net/csums-alg` - string - `DrbdOptions/Net/always-asbp` - boolean - `DrbdOptions/Net/congestion-extents` - range - `DrbdOptions/Net/on-congestion` - enum * block * pull-ahead * disconnect - `DrbdOptions/Net/ping-int` - range - `DrbdOptions/Net/rr-conflict` - enum * disconnect * call-pri-lost * violently - `DrbdOptions/Net/tcp-cork` - boolean - `DrbdOptions/Net/use-rle` - boolean - `DrbdOptions/Net/csums-after-crash-only` - boolean - `DrbdOptions/Net/socket-check-timeout` - range - `DrbdOptions/Net/congestion-fill` - range - `DrbdOptions/Net/cram-hmac-alg` - string - `DrbdOptions/Net/verify-alg` - string - `DrbdOptions/Net/shared-secret` - string - `DrbdOptions/Net/connect-int` - range - `DrbdOptions/Net/timeout` - range - `DrbdOptions/Net/after-sb-2pri` - enum * disconnect * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Net/after-sb-1pri` - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p
@param resource [String] resource to use @param node_a [String] source node of the connection @param node_b [String] target node of the connection @param [Hash] opts the optional parameters @option opts [ResourceConnectionModify] :resource_connection_modify @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2228 def resource_connection_modify(resource, node_a, node_b, opts = {}) data, _status_code, _headers = resource_connection_modify_with_http_info(resource, node_a, node_b, opts) data end
modify a resource connection Sets or modifies properties Possible properties are: - `DrbdOptions/PeerDevice/c-fill-target` - range - `DrbdOptions/PeerDevice/c-max-rate` - range - `DrbdOptions/PeerDevice/resync-rate` - range - `DrbdOptions/PeerDevice/c-delay-target` - range - `DrbdOptions/PeerDevice/c-min-rate` - range - `DrbdOptions/PeerDevice/bitmap` - boolean - `DrbdOptions/PeerDevice/c-plan-ahead` - range - `DrbdOptions/Net/max-epoch-size` - range - `DrbdOptions/Net/protocol` - enum * A * B * C - `DrbdOptions/Net/allow-two-primaries` - boolean - `DrbdOptions/Net/after-sb-0pri` - enum * disconnect * discard-younger-primary * discard-older-primary * discard-zero-changes * discard-least-changes * discard-local * discard-remote - `DrbdOptions/Net/ko-count` - range - `DrbdOptions/Net/data-integrity-alg` - string - `DrbdOptions/Net/ping-timeout` - range - `DrbdOptions/Net/sndbuf-size` - range - `DrbdOptions/Net/transport` - string - `DrbdOptions/Net/rcvbuf-size` - range - `DrbdOptions/Net/max-buffers` - range - `DrbdOptions/Net/fencing` - enum * dont-care * resource-only * resource-and-stonith - `DrbdOptions/Net/csums-alg` - string - `DrbdOptions/Net/always-asbp` - boolean - `DrbdOptions/Net/congestion-extents` - range - `DrbdOptions/Net/on-congestion` - enum * block * pull-ahead * disconnect - `DrbdOptions/Net/ping-int` - range - `DrbdOptions/Net/rr-conflict` - enum * disconnect * call-pri-lost * violently - `DrbdOptions/Net/tcp-cork` - boolean - `DrbdOptions/Net/use-rle` - boolean - `DrbdOptions/Net/csums-after-crash-only` - boolean - `DrbdOptions/Net/socket-check-timeout` - range - `DrbdOptions/Net/congestion-fill` - range - `DrbdOptions/Net/cram-hmac-alg` - string - `DrbdOptions/Net/verify-alg` - string - `DrbdOptions/Net/shared-secret` - string - `DrbdOptions/Net/connect-int` - range - `DrbdOptions/Net/timeout` - range - `DrbdOptions/Net/after-sb-2pri` - enum * disconnect * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Net/after-sb-1pri` - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p
@param resource [String] resource to use @param node_a [String] source node of the connection @param node_b [String] target node of the connection @param [Hash] opts the optional parameters @option opts [ResourceConnectionModify] :resource_connection_modify @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2241 def resource_connection_modify_with_http_info(resource, node_a, node_b, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_connection_modify ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_connection_modify" end # verify the required parameter 'node_a' is set if @api_client.config.client_side_validation && node_a.nil? fail ArgumentError, "Missing the required parameter 'node_a' when calling DevelopersApi.resource_connection_modify" end # verify the required parameter 'node_b' is set if @api_client.config.client_side_validation && node_b.nil? fail ArgumentError, "Missing the required parameter 'node_b' when calling DevelopersApi.resource_connection_modify" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resource-connections/{node_a}/{node_b}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node_a' + '}', CGI.escape(node_a.to_s)).sub('{' + 'node_b' + '}', CGI.escape(node_b.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'resource_connection_modify']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_connection_modify", :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: DevelopersApi#resource_connection_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
list all resource connections for resource List all resource connections for resource @param resource [String] resource to use @param [Hash] opts the optional parameters @return [Array<ResourceConnection>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2307 def resource_connections_list(resource, opts = {}) data, _status_code, _headers = resource_connections_list_with_http_info(resource, opts) data end
list all resource connections for resource List all resource connections for resource @param resource [String] resource to use @param [Hash] opts the optional parameters @return [Array<(Array<ResourceConnection>, Integer, Hash)>] Array<ResourceConnection> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2317 def resource_connections_list_with_http_info(resource, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_connections_list ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_connections_list" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resource-connections'.sub('{' + 'resource' + '}', CGI.escape(resource.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ResourceConnection>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_connections_list", :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: DevelopersApi#resource_connections_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
create one or more resources. Adds one or more resource(s). @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [Array<ResourceCreate>] :resource_create @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2371 def resource_create(resource, opts = {}) data, _status_code, _headers = resource_create_with_http_info(resource, opts) data end
create a resource on a node Adds a resource on a node. To use a specific storage pool add the ‘StorPoolName` property and use the storage pool name as value. If the `StorPoolName` property is not set, the `DfltStorPool` will be used. To create a diskless resource you have to set the "DISKLESS" flag in the flags list. “` { "resource": { "flags": ["DISKLESS"] } } “` @param resource [String] resource to use @param node [String] node to use @param [Hash] opts the optional parameters @option opts [ResourceCreate] :resource_create @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2442 def resource_create_on_node(resource, node, opts = {}) data, _status_code, _headers = resource_create_on_node_with_http_info(resource, node, opts) data end
create a resource on a node Adds a resource on a node. To use a specific storage pool add the `StorPoolName` property and use the storage pool name as value. If the `StorPoolName` property is not set, the `DfltStorPool` will be used. To create a diskless resource you have to set the "DISKLESS" flag in the flags list. ``` { "resource": { "flags": ["DISKLESS"] } } ``` @param resource [String] resource to use @param node [String] node to use @param [Hash] opts the optional parameters @option opts [ResourceCreate] :resource_create @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2454 def resource_create_on_node_with_http_info(resource, node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_create_on_node ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_create_on_node" end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.resource_create_on_node" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resources/{node}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node' + '}', CGI.escape(node.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'resource_create']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_create_on_node", :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: DevelopersApi#resource_create_on_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
create one or more resources. Adds one or more resource(s). @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [Array<ResourceCreate>] :resource_create @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2382 def resource_create_with_http_info(resource, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_create ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_create" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resources'.sub('{' + 'resource' + '}', CGI.escape(resource.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'resource_create']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_create", :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: DevelopersApi#resource_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
add a resource-definition Adds a resource-definition. Only required property is the name of the resource definition. All other properties are optional. @param [Hash] opts the optional parameters @option opts [ResourceDefinitionCreate] :resource_definition_create @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2516 def resource_definition_create(opts = {}) data, _status_code, _headers = resource_definition_create_with_http_info(opts) data end
add a resource-definition Adds a resource-definition. Only required property is the name of the resource definition. All other properties are optional. @param [Hash] opts the optional parameters @option opts [ResourceDefinitionCreate] :resource_definition_create @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2526 def resource_definition_create_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_definition_create ...' end # resource path local_var_path = '/v1/resource-definitions' # 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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'resource_definition_create']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_definition_create", :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: DevelopersApi#resource_definition_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
delete a resource-definition Delete a resource-definition @param resource [String] resource to use @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2580 def resource_definition_delete(resource, opts = {}) data, _status_code, _headers = resource_definition_delete_with_http_info(resource, opts) data end
delete a resource-definition Delete a resource-definition @param resource [String] resource to use @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2590 def resource_definition_delete_with_http_info(resource, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_definition_delete ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_definition_delete" end # resource path local_var_path = '/v1/resource-definitions/{resource}'.sub('{' + 'resource' + '}', CGI.escape(resource.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_definition_delete", :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: DevelopersApi#resource_definition_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists all resource-definitions Lists all resource definitions. A single resource definition can be queried by adding its name to the resource string like: /v1/resource-definitions/rsc1 @param [Hash] opts the optional parameters @option opts [Array<String>] :resource_definitions Filter only for the specified resource definitions, if not specified no filtering. @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<ResourceDefinition>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2645 def resource_definition_list(opts = {}) data, _status_code, _headers = resource_definition_list_with_http_info(opts) data end
lists all resource-definitions Lists all resource definitions. A single resource definition can be queried by adding its name to the resource string like: /v1/resource-definitions/rsc1 @param [Hash] opts the optional parameters @option opts [Array<String>] :resource_definitions Filter only for the specified resource definitions, if not specified no filtering. @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<ResourceDefinition>, Integer, Hash)>] Array<ResourceDefinition> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2657 def resource_definition_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_definition_list ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.resource_definition_list, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.resource_definition_list, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.resource_definition_list, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/resource-definitions' # query parameters query_params = opts[:query_params] || {} query_params[:'resource_definitions'] = @api_client.build_collection_param(opts[:'resource_definitions'], :multi) if !opts[:'resource_definitions'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ResourceDefinition>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_definition_list", :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: DevelopersApi#resource_definition_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modify a resource-definition Sets or modifies properties Possible properties are: - ‘StorPoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `StorPoolNameDrbdMeta` - regex[`^|.internal|[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `DrbdMetaType` - enum * external * internal - `PeerSlotsNewResource` - range DRBD peer slots to allocate for newly created resources (default 7), the number of peer slots cannot be changed once the resource is created, so allow sufficient slots to increase redundancy in the future - `DrbdProxy/CompressionType` - enum * zlib * lzma * lz4 * zstd - `FileSystem/Type` - enum File system type to use * ext4 * xfs - `FileSystem/MkfsParams` - string Additional parameters for the mkfs command - `NVMe/enabled` - enum * rdma * tcp - `NVMe/enabled` - range - `StorDriver/LvcreateType` - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - `sys/fs/blkio_throttle_read` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - `sys/fs/blkio_throttle_write` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device - `DrbdOptions/auto-quorum` - enum Enables automatic setting of the ’quroum’ and ‘on-no-quroum’ property * io-error * suspend-io * disabled - ‘DrbdOptions/auto-add-quorum-tiebreaker` - boolean_true_false Enables automatic management (creation and deletion) of tie breaking resource - `Writecache/PoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name for writecache - `Writecache/Size` - regex[`^100%|{1,2}([.][0-9]*)?%|[0-9]{2,}$`] Size of the writecache in % (0-100) or KiB otherwise - `Writecache/Blocksize` - long 4096 is recommended; the maximum block size is the page size - `Writecache/Options/StartSector` - long offset from the start of cache device in 512-byte sectors - `Writecache/Options/HighWatermark` - long start writeback when the number of used blocks reach this watermark - `Writecache/Options/LowWatermark` - long stop writeback when the number of used blocks drops below this watermark - `Writecache/Options/WritebackJobs` - long limit the number of blocks that are in flight during writeback. Setting this value reduces writeback throughput, but it may improve latency of read requests - `Writecache/Options/AutocommitBlocks` - long when the application writes this amount of blocks without issuing the FLUSH request, the blocks are automatically commited - `Writecache/Options/AutocommitTime` - long autocommit time in milliseconds. The data is automatically commited if this time passes and no FLUSH request is received - `Writecache/Options/Fua` - enum "On" results in "fua" as argument, whereas the value "Off" results in "nofua" argument * On * Off - `Writecache/Options/Additional` - string Additional arguments passed through - `DrbdOptions/Disk/read-balancing` - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - `DrbdOptions/Disk/on-io-error` - enum * pass_on * call-local-io-error * detach - `DrbdOptions/Disk/disk-drain` - boolean - `DrbdOptions/Disk/resync-after` - string - `DrbdOptions/Disk/disk-timeout` - range - `DrbdOptions/Disk/disable-write-same` - boolean - `DrbdOptions/Disk/rs-discard-granularity` - range - `DrbdOptions/Disk/disk-flushes` - boolean - `DrbdOptions/Disk/al-extents` - range - `DrbdOptions/Disk/al-updates` - boolean - `DrbdOptions/Disk/md-flushes` - boolean - `DrbdOptions/Disk/disk-barrier` - boolean - `DrbdOptions/Disk/discard-zeroes-if-aligned` - boolean - `DrbdOptions/PeerDevice/c-fill-target` - range - `DrbdOptions/PeerDevice/c-max-rate` - range - `DrbdOptions/PeerDevice/resync-rate` - range - `DrbdOptions/PeerDevice/c-delay-target` - range - `DrbdOptions/PeerDevice/c-min-rate` - range - `DrbdOptions/PeerDevice/bitmap` - boolean - `DrbdOptions/PeerDevice/c-plan-ahead` - range - `DrbdOptions/Resource/peer-ack-delay` - range - `DrbdOptions/Resource/quorum-minimum-redundancy` - enum [`1-32`] * off * majority * all - `DrbdOptions/Resource/max-io-depth` - range - `DrbdOptions/Resource/auto-promote-timeout` - range - `DrbdOptions/Resource/quorum` - enum [`1-32`] * off * majority * all - `DrbdOptions/Resource/on-no-data-accessible` - enum * io-error * suspend-io - `DrbdOptions/Resource/auto-promote` - boolean - `DrbdOptions/Resource/cpu-mask` - string - `DrbdOptions/Resource/twopc-timeout` - range - `DrbdOptions/Resource/twopc-retry-timeout` - range - `DrbdOptions/Resource/peer-ack-window` - range - `DrbdOptions/Resource/on-no-quorum` - enum * io-error * suspend-io - `DrbdOptions/Net/max-epoch-size` - range - `DrbdOptions/Net/protocol` - enum * A * B * C - `DrbdOptions/Net/allow-two-primaries` - boolean - `DrbdOptions/Net/after-sb-0pri` - enum * disconnect * discard-younger-primary * discard-older-primary * discard-zero-changes * discard-least-changes * discard-local * discard-remote - `DrbdOptions/Net/ko-count` - range - `DrbdOptions/Net/data-integrity-alg` - string - `DrbdOptions/Net/ping-timeout` - range - `DrbdOptions/Net/sndbuf-size` - range - `DrbdOptions/Net/transport` - string - `DrbdOptions/Net/rcvbuf-size` - range - `DrbdOptions/Net/max-buffers` - range - `DrbdOptions/Net/fencing` - enum * dont-care * resource-only * resource-and-stonith - `DrbdOptions/Net/csums-alg` - string - `DrbdOptions/Net/always-asbp` - boolean - `DrbdOptions/Net/congestion-extents` - range - `DrbdOptions/Net/on-congestion` - enum * block * pull-ahead * disconnect - `DrbdOptions/Net/ping-int` - range - `DrbdOptions/Net/rr-conflict` - enum * disconnect * call-pri-lost * violently - `DrbdOptions/Net/tcp-cork` - boolean - `DrbdOptions/Net/use-rle` - boolean - `DrbdOptions/Net/csums-after-crash-only` - boolean - `DrbdOptions/Net/socket-check-timeout` - range - `DrbdOptions/Net/congestion-fill` - range - `DrbdOptions/Net/cram-hmac-alg` - string - `DrbdOptions/Net/verify-alg` - string - `DrbdOptions/Net/shared-secret` - string - `DrbdOptions/Net/connect-int` - range - `DrbdOptions/Net/timeout` - range - `DrbdOptions/Net/after-sb-2pri` - enum * disconnect * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Net/after-sb-1pri` - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Handlers/after-resync-target` - string - `DrbdOptions/Handlers/before-resync-target` - string - `DrbdOptions/Handlers/before-resync-source` - string - `DrbdOptions/Handlers/out-of-sync` - string - `DrbdOptions/Handlers/quorum-lost` - string - `DrbdOptions/Handlers/fence-peer` - string - `DrbdOptions/Handlers/unfence-peer` - string - `DrbdOptions/Handlers/initial-split-brain` - string - `DrbdOptions/Handlers/local-io-error` - string - `DrbdOptions/Handlers/pri-lost` - string - `DrbdOptions/Handlers/pri-lost-after-sb` - string - `DrbdOptions/Handlers/pri-on-incon-degr` - string - `DrbdOptions/Handlers/split-brain` - string @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [ResourceDefinitionModify] :resource_definition_modify @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2722 def resource_definition_modify(resource, opts = {}) data, _status_code, _headers = resource_definition_modify_with_http_info(resource, opts) data end
modify a resource-definition Sets or modifies properties Possible properties are: - `StorPoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `StorPoolNameDrbdMeta` - regex[`^|.internal|[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `DrbdMetaType` - enum * external * internal - `PeerSlotsNewResource` - range DRBD peer slots to allocate for newly created resources (default 7), the number of peer slots cannot be changed once the resource is created, so allow sufficient slots to increase redundancy in the future - `DrbdProxy/CompressionType` - enum * zlib * lzma * lz4 * zstd - `FileSystem/Type` - enum File system type to use * ext4 * xfs - `FileSystem/MkfsParams` - string Additional parameters for the mkfs command - `NVMe/enabled` - enum * rdma * tcp - `NVMe/enabled` - range - `StorDriver/LvcreateType` - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - `sys/fs/blkio_throttle_read` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - `sys/fs/blkio_throttle_write` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device - `DrbdOptions/auto-quorum` - enum Enables automatic setting of the 'quroum' and 'on-no-quroum' property * io-error * suspend-io * disabled - `DrbdOptions/auto-add-quorum-tiebreaker` - boolean_true_false Enables automatic management (creation and deletion) of tie breaking resource - `Writecache/PoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name for writecache - `Writecache/Size` - regex[`^100%|{1,2}([.][0-9]*)?%|[0-9]{2,}$`] Size of the writecache in % (0-100) or KiB otherwise - `Writecache/Blocksize` - long 4096 is recommended; the maximum block size is the page size - `Writecache/Options/StartSector` - long offset from the start of cache device in 512-byte sectors - `Writecache/Options/HighWatermark` - long start writeback when the number of used blocks reach this watermark - `Writecache/Options/LowWatermark` - long stop writeback when the number of used blocks drops below this watermark - `Writecache/Options/WritebackJobs` - long limit the number of blocks that are in flight during writeback. Setting this value reduces writeback throughput, but it may improve latency of read requests - `Writecache/Options/AutocommitBlocks` - long when the application writes this amount of blocks without issuing the FLUSH request, the blocks are automatically commited - `Writecache/Options/AutocommitTime` - long autocommit time in milliseconds. The data is automatically commited if this time passes and no FLUSH request is received - `Writecache/Options/Fua` - enum "On" results in "fua" as argument, whereas the value "Off" results in "nofua" argument * On * Off - `Writecache/Options/Additional` - string Additional arguments passed through - `DrbdOptions/Disk/read-balancing` - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - `DrbdOptions/Disk/on-io-error` - enum * pass_on * call-local-io-error * detach - `DrbdOptions/Disk/disk-drain` - boolean - `DrbdOptions/Disk/resync-after` - string - `DrbdOptions/Disk/disk-timeout` - range - `DrbdOptions/Disk/disable-write-same` - boolean - `DrbdOptions/Disk/rs-discard-granularity` - range - `DrbdOptions/Disk/disk-flushes` - boolean - `DrbdOptions/Disk/al-extents` - range - `DrbdOptions/Disk/al-updates` - boolean - `DrbdOptions/Disk/md-flushes` - boolean - `DrbdOptions/Disk/disk-barrier` - boolean - `DrbdOptions/Disk/discard-zeroes-if-aligned` - boolean - `DrbdOptions/PeerDevice/c-fill-target` - range - `DrbdOptions/PeerDevice/c-max-rate` - range - `DrbdOptions/PeerDevice/resync-rate` - range - `DrbdOptions/PeerDevice/c-delay-target` - range - `DrbdOptions/PeerDevice/c-min-rate` - range - `DrbdOptions/PeerDevice/bitmap` - boolean - `DrbdOptions/PeerDevice/c-plan-ahead` - range - `DrbdOptions/Resource/peer-ack-delay` - range - `DrbdOptions/Resource/quorum-minimum-redundancy` - enum [`1-32`] * off * majority * all - `DrbdOptions/Resource/max-io-depth` - range - `DrbdOptions/Resource/auto-promote-timeout` - range - `DrbdOptions/Resource/quorum` - enum [`1-32`] * off * majority * all - `DrbdOptions/Resource/on-no-data-accessible` - enum * io-error * suspend-io - `DrbdOptions/Resource/auto-promote` - boolean - `DrbdOptions/Resource/cpu-mask` - string - `DrbdOptions/Resource/twopc-timeout` - range - `DrbdOptions/Resource/twopc-retry-timeout` - range - `DrbdOptions/Resource/peer-ack-window` - range - `DrbdOptions/Resource/on-no-quorum` - enum * io-error * suspend-io - `DrbdOptions/Net/max-epoch-size` - range - `DrbdOptions/Net/protocol` - enum * A * B * C - `DrbdOptions/Net/allow-two-primaries` - boolean - `DrbdOptions/Net/after-sb-0pri` - enum * disconnect * discard-younger-primary * discard-older-primary * discard-zero-changes * discard-least-changes * discard-local * discard-remote - `DrbdOptions/Net/ko-count` - range - `DrbdOptions/Net/data-integrity-alg` - string - `DrbdOptions/Net/ping-timeout` - range - `DrbdOptions/Net/sndbuf-size` - range - `DrbdOptions/Net/transport` - string - `DrbdOptions/Net/rcvbuf-size` - range - `DrbdOptions/Net/max-buffers` - range - `DrbdOptions/Net/fencing` - enum * dont-care * resource-only * resource-and-stonith - `DrbdOptions/Net/csums-alg` - string - `DrbdOptions/Net/always-asbp` - boolean - `DrbdOptions/Net/congestion-extents` - range - `DrbdOptions/Net/on-congestion` - enum * block * pull-ahead * disconnect - `DrbdOptions/Net/ping-int` - range - `DrbdOptions/Net/rr-conflict` - enum * disconnect * call-pri-lost * violently - `DrbdOptions/Net/tcp-cork` - boolean - `DrbdOptions/Net/use-rle` - boolean - `DrbdOptions/Net/csums-after-crash-only` - boolean - `DrbdOptions/Net/socket-check-timeout` - range - `DrbdOptions/Net/congestion-fill` - range - `DrbdOptions/Net/cram-hmac-alg` - string - `DrbdOptions/Net/verify-alg` - string - `DrbdOptions/Net/shared-secret` - string - `DrbdOptions/Net/connect-int` - range - `DrbdOptions/Net/timeout` - range - `DrbdOptions/Net/after-sb-2pri` - enum * disconnect * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Net/after-sb-1pri` - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Handlers/after-resync-target` - string - `DrbdOptions/Handlers/before-resync-target` - string - `DrbdOptions/Handlers/before-resync-source` - string - `DrbdOptions/Handlers/out-of-sync` - string - `DrbdOptions/Handlers/quorum-lost` - string - `DrbdOptions/Handlers/fence-peer` - string - `DrbdOptions/Handlers/unfence-peer` - string - `DrbdOptions/Handlers/initial-split-brain` - string - `DrbdOptions/Handlers/local-io-error` - string - `DrbdOptions/Handlers/pri-lost` - string - `DrbdOptions/Handlers/pri-lost-after-sb` - string - `DrbdOptions/Handlers/pri-on-incon-degr` - string - `DrbdOptions/Handlers/split-brain` - string @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [ResourceDefinitionModify] :resource_definition_modify @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2733 def resource_definition_modify_with_http_info(resource, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_definition_modify ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_definition_modify" end # resource path local_var_path = '/v1/resource-definitions/{resource}'.sub('{' + 'resource' + '}', CGI.escape(resource.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'resource_definition_modify']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_definition_modify", :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: DevelopersApi#resource_definition_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
delete a resource Delete a resource on a node @param resource [String] resource to use @param node [String] node to use @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2792 def resource_delete(resource, node, opts = {}) data, _status_code, _headers = resource_delete_with_http_info(resource, node, opts) data end
delete a resource Delete a resource on a node @param resource [String] resource to use @param node [String] node to use @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2803 def resource_delete_with_http_info(resource, node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_delete ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_delete" end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.resource_delete" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resources/{node}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node' + '}', CGI.escape(node.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_delete", :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: DevelopersApi#resource_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
disables a drbd proxy on a node connection Disables a drbd proxy on a node connection @param resource [String] resource to use @param node_a [String] @param node_b [String] @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2862 def resource_drbd_proxy_disable(resource, node_a, node_b, opts = {}) data, _status_code, _headers = resource_drbd_proxy_disable_with_http_info(resource, node_a, node_b, opts) data end
disables a drbd proxy on a node connection Disables a drbd proxy on a node connection @param resource [String] resource to use @param node_a [String] @param node_b [String] @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2874 def resource_drbd_proxy_disable_with_http_info(resource, node_a, node_b, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_drbd_proxy_disable ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_drbd_proxy_disable" end # verify the required parameter 'node_a' is set if @api_client.config.client_side_validation && node_a.nil? fail ArgumentError, "Missing the required parameter 'node_a' when calling DevelopersApi.resource_drbd_proxy_disable" end # verify the required parameter 'node_b' is set if @api_client.config.client_side_validation && node_b.nil? fail ArgumentError, "Missing the required parameter 'node_b' when calling DevelopersApi.resource_drbd_proxy_disable" end # resource path local_var_path = '/v1/resource-definitions/{resource}/drbd-proxy/disable/{nodeA}/{nodeB}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'nodeA' + '}', CGI.escape(node_a.to_s)).sub('{' + 'nodeB' + '}', CGI.escape(node_b.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_drbd_proxy_disable", :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: DevelopersApi#resource_drbd_proxy_disable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
enable a drbd proxy on a node connection Enables a drbd proxy on a node connection @param resource [String] resource to use @param node_a [String] source node of the connection @param node_b [String] target node of the connection @param [Hash] opts the optional parameters @option opts [DrbdProxyEnable] :drbd_proxy_enable @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 2938 def resource_drbd_proxy_enable(resource, node_a, node_b, opts = {}) data, _status_code, _headers = resource_drbd_proxy_enable_with_http_info(resource, node_a, node_b, opts) data end
enable a drbd proxy on a node connection Enables a drbd proxy on a node connection @param resource [String] resource to use @param node_a [String] source node of the connection @param node_b [String] target node of the connection @param [Hash] opts the optional parameters @option opts [DrbdProxyEnable] :drbd_proxy_enable @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 2951 def resource_drbd_proxy_enable_with_http_info(resource, node_a, node_b, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_drbd_proxy_enable ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_drbd_proxy_enable" end # verify the required parameter 'node_a' is set if @api_client.config.client_side_validation && node_a.nil? fail ArgumentError, "Missing the required parameter 'node_a' when calling DevelopersApi.resource_drbd_proxy_enable" end # verify the required parameter 'node_b' is set if @api_client.config.client_side_validation && node_b.nil? fail ArgumentError, "Missing the required parameter 'node_b' when calling DevelopersApi.resource_drbd_proxy_enable" end # resource path local_var_path = '/v1/resource-definitions/{resource}/drbd-proxy/enable/{node_a}/{node_b}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node_a' + '}', CGI.escape(node_a.to_s)).sub('{' + 'node_b' + '}', CGI.escape(node_b.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'drbd_proxy_enable']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_drbd_proxy_enable", :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: DevelopersApi#resource_drbd_proxy_enable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modify drbd proxy option properties Sets or modifies properties Possible properties are: - ‘DrbdOptions/Proxy/memlimit` - range - `DrbdOptions/Proxy/read-loops` - range - `DrbdOptions/Proxy/sndbuf-size` - range - `DrbdOptions/Proxy/rcvbuf-size` - range - `DrbdOptions/Proxy/ping-timeout` - range - `DrbdOptions/ProxyCompression/dict-size` - range - `DrbdOptions/ProxyCompression/lc` - range - `DrbdOptions/ProxyCompression/lp` - range - `DrbdOptions/ProxyCompression/pb` - range - `DrbdOptions/ProxyCompression/nice-len` - range - `DrbdOptions/ProxyCompression/mf` - enum * hc4 * hc3 * bt2 * bt3 * bt4 - `DrbdOptions/ProxyCompression/mode` - enum * fast * normal - `DrbdOptions/ProxyCompression/depth` - range - `DrbdOptions/ProxyCompression/level` - range - `DrbdOptions/ProxyCompression/contexts` - range - `DrbdOptions/ProxyCompression/fallback-to-zlib` - enum * off * on - `DrbdOptions/ProxyCompression/numa-threshold` - range - `DrbdOptions/ProxyCompression/level` - range - `DrbdOptions/ProxyCompression/level` - range @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [DrbdProxyModify] :drbd_proxy_modify @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3018 def resource_drbd_proxy_modify(resource, opts = {}) data, _status_code, _headers = resource_drbd_proxy_modify_with_http_info(resource, opts) data end
modify drbd proxy option properties Sets or modifies properties Possible properties are: - `DrbdOptions/Proxy/memlimit` - range - `DrbdOptions/Proxy/read-loops` - range - `DrbdOptions/Proxy/sndbuf-size` - range - `DrbdOptions/Proxy/rcvbuf-size` - range - `DrbdOptions/Proxy/ping-timeout` - range - `DrbdOptions/ProxyCompression/dict-size` - range - `DrbdOptions/ProxyCompression/lc` - range - `DrbdOptions/ProxyCompression/lp` - range - `DrbdOptions/ProxyCompression/pb` - range - `DrbdOptions/ProxyCompression/nice-len` - range - `DrbdOptions/ProxyCompression/mf` - enum * hc4 * hc3 * bt2 * bt3 * bt4 - `DrbdOptions/ProxyCompression/mode` - enum * fast * normal - `DrbdOptions/ProxyCompression/depth` - range - `DrbdOptions/ProxyCompression/level` - range - `DrbdOptions/ProxyCompression/contexts` - range - `DrbdOptions/ProxyCompression/fallback-to-zlib` - enum * off * on - `DrbdOptions/ProxyCompression/numa-threshold` - range - `DrbdOptions/ProxyCompression/level` - range - `DrbdOptions/ProxyCompression/level` - range @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [DrbdProxyModify] :drbd_proxy_modify @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3029 def resource_drbd_proxy_modify_with_http_info(resource, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_drbd_proxy_modify ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_drbd_proxy_modify" end # resource path local_var_path = '/v1/resource-definitions/{resource}/drbd-proxy'.sub('{' + 'resource' + '}', CGI.escape(resource.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'drbd_proxy_modify']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_drbd_proxy_modify", :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: DevelopersApi#resource_drbd_proxy_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
add a resource-group Adds a resource-group. Only required property is the name of the resource group. All other properties are optional. @param [Hash] opts the optional parameters @option opts [ResourceGroup] :resource_group @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3087 def resource_group_create(opts = {}) data, _status_code, _headers = resource_group_create_with_http_info(opts) data end
add a resource-group Adds a resource-group. Only required property is the name of the resource group. All other properties are optional. @param [Hash] opts the optional parameters @option opts [ResourceGroup] :resource_group @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3097 def resource_group_create_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_group_create ...' end # resource path local_var_path = '/v1/resource-groups' # 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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'resource_group']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_group_create", :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: DevelopersApi#resource_group_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
delete a resource-group Delete a resource-group @param resource_group [String] resource group to use @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3151 def resource_group_delete(resource_group, opts = {}) data, _status_code, _headers = resource_group_delete_with_http_info(resource_group, opts) data end
delete a resource-group Delete a resource-group @param resource_group [String] resource group to use @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3161 def resource_group_delete_with_http_info(resource_group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_group_delete ...' end # verify the required parameter 'resource_group' is set if @api_client.config.client_side_validation && resource_group.nil? fail ArgumentError, "Missing the required parameter 'resource_group' when calling DevelopersApi.resource_group_delete" end # resource path local_var_path = '/v1/resource-groups/{resource_group}'.sub('{' + 'resource_group' + '}', CGI.escape(resource_group.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_group_delete", :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: DevelopersApi#resource_group_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists all resource-groups Lists all resource groups. A single resource group can be queried by adding its name to the resource string like: /v1/resource-groups/rscgrp1 @param [Hash] opts the optional parameters @option opts [Array<String>] :resource_groups Filter only for the specified resource groups, if not specified no filtering. @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<ResourceGroup>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3216 def resource_group_list(opts = {}) data, _status_code, _headers = resource_group_list_with_http_info(opts) data end
lists all resource-groups Lists all resource groups. A single resource group can be queried by adding its name to the resource string like: /v1/resource-groups/rscgrp1 @param [Hash] opts the optional parameters @option opts [Array<String>] :resource_groups Filter only for the specified resource groups, if not specified no filtering. @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<ResourceGroup>, Integer, Hash)>] Array<ResourceGroup> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3228 def resource_group_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_group_list ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.resource_group_list, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.resource_group_list, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.resource_group_list, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/resource-groups' # query parameters query_params = opts[:query_params] || {} query_params[:'resource_groups'] = @api_client.build_collection_param(opts[:'resource_groups'], :multi) if !opts[:'resource_groups'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ResourceGroup>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_group_list", :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: DevelopersApi#resource_group_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modify a resource-group Sets or modifies properties Possible properties are: - ‘StorPoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `PeerSlotsNewResource` - range DRBD peer slots to allocate for newly created resources (default 7), the number of peer slots cannot be changed once the resource is created, so allow sufficient slots to increase redundancy in the future - `DrbdProxy/CompressionType` - enum * zlib * lzma * lz4 - `FileSystem/Type` - enum File system type to use * ext4 * xfs - `FileSystem/MkfsParams` - string Additional parameters for the mkfs command - `NVMe/enabled` - enum * rdma * tcp - `NVMe/enabled` - range - `DrbdOptions/Disk/read-balancing` - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - `DrbdOptions/Disk/on-io-error` - enum * pass_on * call-local-io-error * detach - `DrbdOptions/Disk/disk-drain` - boolean - `DrbdOptions/Disk/resync-after` - string - `DrbdOptions/Disk/disk-timeout` - range - `DrbdOptions/Disk/disable-write-same` - boolean - `DrbdOptions/Disk/rs-discard-granularity` - range - `DrbdOptions/Disk/disk-flushes` - boolean - `DrbdOptions/Disk/al-extents` - range - `DrbdOptions/Disk/al-updates` - boolean - `DrbdOptions/Disk/md-flushes` - boolean - `DrbdOptions/Disk/disk-barrier` - boolean - `DrbdOptions/Disk/discard-zeroes-if-aligned` - boolean - `DrbdOptions/PeerDevice/c-fill-target` - range - `DrbdOptions/PeerDevice/c-max-rate` - range - `DrbdOptions/PeerDevice/resync-rate` - range - `DrbdOptions/PeerDevice/c-delay-target` - range - `DrbdOptions/PeerDevice/c-min-rate` - range - `DrbdOptions/PeerDevice/bitmap` - boolean - `DrbdOptions/PeerDevice/c-plan-ahead` - range - `DrbdOptions/Resource/peer-ack-delay` - range - `DrbdOptions/Resource/quorum-minimum-redundancy` - enum [`1-32`] * off * majority * all - `DrbdOptions/Resource/max-io-depth` - range - `DrbdOptions/Resource/auto-promote-timeout` - range - `DrbdOptions/Resource/quorum` - enum [`1-32`] * off * majority * all - `DrbdOptions/Resource/on-no-data-accessible` - enum * io-error * suspend-io - `DrbdOptions/Resource/auto-promote` - boolean - `DrbdOptions/Resource/cpu-mask` - string - `DrbdOptions/Resource/twopc-timeout` - range - `DrbdOptions/Resource/twopc-retry-timeout` - range - `DrbdOptions/Resource/peer-ack-window` - range - `DrbdOptions/Resource/on-no-quorum` - enum * io-error * suspend-io - `DrbdOptions/Net/max-epoch-size` - range - `DrbdOptions/Net/protocol` - enum * A * B * C - `DrbdOptions/Net/allow-two-primaries` - boolean - `DrbdOptions/Net/after-sb-0pri` - enum * disconnect * discard-younger-primary * discard-older-primary * discard-zero-changes * discard-least-changes * discard-local * discard-remote - `DrbdOptions/Net/ko-count` - range - `DrbdOptions/Net/data-integrity-alg` - string - `DrbdOptions/Net/ping-timeout` - range - `DrbdOptions/Net/sndbuf-size` - range - `DrbdOptions/Net/transport` - string - `DrbdOptions/Net/rcvbuf-size` - range - `DrbdOptions/Net/max-buffers` - range - `DrbdOptions/Net/fencing` - enum * dont-care * resource-only * resource-and-stonith - `DrbdOptions/Net/csums-alg` - string - `DrbdOptions/Net/always-asbp` - boolean - `DrbdOptions/Net/congestion-extents` - range - `DrbdOptions/Net/on-congestion` - enum * block * pull-ahead * disconnect - `DrbdOptions/Net/ping-int` - range - `DrbdOptions/Net/rr-conflict` - enum * disconnect * call-pri-lost * violently - `DrbdOptions/Net/tcp-cork` - boolean - `DrbdOptions/Net/use-rle` - boolean - `DrbdOptions/Net/csums-after-crash-only` - boolean - `DrbdOptions/Net/socket-check-timeout` - range - `DrbdOptions/Net/congestion-fill` - range - `DrbdOptions/Net/cram-hmac-alg` - string - `DrbdOptions/Net/verify-alg` - string - `DrbdOptions/Net/shared-secret` - string - `DrbdOptions/Net/connect-int` - range - `DrbdOptions/Net/timeout` - range - `DrbdOptions/Net/after-sb-2pri` - enum * disconnect * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Net/after-sb-1pri` - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Handlers/after-resync-target` - string - `DrbdOptions/Handlers/before-resync-target` - string - `DrbdOptions/Handlers/before-resync-source` - string - `DrbdOptions/Handlers/out-of-sync` - string - `DrbdOptions/Handlers/quorum-lost` - string - `DrbdOptions/Handlers/fence-peer` - string - `DrbdOptions/Handlers/unfence-peer` - string - `DrbdOptions/Handlers/initial-split-brain` - string - `DrbdOptions/Handlers/local-io-error` - string - `DrbdOptions/Handlers/pri-lost` - string - `DrbdOptions/Handlers/pri-lost-after-sb` - string - `DrbdOptions/Handlers/pri-on-incon-degr` - string - `DrbdOptions/Handlers/split-brain` - string @param resource_group [String] resource group to use @param [Hash] opts the optional parameters @option opts [ResourceGroupModify] :resource_group_modify @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3293 def resource_group_modify(resource_group, opts = {}) data, _status_code, _headers = resource_group_modify_with_http_info(resource_group, opts) data end
modify a resource-group Sets or modifies properties Possible properties are: - `StorPoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `PeerSlotsNewResource` - range DRBD peer slots to allocate for newly created resources (default 7), the number of peer slots cannot be changed once the resource is created, so allow sufficient slots to increase redundancy in the future - `DrbdProxy/CompressionType` - enum * zlib * lzma * lz4 - `FileSystem/Type` - enum File system type to use * ext4 * xfs - `FileSystem/MkfsParams` - string Additional parameters for the mkfs command - `NVMe/enabled` - enum * rdma * tcp - `NVMe/enabled` - range - `DrbdOptions/Disk/read-balancing` - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - `DrbdOptions/Disk/on-io-error` - enum * pass_on * call-local-io-error * detach - `DrbdOptions/Disk/disk-drain` - boolean - `DrbdOptions/Disk/resync-after` - string - `DrbdOptions/Disk/disk-timeout` - range - `DrbdOptions/Disk/disable-write-same` - boolean - `DrbdOptions/Disk/rs-discard-granularity` - range - `DrbdOptions/Disk/disk-flushes` - boolean - `DrbdOptions/Disk/al-extents` - range - `DrbdOptions/Disk/al-updates` - boolean - `DrbdOptions/Disk/md-flushes` - boolean - `DrbdOptions/Disk/disk-barrier` - boolean - `DrbdOptions/Disk/discard-zeroes-if-aligned` - boolean - `DrbdOptions/PeerDevice/c-fill-target` - range - `DrbdOptions/PeerDevice/c-max-rate` - range - `DrbdOptions/PeerDevice/resync-rate` - range - `DrbdOptions/PeerDevice/c-delay-target` - range - `DrbdOptions/PeerDevice/c-min-rate` - range - `DrbdOptions/PeerDevice/bitmap` - boolean - `DrbdOptions/PeerDevice/c-plan-ahead` - range - `DrbdOptions/Resource/peer-ack-delay` - range - `DrbdOptions/Resource/quorum-minimum-redundancy` - enum [`1-32`] * off * majority * all - `DrbdOptions/Resource/max-io-depth` - range - `DrbdOptions/Resource/auto-promote-timeout` - range - `DrbdOptions/Resource/quorum` - enum [`1-32`] * off * majority * all - `DrbdOptions/Resource/on-no-data-accessible` - enum * io-error * suspend-io - `DrbdOptions/Resource/auto-promote` - boolean - `DrbdOptions/Resource/cpu-mask` - string - `DrbdOptions/Resource/twopc-timeout` - range - `DrbdOptions/Resource/twopc-retry-timeout` - range - `DrbdOptions/Resource/peer-ack-window` - range - `DrbdOptions/Resource/on-no-quorum` - enum * io-error * suspend-io - `DrbdOptions/Net/max-epoch-size` - range - `DrbdOptions/Net/protocol` - enum * A * B * C - `DrbdOptions/Net/allow-two-primaries` - boolean - `DrbdOptions/Net/after-sb-0pri` - enum * disconnect * discard-younger-primary * discard-older-primary * discard-zero-changes * discard-least-changes * discard-local * discard-remote - `DrbdOptions/Net/ko-count` - range - `DrbdOptions/Net/data-integrity-alg` - string - `DrbdOptions/Net/ping-timeout` - range - `DrbdOptions/Net/sndbuf-size` - range - `DrbdOptions/Net/transport` - string - `DrbdOptions/Net/rcvbuf-size` - range - `DrbdOptions/Net/max-buffers` - range - `DrbdOptions/Net/fencing` - enum * dont-care * resource-only * resource-and-stonith - `DrbdOptions/Net/csums-alg` - string - `DrbdOptions/Net/always-asbp` - boolean - `DrbdOptions/Net/congestion-extents` - range - `DrbdOptions/Net/on-congestion` - enum * block * pull-ahead * disconnect - `DrbdOptions/Net/ping-int` - range - `DrbdOptions/Net/rr-conflict` - enum * disconnect * call-pri-lost * violently - `DrbdOptions/Net/tcp-cork` - boolean - `DrbdOptions/Net/use-rle` - boolean - `DrbdOptions/Net/csums-after-crash-only` - boolean - `DrbdOptions/Net/socket-check-timeout` - range - `DrbdOptions/Net/congestion-fill` - range - `DrbdOptions/Net/cram-hmac-alg` - string - `DrbdOptions/Net/verify-alg` - string - `DrbdOptions/Net/shared-secret` - string - `DrbdOptions/Net/connect-int` - range - `DrbdOptions/Net/timeout` - range - `DrbdOptions/Net/after-sb-2pri` - enum * disconnect * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Net/after-sb-1pri` - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - `DrbdOptions/Handlers/after-resync-target` - string - `DrbdOptions/Handlers/before-resync-target` - string - `DrbdOptions/Handlers/before-resync-source` - string - `DrbdOptions/Handlers/out-of-sync` - string - `DrbdOptions/Handlers/quorum-lost` - string - `DrbdOptions/Handlers/fence-peer` - string - `DrbdOptions/Handlers/unfence-peer` - string - `DrbdOptions/Handlers/initial-split-brain` - string - `DrbdOptions/Handlers/local-io-error` - string - `DrbdOptions/Handlers/pri-lost` - string - `DrbdOptions/Handlers/pri-lost-after-sb` - string - `DrbdOptions/Handlers/pri-on-incon-degr` - string - `DrbdOptions/Handlers/split-brain` - string @param resource_group [String] resource group to use @param [Hash] opts the optional parameters @option opts [ResourceGroupModify] :resource_group_modify @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3304 def resource_group_modify_with_http_info(resource_group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_group_modify ...' end # verify the required parameter 'resource_group' is set if @api_client.config.client_side_validation && resource_group.nil? fail ArgumentError, "Missing the required parameter 'resource_group' when calling DevelopersApi.resource_group_modify" end # resource path local_var_path = '/v1/resource-groups/{resource_group}'.sub('{' + 'resource_group' + '}', CGI.escape(resource_group.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'resource_group_modify']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_group_modify", :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: DevelopersApi#resource_group_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
create a new resource-definition based on the given resource-group Creates a new resource-definition and auto-deploys if configured to do so. @param resource_group [String] resource group to use @param [Hash] opts the optional parameters @option opts [ResourceGroupSpawn] :resource_group_spawn @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3363 def resource_group_spawn(resource_group, opts = {}) data, _status_code, _headers = resource_group_spawn_with_http_info(resource_group, opts) data end
create a new resource-definition based on the given resource-group Creates a new resource-definition and auto-deploys if configured to do so. @param resource_group [String] resource group to use @param [Hash] opts the optional parameters @option opts [ResourceGroupSpawn] :resource_group_spawn @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3374 def resource_group_spawn_with_http_info(resource_group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_group_spawn ...' end # verify the required parameter 'resource_group' is set if @api_client.config.client_side_validation && resource_group.nil? fail ArgumentError, "Missing the required parameter 'resource_group' when calling DevelopersApi.resource_group_spawn" end # resource path local_var_path = '/v1/resource-groups/{resource_group}/spawn'.sub('{' + 'resource_group' + '}', CGI.escape(resource_group.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'resource_group_spawn']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_group_spawn", :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: DevelopersApi#resource_group_spawn\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists all resources for a resource-definition Lists all resources for a resource-definition. A single resource can be queried by adding its name to the resource string like: /v1/resource-definitions/rsc1/resources/nodeA @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<Resource>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3434 def resource_list(resource, opts = {}) data, _status_code, _headers = resource_list_with_http_info(resource, opts) data end
lists all resources for a resource-definition Lists all resources for a resource-definition. A single resource can be queried by adding its name to the resource string like: /v1/resource-definitions/rsc1/resources/nodeA @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<Resource>, Integer, Hash)>] Array<Resource> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3446 def resource_list_with_http_info(resource, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_list ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_list" end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.resource_list, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.resource_list, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.resource_list, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/resource-definitions/{resource}/resources'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Resource>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_list", :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: DevelopersApi#resource_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
migrate a resource to another node migrate a resource to another node without reducing the redundancy count @param resource [String] resource to use @param node [String] node to use @param fromnode [String] @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3515 def resource_migrate_disk(resource, node, fromnode, opts = {}) data, _status_code, _headers = resource_migrate_disk_with_http_info(resource, node, fromnode, opts) data end
migrate a resource to another node migrate a resource to another node without reducing the redundency count @param resource [String] resource to use @param node [String] node to use @param fromnode [String] @param storagepool [String] @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3591 def resource_migrate_disk_storagepool(resource, node, fromnode, storagepool, opts = {}) data, _status_code, _headers = resource_migrate_disk_storagepool_with_http_info(resource, node, fromnode, storagepool, opts) data end
migrate a resource to another node migrate a resource to another node without reducing the redundency count @param resource [String] resource to use @param node [String] node to use @param fromnode [String] @param storagepool [String] @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3604 def resource_migrate_disk_storagepool_with_http_info(resource, node, fromnode, storagepool, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_migrate_disk_storagepool ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_migrate_disk_storagepool" end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.resource_migrate_disk_storagepool" end # verify the required parameter 'fromnode' is set if @api_client.config.client_side_validation && fromnode.nil? fail ArgumentError, "Missing the required parameter 'fromnode' when calling DevelopersApi.resource_migrate_disk_storagepool" end # verify the required parameter 'storagepool' is set if @api_client.config.client_side_validation && storagepool.nil? fail ArgumentError, "Missing the required parameter 'storagepool' when calling DevelopersApi.resource_migrate_disk_storagepool" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resources/{node}/migrate-disk/{fromnode}/{storagepool}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node' + '}', CGI.escape(node.to_s)).sub('{' + 'fromnode' + '}', CGI.escape(fromnode.to_s)).sub('{' + 'storagepool' + '}', CGI.escape(storagepool.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_migrate_disk_storagepool", :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: DevelopersApi#resource_migrate_disk_storagepool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
migrate a resource to another node migrate a resource to another node without reducing the redundancy count @param resource [String] resource to use @param node [String] node to use @param fromnode [String] @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3527 def resource_migrate_disk_with_http_info(resource, node, fromnode, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_migrate_disk ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_migrate_disk" end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.resource_migrate_disk" end # verify the required parameter 'fromnode' is set if @api_client.config.client_side_validation && fromnode.nil? fail ArgumentError, "Missing the required parameter 'fromnode' when calling DevelopersApi.resource_migrate_disk" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resources/{node}/migrate-disk/{fromnode}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node' + '}', CGI.escape(node.to_s)).sub('{' + 'fromnode' + '}', CGI.escape(fromnode.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_migrate_disk", :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: DevelopersApi#resource_migrate_disk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modify a resource Sets or modifies properties Possible properties are: - ‘StorPoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `StorPoolNameDrbdMeta` - regex[`^|.internal|[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `DrbdMetaType` - enum * external * internal - `PrefNic` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Preferred network interface to use - `PeerSlots` - range DRBD peer slots present on resource - `FileSystem/Type` - enum File system type to use * ext4 * xfs - `FileSystem/MkfsParams` - string Additional parameters for the mkfs command - `NVMe/PrefNic` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Preferred network interface to use - `sys/fs/blkio_throttle_read` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - `sys/fs/blkio_throttle_write` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device
@param resource [String] resource to use @param node [String] node to use @param [Hash] opts the optional parameters @option opts [ResourceModify] :resource_modify @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3671 def resource_modify(resource, node, opts = {}) data, _status_code, _headers = resource_modify_with_http_info(resource, node, opts) data end
modify a resource Sets or modifies properties Possible properties are: - `StorPoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `StorPoolNameDrbdMeta` - regex[`^|.internal|[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `DrbdMetaType` - enum * external * internal - `PrefNic` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Preferred network interface to use - `PeerSlots` - range DRBD peer slots present on resource - `FileSystem/Type` - enum File system type to use * ext4 * xfs - `FileSystem/MkfsParams` - string Additional parameters for the mkfs command - `NVMe/PrefNic` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Preferred network interface to use - `sys/fs/blkio_throttle_read` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - `sys/fs/blkio_throttle_write` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device
@param resource [String] resource to use @param node [String] node to use @param [Hash] opts the optional parameters @option opts [ResourceModify] :resource_modify @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3683 def resource_modify_with_http_info(resource, node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_modify ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_modify" end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.resource_modify" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resources/{node}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node' + '}', CGI.escape(node.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'resource_modify']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_modify", :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: DevelopersApi#resource_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
create a snapshot Create a snapshot for a resource @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [Snapshot] :snapshot @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3746 def resource_snapshot_create(resource, opts = {}) data, _status_code, _headers = resource_snapshot_create_with_http_info(resource, opts) data end
create a snapshot Create a snapshot for a resource @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [Snapshot] :snapshot @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3757 def resource_snapshot_create_with_http_info(resource, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_snapshot_create ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_snapshot_create" end # resource path local_var_path = '/v1/resource-definitions/{resource}/snapshots'.sub('{' + 'resource' + '}', CGI.escape(resource.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'snapshot']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_snapshot_create", :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: DevelopersApi#resource_snapshot_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
delete a snapshot Delete a snapshot @param resource [String] resource to use @param snapshot [String] @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3816 def resource_snapshot_delete(resource, snapshot, opts = {}) data, _status_code, _headers = resource_snapshot_delete_with_http_info(resource, snapshot, opts) data end
delete a snapshot Delete a snapshot @param resource [String] resource to use @param snapshot [String] @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3827 def resource_snapshot_delete_with_http_info(resource, snapshot, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_snapshot_delete ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_snapshot_delete" end # verify the required parameter 'snapshot' is set if @api_client.config.client_side_validation && snapshot.nil? fail ArgumentError, "Missing the required parameter 'snapshot' when calling DevelopersApi.resource_snapshot_delete" end # resource path local_var_path = '/v1/resource-definitions/{resource}/snapshots/{snapshot}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'snapshot' + '}', CGI.escape(snapshot.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_snapshot_delete", :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: DevelopersApi#resource_snapshot_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
list a specific snapshot List the given snapshot for a resource @param resource [String] resource to use @param snapshot [String] @param [Hash] opts the optional parameters @return [Snapshot]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3885 def resource_snapshot_list(resource, snapshot, opts = {}) data, _status_code, _headers = resource_snapshot_list_with_http_info(resource, snapshot, opts) data end
list a specific snapshot List the given snapshot for a resource @param resource [String] resource to use @param snapshot [String] @param [Hash] opts the optional parameters @return [Array<(Snapshot
, Integer, Hash)>] Snapshot
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3896 def resource_snapshot_list_with_http_info(resource, snapshot, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_snapshot_list ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_snapshot_list" end # verify the required parameter 'snapshot' is set if @api_client.config.client_side_validation && snapshot.nil? fail ArgumentError, "Missing the required parameter 'snapshot' when calling DevelopersApi.resource_snapshot_list" end # resource path local_var_path = '/v1/resource-definitions/{resource}/snapshots/{snapshot}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'snapshot' + '}', CGI.escape(snapshot.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Snapshot' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_snapshot_list", :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: DevelopersApi#resource_snapshot_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
restore a snapshot Restore a snapshot to a new resource @param resource [String] resource to use @param snapshot [String] Snapshot
name to use @param [Hash] opts the optional parameters @option opts [SnapshotRestore] :snapshot_restore @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 3955 def resource_snapshot_restore(resource, snapshot, opts = {}) data, _status_code, _headers = resource_snapshot_restore_with_http_info(resource, snapshot, opts) data end
restore a snapshot Restore a snapshot to a new resource @param resource [String] resource to use @param snapshot [String] Snapshot
name to use @param [Hash] opts the optional parameters @option opts [SnapshotRestore] :snapshot_restore @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 3967 def resource_snapshot_restore_with_http_info(resource, snapshot, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_snapshot_restore ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_snapshot_restore" end # verify the required parameter 'snapshot' is set if @api_client.config.client_side_validation && snapshot.nil? fail ArgumentError, "Missing the required parameter 'snapshot' when calling DevelopersApi.resource_snapshot_restore" end # resource path local_var_path = '/v1/resource-definitions/{resource}/snapshot-restore-resource/{snapshot}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'snapshot' + '}', CGI.escape(snapshot.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'snapshot_restore']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_snapshot_restore", :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: DevelopersApi#resource_snapshot_restore\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
rollback a snapshot Rollback a resource to the snapshot state @param resource [String] resource to use @param snapshot [String] Snapshot
name to use @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4030 def resource_snapshot_rollback(resource, snapshot, opts = {}) data, _status_code, _headers = resource_snapshot_rollback_with_http_info(resource, snapshot, opts) data end
rollback a snapshot Rollback a resource to the snapshot state @param resource [String] resource to use @param snapshot [String] Snapshot
name to use @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4041 def resource_snapshot_rollback_with_http_info(resource, snapshot, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_snapshot_rollback ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_snapshot_rollback" end # verify the required parameter 'snapshot' is set if @api_client.config.client_side_validation && snapshot.nil? fail ArgumentError, "Missing the required parameter 'snapshot' when calling DevelopersApi.resource_snapshot_rollback" end # resource path local_var_path = '/v1/resource-definitions/{resource}/snapshot-rollback/{snapshot}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'snapshot' + '}', CGI.escape(snapshot.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_snapshot_rollback", :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: DevelopersApi#resource_snapshot_rollback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
list snapshots List snapshots for a resource @param resource [String] resource to use @param [Hash] opts the optional parameters @return [Array<Snapshot>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4098 def resource_snapshots_list(resource, opts = {}) data, _status_code, _headers = resource_snapshots_list_with_http_info(resource, opts) data end
list snapshots List snapshots for a resource @param resource [String] resource to use @param [Hash] opts the optional parameters @return [Array<(Array<Snapshot>, Integer, Hash)>] Array<Snapshot> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4108 def resource_snapshots_list_with_http_info(resource, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_snapshots_list ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_snapshots_list" end # resource path local_var_path = '/v1/resource-definitions/{resource}/snapshots'.sub('{' + 'resource' + '}', CGI.escape(resource.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Snapshot>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_snapshots_list", :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: DevelopersApi#resource_snapshots_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
restore a snapshot volume definition Restore a snapshot volume definition to a new resource @param resource [String] resource to use @param snapshot [String] Snapshot
name to use @param [Hash] opts the optional parameters @option opts [SnapshotRestore] :snapshot_restore @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4163 def resource_snapshots_restore_volume_definition(resource, snapshot, opts = {}) data, _status_code, _headers = resource_snapshots_restore_volume_definition_with_http_info(resource, snapshot, opts) data end
restore a snapshot volume definition Restore a snapshot volume definition to a new resource @param resource [String] resource to use @param snapshot [String] Snapshot
name to use @param [Hash] opts the optional parameters @option opts [SnapshotRestore] :snapshot_restore @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4175 def resource_snapshots_restore_volume_definition_with_http_info(resource, snapshot, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_snapshots_restore_volume_definition ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_snapshots_restore_volume_definition" end # verify the required parameter 'snapshot' is set if @api_client.config.client_side_validation && snapshot.nil? fail ArgumentError, "Missing the required parameter 'snapshot' when calling DevelopersApi.resource_snapshots_restore_volume_definition" end # resource path local_var_path = '/v1/resource-definitions/{resource}/snapshot-restore-volume-definition/{snapshot}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'snapshot' + '}', CGI.escape(snapshot.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'snapshot_restore']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_snapshots_restore_volume_definition", :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: DevelopersApi#resource_snapshots_restore_volume_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
toggle a resource to a diskful resource toggle a resource to a diskful resource using the default storage pool @param resource [String] resource to use @param node [String] node to use @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4238 def resource_toggle_diskful(resource, node, opts = {}) data, _status_code, _headers = resource_toggle_diskful_with_http_info(resource, node, opts) data end
toggle a resource to a diskful resource toggle a resource to a diskful resource @param resource [String] resource to use @param node [String] node to use @param storagepool [String] @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4308 def resource_toggle_diskful_storagepool(resource, node, storagepool, opts = {}) data, _status_code, _headers = resource_toggle_diskful_storagepool_with_http_info(resource, node, storagepool, opts) data end
toggle a resource to a diskful resource toggle a resource to a diskful resource @param resource [String] resource to use @param node [String] node to use @param storagepool [String] @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4320 def resource_toggle_diskful_storagepool_with_http_info(resource, node, storagepool, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_toggle_diskful_storagepool ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_toggle_diskful_storagepool" end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.resource_toggle_diskful_storagepool" end # verify the required parameter 'storagepool' is set if @api_client.config.client_side_validation && storagepool.nil? fail ArgumentError, "Missing the required parameter 'storagepool' when calling DevelopersApi.resource_toggle_diskful_storagepool" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resources/{node}/toggle-disk/diskful/{storagepool}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node' + '}', CGI.escape(node.to_s)).sub('{' + 'storagepool' + '}', CGI.escape(storagepool.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_toggle_diskful_storagepool", :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: DevelopersApi#resource_toggle_diskful_storagepool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
toggle a resource to a diskful resource toggle a resource to a diskful resource using the default storage pool @param resource [String] resource to use @param node [String] node to use @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4249 def resource_toggle_diskful_with_http_info(resource, node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_toggle_diskful ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_toggle_diskful" end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.resource_toggle_diskful" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resources/{node}/toggle-disk/diskful'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node' + '}', CGI.escape(node.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_toggle_diskful", :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: DevelopersApi#resource_toggle_diskful\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
toggle a resource to diskless toggle a resource to a diskless resource @param resource [String] resource to use @param node [String] node to use @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4382 def resource_toggle_diskless(resource, node, opts = {}) data, _status_code, _headers = resource_toggle_diskless_with_http_info(resource, node, opts) data end
toggle a resource to diskless resource toggle a resource to a diskless. @param resource [String] resource to use @param node [String] node to use @param disklesspool [String] @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4452 def resource_toggle_diskless_disklesspool(resource, node, disklesspool, opts = {}) data, _status_code, _headers = resource_toggle_diskless_disklesspool_with_http_info(resource, node, disklesspool, opts) data end
toggle a resource to diskless resource toggle a resource to a diskless. @param resource [String] resource to use @param node [String] node to use @param disklesspool [String] @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4464 def resource_toggle_diskless_disklesspool_with_http_info(resource, node, disklesspool, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_toggle_diskless_disklesspool ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_toggle_diskless_disklesspool" end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.resource_toggle_diskless_disklesspool" end # verify the required parameter 'disklesspool' is set if @api_client.config.client_side_validation && disklesspool.nil? fail ArgumentError, "Missing the required parameter 'disklesspool' when calling DevelopersApi.resource_toggle_diskless_disklesspool" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resources/{node}/toggle-disk/diskless/{disklesspool}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node' + '}', CGI.escape(node.to_s)).sub('{' + 'disklesspool' + '}', CGI.escape(disklesspool.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_toggle_diskless_disklesspool", :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: DevelopersApi#resource_toggle_diskless_disklesspool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
toggle a resource to diskless toggle a resource to a diskless resource @param resource [String] resource to use @param node [String] node to use @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4393 def resource_toggle_diskless_with_http_info(resource, node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_toggle_diskless ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_toggle_diskless" end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.resource_toggle_diskless" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resources/{node}/toggle-disk/diskless'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node' + '}', CGI.escape(node.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_toggle_diskless", :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: DevelopersApi#resource_toggle_diskless\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists all volumes of a resources Lists all volumes for a resource-definition. A single volume can be queried by adding its volume number to the resource string like: /v1/resource-definitions/rsc1/resources/nodeA/volumes/0 @param resource [String] resource to use @param node [String] node to use @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<Volume>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4528 def resource_volume_list(resource, node, opts = {}) data, _status_code, _headers = resource_volume_list_with_http_info(resource, node, opts) data end
lists all volumes of a resources Lists all volumes for a resource-definition. A single volume can be queried by adding its volume number to the resource string like: /v1/resource-definitions/rsc1/resources/nodeA/volumes/0 @param resource [String] resource to use @param node [String] node to use @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<Volume>, Integer, Hash)>] Array<Volume> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4541 def resource_volume_list_with_http_info(resource, node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_volume_list ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_volume_list" end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.resource_volume_list" end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.resource_volume_list, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.resource_volume_list, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.resource_volume_list, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/resource-definitions/{resource}/resources/{node}/volumes'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node' + '}', CGI.escape(node.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Volume>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.resource_volume_list", :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: DevelopersApi#resource_volume_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modify a storage pool definition Sets or modifies properties Possible properties are: - ‘MaxOversubscriptionRatio` - range @param storagepool [String] @param [Hash] opts the optional parameters @option opts [StoragePoolDefinitionModify] :storage_pool_definition_modify @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4613 def stor_pool_dfn_modify(storagepool, opts = {}) data, _status_code, _headers = stor_pool_dfn_modify_with_http_info(storagepool, opts) data end
modify a storage pool definition Sets or modifies properties Possible properties are: - `MaxOversubscriptionRatio` - range @param storagepool [String] @param [Hash] opts the optional parameters @option opts [StoragePoolDefinitionModify] :storage_pool_definition_modify @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4624 def stor_pool_dfn_modify_with_http_info(storagepool, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.stor_pool_dfn_modify ...' end # verify the required parameter 'storagepool' is set if @api_client.config.client_side_validation && storagepool.nil? fail ArgumentError, "Missing the required parameter 'storagepool' when calling DevelopersApi.stor_pool_dfn_modify" end # resource path local_var_path = '/v1/storage-pool-definitions/{storagepool}'.sub('{' + 'storagepool' + '}', CGI.escape(storagepool.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'storage_pool_definition_modify']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.stor_pool_dfn_modify", :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: DevelopersApi#stor_pool_dfn_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
delete a storage pool definition Delete a storage pool definition from Linstor @param storagepool [String] @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4682 def storage_pool_definition_delete(storagepool, opts = {}) data, _status_code, _headers = storage_pool_definition_delete_with_http_info(storagepool, opts) data end
delete a storage pool definition Delete a storage pool definition from Linstor @param storagepool [String] @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4692 def storage_pool_definition_delete_with_http_info(storagepool, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.storage_pool_definition_delete ...' end # verify the required parameter 'storagepool' is set if @api_client.config.client_side_validation && storagepool.nil? fail ArgumentError, "Missing the required parameter 'storagepool' when calling DevelopersApi.storage_pool_definition_delete" end # resource path local_var_path = '/v1/storage-pool-definitions/{storagepool}'.sub('{' + 'storagepool' + '}', CGI.escape(storagepool.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.storage_pool_definition_delete", :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: DevelopersApi#storage_pool_definition_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
add a storage pool definition to Linstor Adds a storage pool definition to Linstor @param [Hash] opts the optional parameters @option opts [StoragePoolDefinition] :storage_pool_definition Storage pool definition to add @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4745 def storage_pool_dfn_add(opts = {}) data, _status_code, _headers = storage_pool_dfn_add_with_http_info(opts) data end
add a storage pool definition to Linstor Adds a storage pool definition to Linstor @param [Hash] opts the optional parameters @option opts [StoragePoolDefinition] :storage_pool_definition Storage pool definition to add @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4755 def storage_pool_dfn_add_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.storage_pool_dfn_add ...' end # resource path local_var_path = '/v1/storage-pool-definitions' # 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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'storage_pool_definition']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.storage_pool_dfn_add", :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: DevelopersApi#storage_pool_dfn_add\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Lists a specific storage pool definition Returns a specific storage pool definition @param storagepool [String] @param [Hash] opts the optional parameters @return [StoragePoolDefinition]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4809 def storage_pool_dfn_get(storagepool, opts = {}) data, _status_code, _headers = storage_pool_dfn_get_with_http_info(storagepool, opts) data end
Lists a specific storage pool definition Returns a specific storage pool definition @param storagepool [String] @param [Hash] opts the optional parameters @return [Array<(StoragePoolDefinition
, Integer, Hash)>] StoragePoolDefinition
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4819 def storage_pool_dfn_get_with_http_info(storagepool, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.storage_pool_dfn_get ...' end # verify the required parameter 'storagepool' is set if @api_client.config.client_side_validation && storagepool.nil? fail ArgumentError, "Missing the required parameter 'storagepool' when calling DevelopersApi.storage_pool_dfn_get" end # resource path local_var_path = '/v1/storage-pool-definitions/{storagepool}'.sub('{' + 'storagepool' + '}', CGI.escape(storagepool.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'StoragePoolDefinition' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.storage_pool_dfn_get", :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: DevelopersApi#storage_pool_dfn_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Lists storage pool definitions Returns an array of all storage pool definitions @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<StoragePoolDefinition>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4873 def storage_pool_dfn_list(opts = {}) data, _status_code, _headers = storage_pool_dfn_list_with_http_info(opts) data end
Lists storage pool definitions Returns an array of all storage pool definitions @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<StoragePoolDefinition>, Integer, Hash)>] Array<StoragePoolDefinition> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4884 def storage_pool_dfn_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.storage_pool_dfn_list ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.storage_pool_dfn_list, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.storage_pool_dfn_list, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.storage_pool_dfn_list, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/storage-pool-definitions' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<StoragePoolDefinition>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.storage_pool_dfn_list", :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: DevelopersApi#storage_pool_dfn_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
show physical storage on nodes, to be used with LINSTOR Gives a grouped list of physical storage that can be turned into a LINSTOR storage-pool @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<PhysicalStorage>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 4948 def view_physica_storage(opts = {}) data, _status_code, _headers = view_physica_storage_with_http_info(opts) data end
show physical storage on nodes, to be used with LINSTOR Gives a grouped list of physical storage that can be turned into a LINSTOR storage-pool @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<PhysicalStorage>, Integer, Hash)>] Array<PhysicalStorage> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 4959 def view_physica_storage_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.view_physica_storage ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.view_physica_storage, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.view_physica_storage, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.view_physica_storage, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/physical-storage' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<PhysicalStorage>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.view_physica_storage", :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: DevelopersApi#view_physica_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
query all resources with their volumes This REST-resource should be used if you want to get an overview of all resources with their volumes. @param [Hash] opts the optional parameters @option opts [Array<String>] :nodes Filter only for the specified nodes, if not specified no filtering. @option opts [Array<String>] :storage_pools Filter only for the specified storage pools, if not specified no filtering. @option opts [Array<String>] :resources Filter only for the specified resources, if not specified no filtering. @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<ResourceWithVolumes>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 5026 def view_resources(opts = {}) data, _status_code, _headers = view_resources_with_http_info(opts) data end
query all resources with their volumes This REST-resource should be used if you want to get an overview of all resources with their volumes. @param [Hash] opts the optional parameters @option opts [Array<String>] :nodes Filter only for the specified nodes, if not specified no filtering. @option opts [Array<String>] :storage_pools Filter only for the specified storage pools, if not specified no filtering. @option opts [Array<String>] :resources Filter only for the specified resources, if not specified no filtering. @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<ResourceWithVolumes>, Integer, Hash)>] Array<ResourceWithVolumes> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 5040 def view_resources_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.view_resources ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.view_resources, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.view_resources, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.view_resources, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/view/resources' # query parameters query_params = opts[:query_params] || {} query_params[:'nodes'] = @api_client.build_collection_param(opts[:'nodes'], :multi) if !opts[:'nodes'].nil? query_params[:'storage_pools'] = @api_client.build_collection_param(opts[:'storage_pools'], :multi) if !opts[:'storage_pools'].nil? query_params[:'resources'] = @api_client.build_collection_param(opts[:'resources'], :multi) if !opts[:'resources'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ResourceWithVolumes>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.view_resources", :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: DevelopersApi#view_resources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
query all storage pools This REST-resource should be used if you want to get an overview of all storage pools. @param [Hash] opts the optional parameters @option opts [Array<String>] :nodes Filter only for the specified nodes, if not specified no filtering. @option opts [Array<String>] :storage_pools Filter only for the specified storage pools, if not specified no filtering. @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<StoragePool>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 5109 def view_storage_pools(opts = {}) data, _status_code, _headers = view_storage_pools_with_http_info(opts) data end
query all storage pools This REST-resource should be used if you want to get an overview of all storage pools. @param [Hash] opts the optional parameters @option opts [Array<String>] :nodes Filter only for the specified nodes, if not specified no filtering. @option opts [Array<String>] :storage_pools Filter only for the specified storage pools, if not specified no filtering. @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<StoragePool>, Integer, Hash)>] Array<StoragePool> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 5122 def view_storage_pools_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.view_storage_pools ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.view_storage_pools, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.view_storage_pools, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.view_storage_pools, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/view/storage-pools' # query parameters query_params = opts[:query_params] || {} query_params[:'nodes'] = @api_client.build_collection_param(opts[:'nodes'], :multi) if !opts[:'nodes'].nil? query_params[:'storage_pools'] = @api_client.build_collection_param(opts[:'storage_pools'], :multi) if !opts[:'storage_pools'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<StoragePool>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.view_storage_pools", :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: DevelopersApi#view_storage_pools\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
add a volume-definition to a resource Adds a volume-definition. Required properties is only ‘size`, all other will be auto generated if not given. @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [VolumeDefinitionCreate] :volume_definition_create @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 5188 def volume_definition_create(resource, opts = {}) data, _status_code, _headers = volume_definition_create_with_http_info(resource, opts) data end
add a volume-definition to a resource Adds a volume-definition. Required properties is only `size`, all other will be auto generated if not given. @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [VolumeDefinitionCreate] :volume_definition_create @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 5199 def volume_definition_create_with_http_info(resource, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.volume_definition_create ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.volume_definition_create" end # resource path local_var_path = '/v1/resource-definitions/{resource}/volume-definitions'.sub('{' + 'resource' + '}', CGI.escape(resource.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'volume_definition_create']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.volume_definition_create", :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: DevelopersApi#volume_definition_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
delete a volume-definition Delete a volume-definition @param resource [String] resource to use @param volume_number [Integer] @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 5258 def volume_definition_delete(resource, volume_number, opts = {}) data, _status_code, _headers = volume_definition_delete_with_http_info(resource, volume_number, opts) data end
delete a volume-definition Delete a volume-definition @param resource [String] resource to use @param volume_number [Integer] @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 5269 def volume_definition_delete_with_http_info(resource, volume_number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.volume_definition_delete ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.volume_definition_delete" end # verify the required parameter 'volume_number' is set if @api_client.config.client_side_validation && volume_number.nil? fail ArgumentError, "Missing the required parameter 'volume_number' when calling DevelopersApi.volume_definition_delete" end # resource path local_var_path = '/v1/resource-definitions/{resource}/volume-definitions/{volume_number}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'volume_number' + '}', CGI.escape(volume_number.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.volume_definition_delete", :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: DevelopersApi#volume_definition_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists all volume-definitions Lists all volume definitions. A single volume definition can be queried by adding its name to the resource string like: /v1/resource-definitions/rsc1/volume-definitions/0 @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<VolumeDefinition>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 5328 def volume_definition_list(resource, opts = {}) data, _status_code, _headers = volume_definition_list_with_http_info(resource, opts) data end
lists all volume-definitions Lists all volume definitions. A single volume definition can be queried by adding its name to the resource string like: /v1/resource-definitions/rsc1/volume-definitions/0 @param resource [String] resource to use @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<VolumeDefinition>, Integer, Hash)>] Array<VolumeDefinition> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 5340 def volume_definition_list_with_http_info(resource, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.volume_definition_list ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.volume_definition_list" end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.volume_definition_list, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.volume_definition_list, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.volume_definition_list, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/resource-definitions/{resource}/volume-definitions'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<VolumeDefinition>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.volume_definition_list", :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: DevelopersApi#volume_definition_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modify a volume-definition Sets or modifies properties Possible properties are: - ‘StorPoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `StorPoolNameDrbdMeta` - regex[`^|.internal|[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `DrbdMetaType` - enum * external * internal - `OverrideVlmId` - regex Overwrites the generated ’<resource-name>_<5 digit volume number>‘ volume name for migration purposes - `AllowLargerVolumeSize` - boolean_true_false Do not fail when the underlying volume is larger than expected - `FileSystem/Type` - enum File system type to use * ext4 * xfs - `FileSystem/MkfsParams` - string Additional parameters for the mkfs command - `StorDriver/LvcreateType` - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - `DrbdCurrentGi` - regex[`{16}`] - `sys/fs/blkio_throttle_read` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - `sys/fs/blkio_throttle_write` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device - `Writecache/PoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name for writecache - `Writecache/Size` - regex[`^100%|{1,2}([.][0-9]*)?%|[0-9]{2,}$`] Size of the writecache in % (0-100) or KiB otherwise - `Writecache/Blocksize` - long 4096 is recommended; the maximum block size is the page size - `Writecache/Options/StartSector` - long offset from the start of cache device in 512-byte sectors - `Writecache/Options/HighWatermark` - long start writeback when the number of used blocks reach this watermark - `Writecache/Options/LowWatermark` - long stop writeback when the number of used blocks drops below this watermark - `Writecache/Options/WritebackJobs` - long limit the number of blocks that are in flight during writeback. Setting this value reduces writeback throughput, but it may improve latency of read requests - `Writecache/Options/AutocommitBlocks` - long when the application writes this amount of blocks without issuing the FLUSH request, the blocks are automatically commited - `Writecache/Options/AutocommitTime` - long autocommit time in milliseconds. The data is automatically commited if this time passes and no FLUSH request is received - `Writecache/Options/Fua` - enum "On" results in "fua" as argument, whereas the value "Off" results in "nofua" argument * On * Off - `Writecache/Options/Additional` - string Additional arguments passed through - `DrbdOptions/Disk/read-balancing` - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - `DrbdOptions/Disk/on-io-error` - enum * pass_on * call-local-io-error * detach - `DrbdOptions/Disk/disk-drain` - boolean - `DrbdOptions/Disk/resync-after` - string - `DrbdOptions/Disk/disk-timeout` - range - `DrbdOptions/Disk/disable-write-same` - boolean - `DrbdOptions/Disk/rs-discard-granularity` - range - `DrbdOptions/Disk/disk-flushes` - boolean - `DrbdOptions/Disk/al-extents` - range - `DrbdOptions/Disk/al-updates` - boolean - `DrbdOptions/Disk/md-flushes` - boolean - `DrbdOptions/Disk/disk-barrier` - boolean - `DrbdOptions/Disk/discard-zeroes-if-aligned` - boolean @param resource [String] resource to use @param volume_number [Integer] @param [Hash] opts the optional parameters @option opts [VolumeDefinitionModify] :volume_definition_modify @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 5409 def volume_definition_modify(resource, volume_number, opts = {}) data, _status_code, _headers = volume_definition_modify_with_http_info(resource, volume_number, opts) data end
modify a volume-definition Sets or modifies properties Possible properties are: - `StorPoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `StorPoolNameDrbdMeta` - regex[`^|.internal|[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `DrbdMetaType` - enum * external * internal - `OverrideVlmId` - regex Overwrites the generated '<resource-name>_<5 digit volume number>' volume name for migration purposes - `AllowLargerVolumeSize` - boolean_true_false Do not fail when the underlying volume is larger than expected - `FileSystem/Type` - enum File system type to use * ext4 * xfs - `FileSystem/MkfsParams` - string Additional parameters for the mkfs command - `StorDriver/LvcreateType` - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - `DrbdCurrentGi` - regex[`{16}`] - `sys/fs/blkio_throttle_read` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - `sys/fs/blkio_throttle_write` - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device - `Writecache/PoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name for writecache - `Writecache/Size` - regex[`^100%|{1,2}([.][0-9]*)?%|[0-9]{2,}$`] Size of the writecache in % (0-100) or KiB otherwise - `Writecache/Blocksize` - long 4096 is recommended; the maximum block size is the page size - `Writecache/Options/StartSector` - long offset from the start of cache device in 512-byte sectors - `Writecache/Options/HighWatermark` - long start writeback when the number of used blocks reach this watermark - `Writecache/Options/LowWatermark` - long stop writeback when the number of used blocks drops below this watermark - `Writecache/Options/WritebackJobs` - long limit the number of blocks that are in flight during writeback. Setting this value reduces writeback throughput, but it may improve latency of read requests - `Writecache/Options/AutocommitBlocks` - long when the application writes this amount of blocks without issuing the FLUSH request, the blocks are automatically commited - `Writecache/Options/AutocommitTime` - long autocommit time in milliseconds. The data is automatically commited if this time passes and no FLUSH request is received - `Writecache/Options/Fua` - enum "On" results in "fua" as argument, whereas the value "Off" results in "nofua" argument * On * Off - `Writecache/Options/Additional` - string Additional arguments passed through - `DrbdOptions/Disk/read-balancing` - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - `DrbdOptions/Disk/on-io-error` - enum * pass_on * call-local-io-error * detach - `DrbdOptions/Disk/disk-drain` - boolean - `DrbdOptions/Disk/resync-after` - string - `DrbdOptions/Disk/disk-timeout` - range - `DrbdOptions/Disk/disable-write-same` - boolean - `DrbdOptions/Disk/rs-discard-granularity` - range - `DrbdOptions/Disk/disk-flushes` - boolean - `DrbdOptions/Disk/al-extents` - range - `DrbdOptions/Disk/al-updates` - boolean - `DrbdOptions/Disk/md-flushes` - boolean - `DrbdOptions/Disk/disk-barrier` - boolean - `DrbdOptions/Disk/discard-zeroes-if-aligned` - boolean @param resource [String] resource to use @param volume_number [Integer] @param [Hash] opts the optional parameters @option opts [VolumeDefinitionModify] :volume_definition_modify @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 5421 def volume_definition_modify_with_http_info(resource, volume_number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.volume_definition_modify ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.volume_definition_modify" end # verify the required parameter 'volume_number' is set if @api_client.config.client_side_validation && volume_number.nil? fail ArgumentError, "Missing the required parameter 'volume_number' when calling DevelopersApi.volume_definition_modify" end # resource path local_var_path = '/v1/resource-definitions/{resource}/volume-definitions/{volume_number}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'volume_number' + '}', CGI.escape(volume_number.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'volume_definition_modify']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.volume_definition_modify", :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: DevelopersApi#volume_definition_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
add a volume-group to a resource-group Adds a volume-group. @param resource_group [String] resource group to use @param [Hash] opts the optional parameters @option opts [VolumeGroup] :volume_group @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 5484 def volume_group_create(resource_group, opts = {}) data, _status_code, _headers = volume_group_create_with_http_info(resource_group, opts) data end
add a volume-group to a resource-group Adds a volume-group. @param resource_group [String] resource group to use @param [Hash] opts the optional parameters @option opts [VolumeGroup] :volume_group @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 5495 def volume_group_create_with_http_info(resource_group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.volume_group_create ...' end # verify the required parameter 'resource_group' is set if @api_client.config.client_side_validation && resource_group.nil? fail ArgumentError, "Missing the required parameter 'resource_group' when calling DevelopersApi.volume_group_create" end # resource path local_var_path = '/v1/resource-groups/{resource_group}/volume-groups'.sub('{' + 'resource_group' + '}', CGI.escape(resource_group.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'volume_group']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.volume_group_create", :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: DevelopersApi#volume_group_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
delete a volume-group Delete a volume-group @param resource_group [String] resource group to use @param volume_number [Integer] @param [Hash] opts the optional parameters @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 5554 def volume_group_delete(resource_group, volume_number, opts = {}) data, _status_code, _headers = volume_group_delete_with_http_info(resource_group, volume_number, opts) data end
delete a volume-group Delete a volume-group @param resource_group [String] resource group to use @param volume_number [Integer] @param [Hash] opts the optional parameters @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 5565 def volume_group_delete_with_http_info(resource_group, volume_number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.volume_group_delete ...' end # verify the required parameter 'resource_group' is set if @api_client.config.client_side_validation && resource_group.nil? fail ArgumentError, "Missing the required parameter 'resource_group' when calling DevelopersApi.volume_group_delete" end # verify the required parameter 'volume_number' is set if @api_client.config.client_side_validation && volume_number.nil? fail ArgumentError, "Missing the required parameter 'volume_number' when calling DevelopersApi.volume_group_delete" end # resource path local_var_path = '/v1/resource-groups/{resource_group}/volume-groups/{volume_number}'.sub('{' + 'resource_group' + '}', CGI.escape(resource_group.to_s)).sub('{' + 'volume_number' + '}', CGI.escape(volume_number.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.volume_group_delete", :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: DevelopersApi#volume_group_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
lists all volume-groups Lists all volume groups. A single volume group can be queried by adding its name to the resource string like: /v1/resource-groups/rscgrp1/volume-groups/0 @param resource_group [String] resource group to use @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<VolumeGroup>]
# File lib/ruby-linstor-client/api/developers_api.rb, line 5624 def volume_group_list(resource_group, opts = {}) data, _status_code, _headers = volume_group_list_with_http_info(resource_group, opts) data end
lists all volume-groups Lists all volume groups. A single volume group can be queried by adding its name to the resource string like: /v1/resource-groups/rscgrp1/volume-groups/0 @param resource_group [String] resource group to use @param [Hash] opts the optional parameters @option opts [Integer] :offset number of records to skip for pagination @option opts [Integer] :limit maximum number of records to return @return [Array<(Array<VolumeGroup>, Integer, Hash)>] Array<VolumeGroup> data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 5636 def volume_group_list_with_http_info(resource_group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.volume_group_list ...' end # verify the required parameter 'resource_group' is set if @api_client.config.client_side_validation && resource_group.nil? fail ArgumentError, "Missing the required parameter 'resource_group' when calling DevelopersApi.volume_group_list" end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DevelopersApi.volume_group_list, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.volume_group_list, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DevelopersApi.volume_group_list, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/resource-groups/{resource_group}/volume-groups'.sub('{' + 'resource_group' + '}', CGI.escape(resource_group.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<VolumeGroup>' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.volume_group_list", :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: DevelopersApi#volume_group_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modify a resource-group Sets or modifies properties Possible properties are: - ‘StorPoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `OverrideVlmId` - regex Overwrites the generated ’<resource-name>_<5 digit volume number>‘ volume name for migration purposes - `AllowLargerVolumeSize` - boolean_true_false Do not fail when the underlying volume is larger than expected - `FileSystem/Type` - enum File system type to use * ext4 * xfs - `FileSystem/MkfsParams` - string Additional parameters for the mkfs command - `StorDriver/LvcreateType` - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - `DrbdCurrentGi` - regex[`{16}`] - `DrbdOptions/Disk/read-balancing` - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - `DrbdOptions/Disk/on-io-error` - enum * pass_on * call-local-io-error * detach - `DrbdOptions/Disk/disk-drain` - boolean - `DrbdOptions/Disk/resync-after` - string - `DrbdOptions/Disk/disk-timeout` - range - `DrbdOptions/Disk/disable-write-same` - boolean - `DrbdOptions/Disk/rs-discard-granularity` - range - `DrbdOptions/Disk/disk-flushes` - boolean - `DrbdOptions/Disk/al-extents` - range - `DrbdOptions/Disk/al-updates` - boolean - `DrbdOptions/Disk/md-flushes` - boolean - `DrbdOptions/Disk/disk-barrier` - boolean - `DrbdOptions/Disk/discard-zeroes-if-aligned` - boolean @param resource_group [String] resource group to use @param volume_number [Integer] @param [Hash] opts the optional parameters @option opts [VolumeGroupModify] :volume_group_modify @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 5705 def volume_group_modify(resource_group, volume_number, opts = {}) data, _status_code, _headers = volume_group_modify_with_http_info(resource_group, volume_number, opts) data end
modify a resource-group Sets or modifies properties Possible properties are: - `StorPoolName` - regex[`^[a-zA-Z0-9_-]{2,47}$`] Linstor storage pool name to use. - `OverrideVlmId` - regex Overwrites the generated '<resource-name>_<5 digit volume number>' volume name for migration purposes - `AllowLargerVolumeSize` - boolean_true_false Do not fail when the underlying volume is larger than expected - `FileSystem/Type` - enum File system type to use * ext4 * xfs - `FileSystem/MkfsParams` - string Additional parameters for the mkfs command - `StorDriver/LvcreateType` - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - `DrbdCurrentGi` - regex[`{16}`] - `DrbdOptions/Disk/read-balancing` - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - `DrbdOptions/Disk/on-io-error` - enum * pass_on * call-local-io-error * detach - `DrbdOptions/Disk/disk-drain` - boolean - `DrbdOptions/Disk/resync-after` - string - `DrbdOptions/Disk/disk-timeout` - range - `DrbdOptions/Disk/disable-write-same` - boolean - `DrbdOptions/Disk/rs-discard-granularity` - range - `DrbdOptions/Disk/disk-flushes` - boolean - `DrbdOptions/Disk/al-extents` - range - `DrbdOptions/Disk/al-updates` - boolean - `DrbdOptions/Disk/md-flushes` - boolean - `DrbdOptions/Disk/disk-barrier` - boolean - `DrbdOptions/Disk/discard-zeroes-if-aligned` - boolean @param resource_group [String] resource group to use @param volume_number [Integer] @param [Hash] opts the optional parameters @option opts [VolumeGroupModify] :volume_group_modify @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 5717 def volume_group_modify_with_http_info(resource_group, volume_number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.volume_group_modify ...' end # verify the required parameter 'resource_group' is set if @api_client.config.client_side_validation && resource_group.nil? fail ArgumentError, "Missing the required parameter 'resource_group' when calling DevelopersApi.volume_group_modify" end # verify the required parameter 'volume_number' is set if @api_client.config.client_side_validation && volume_number.nil? fail ArgumentError, "Missing the required parameter 'volume_number' when calling DevelopersApi.volume_group_modify" end # resource path local_var_path = '/v1/resource-groups/{resource_group}/volume-groups/{volume_number}'.sub('{' + 'resource_group' + '}', CGI.escape(resource_group.to_s)).sub('{' + 'volume_number' + '}', CGI.escape(volume_number.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'volume_group_modify']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.volume_group_modify", :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: DevelopersApi#volume_group_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
modify a volume Sets or modifies properties Possible properties are: - ‘sys/fs/blkio_throttle_read` - number - `sys/fs/blkio_throttle_write` - number @param resource [String] resource to use @param node [String] node to use @param volume_number [Integer] @param [Hash] opts the optional parameters @option opts [VolumeModify] :volume_modify @return [ApiCallRc]
# File lib/ruby-linstor-client/api/developers_api.rb, line 5782 def volume_modify(resource, node, volume_number, opts = {}) data, _status_code, _headers = volume_modify_with_http_info(resource, node, volume_number, opts) data end
modify a volume Sets or modifies properties Possible properties are: - `sys/fs/blkio_throttle_read` - number - `sys/fs/blkio_throttle_write` - number @param resource [String] resource to use @param node [String] node to use @param volume_number [Integer] @param [Hash] opts the optional parameters @option opts [VolumeModify] :volume_modify @return [Array<(ApiCallRc
, Integer, Hash)>] ApiCallRc
data, response status code and response headers
# File lib/ruby-linstor-client/api/developers_api.rb, line 5795 def volume_modify_with_http_info(resource, node, volume_number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DevelopersApi.volume_modify ...' end # verify the required parameter 'resource' is set if @api_client.config.client_side_validation && resource.nil? fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.volume_modify" end # verify the required parameter 'node' is set if @api_client.config.client_side_validation && node.nil? fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.volume_modify" end # verify the required parameter 'volume_number' is set if @api_client.config.client_side_validation && volume_number.nil? fail ArgumentError, "Missing the required parameter 'volume_number' when calling DevelopersApi.volume_modify" end # resource path local_var_path = '/v1/resource-definitions/{resource}/resources/{node}/volumes/{volume_number}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node' + '}', CGI.escape(node.to_s)).sub('{' + 'volume_number' + '}', CGI.escape(volume_number.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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'volume_modify']) # return_type return_type = opts[:debug_return_type] || 'ApiCallRc' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( :operation => :"DevelopersApi.volume_modify", :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: DevelopersApi#volume_modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end