Class: LinstorClient::DevelopersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-linstor-client/api/developers_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DevelopersApi



19
20
21
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#controller_property_delete(key, opts = {}) ⇒ ApiCallRc

Deletes a controller property Delete a controller property



27
28
29
30
# 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

#controller_property_delete_with_http_info(key, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

Deletes a controller property Delete a controller property



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# 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

#controller_property_list(opts = {}) ⇒ Hash<String, String>

lists all controller properties Lists all controller properties.



89
90
91
92
# 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

#controller_property_list_with_http_info(opts = {}) ⇒ Array<(Hash<String, String>, Integer, Hash)>

lists all controller properties Lists all controller properties.



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# 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

#controller_property_modify(opts = {}) ⇒ ApiCallRc

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[1-31] 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[1-65535] 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[1-65535] - NVMe/PrefNic - regex[‘^[a-zA-Z0-9_-]2,47$`] Preferred network interface to use - StorDriver/WaitTimeoutAfterCreate - regex[[0-9]+] - 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[0-6000] - DrbdOptions/Disk/disable-write-same - boolean - DrbdOptions/Disk/rs-discard-granularity - range[0-1048576] - DrbdOptions/Disk/disk-flushes - boolean - DrbdOptions/Disk/al-extents - range[67-65534] - 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[0-1048576] - DrbdOptions/PeerDevice/c-max-rate - range[250-4194304] - DrbdOptions/PeerDevice/resync-rate - range[1-8388608] - DrbdOptions/PeerDevice/c-delay-target - range[1-100] - DrbdOptions/PeerDevice/c-min-rate - range[0-4194304] - DrbdOptions/PeerDevice/bitmap - boolean - DrbdOptions/PeerDevice/c-plan-ahead - range[0-300] - DrbdOptions/Resource/peer-ack-delay - range[1-10000] - DrbdOptions/Resource/quorum-minimum-redundancy - enum [1-32] * off * majority * all - DrbdOptions/Resource/max-io-depth - range[4-4294967295] - DrbdOptions/Resource/auto-promote-timeout - range[0-600] - 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[50-600] - DrbdOptions/Resource/twopc-retry-timeout - range[1-50] - DrbdOptions/Resource/peer-ack-window - range[2048-204800] - DrbdOptions/Resource/on-no-quorum - enum * io-error * suspend-io - DrbdOptions/Net/max-epoch-size - range[1-20000] - 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[0-200] - DrbdOptions/Net/data-integrity-alg - string - DrbdOptions/Net/ping-timeout - range[1-300] - DrbdOptions/Net/sndbuf-size - range[0-10485760] - DrbdOptions/Net/transport - string - DrbdOptions/Net/rcvbuf-size - range[0-10485760] - DrbdOptions/Net/max-buffers - range[32-131072] - 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[67-65534] - DrbdOptions/Net/on-congestion - enum * block * pull-ahead * disconnect - DrbdOptions/Net/ping-int - range[1-120] - 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[0-300] - DrbdOptions/Net/congestion-fill - range[0-20971520] - DrbdOptions/Net/cram-hmac-alg - string - DrbdOptions/Net/verify-alg - string - DrbdOptions/Net/shared-secret - string - DrbdOptions/Net/connect-int - range[1-120] - DrbdOptions/Net/timeout - range[1-600] - 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

Options Hash (opts):



147
148
149
150
# 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

#controller_property_modify_with_http_info(opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

sets or modifies controller properties Sets or modifies properties Possible properties are: - &#x60;TcpPortAutoRange&#x60; - regex[&#x60;-[0-9]&#x60;] Range for auto-allocation of resource TCP ports - &#x60;MinorNrAutoRange&#x60; - regex[&#x60;-[0-9]&#x60;] Range for auto-allocation of volume minor numbers - &#x60;PeerSlotsNewResource&#x60; - 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 - &#x60;StorDriver/DMStats&#x60; - boolean_true_false Enable dmstats on lvm create - &#x60;GlobSeqApiCalls&#x60; - boolean_true_false Globally sequentialize all ctrl -&gt; stlt api calls - &#x60;REST/bindAddress&#x60; - string Bind address of the REST API - &#x60;REST/port&#x60; - range TCP Port of the REST API - &#x60;REST/enabled&#x60; - boolean_true_false Bool if REST API should be enabled - &#x60;NVMe/enabled&#x60; - enum * rdma * tcp - &#x60;NVMe/enabled&#x60; - range - &#x60;NVMe/PrefNic&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Preferred network interface to use - &#x60;StorDriver/WaitTimeoutAfterCreate&#x60; - regex[&#x60;+&#x60;] - &#x60;sys/fs/blkio_throttle_read&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - &#x60;sys/fs/blkio_throttle_write&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device - &#x60;SearchDomain&#x60; - string Search domain node names, if no FQDN is given. - &#x60;ExtCmdWaitTimeout&#x60; - long Wait timeout for an external command in milliseconds - &#x60;DrbdOptions/auto-quorum&#x60; - enum Enables automatic setting of the &#39;quroum&#39; and &#39;on-no-quroum&#39; property * io-error * suspend-io * disabled - &#x60;DrbdOptions/auto-add-quorum-tiebreaker&#x60; - boolean_true_false Enables automatic management (creation and deletion) of tie breaking resource - &#x60;Writecache/PoolName&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name for writecache - &#x60;Writecache/Size&#x60; - regex[&#x60;^100%|1,2([.][0-9]*)?%|[0-9]2,$&#x60;] Size of the writecache in % (0-100) or KiB otherwise - &#x60;Writecache/Blocksize&#x60; - long 4096 is recommended; the maximum block size is the page size - &#x60;Writecache/Options/StartSector&#x60; - long offset from the start of cache device in 512-byte sectors - &#x60;Writecache/Options/HighWatermark&#x60; - long start writeback when the number of used blocks reach this watermark - &#x60;Writecache/Options/LowWatermark&#x60; - long stop writeback when the number of used blocks drops below this watermark - &#x60;Writecache/Options/WritebackJobs&#x60; - 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 - &#x60;Writecache/Options/AutocommitBlocks&#x60; - long when the application writes this amount of blocks without issuing the FLUSH request, the blocks are automatically commited - &#x60;Writecache/Options/AutocommitTime&#x60; - long autocommit time in milliseconds. The data is automatically commited if this time passes and no FLUSH request is received - &#x60;Writecache/Options/Fua&#x60; - enum &quot;On&quot; results in &quot;fua&quot; as argument, whereas the value &quot;Off&quot; results in &quot;nofua&quot; argument * On * Off - &#x60;Writecache/Options/Additional&#x60; - string Additional arguments passed through - &#x60;DrbdOptions/Disk/read-balancing&#x60; - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - &#x60;DrbdOptions/Disk/on-io-error&#x60; - enum * pass_on * call-local-io-error * detach - &#x60;DrbdOptions/Disk/disk-drain&#x60; - boolean - &#x60;DrbdOptions/Disk/resync-after&#x60; - string - &#x60;DrbdOptions/Disk/disk-timeout&#x60; - range - &#x60;DrbdOptions/Disk/disable-write-same&#x60; - boolean - &#x60;DrbdOptions/Disk/rs-discard-granularity&#x60; - range - &#x60;DrbdOptions/Disk/disk-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/al-extents&#x60; - range - &#x60;DrbdOptions/Disk/al-updates&#x60; - boolean - &#x60;DrbdOptions/Disk/md-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-barrier&#x60; - boolean - &#x60;DrbdOptions/Disk/discard-zeroes-if-aligned&#x60; - boolean - &#x60;DrbdOptions/PeerDevice/c-fill-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-max-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/resync-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-delay-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-min-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/bitmap&#x60; - boolean - &#x60;DrbdOptions/PeerDevice/c-plan-ahead&#x60; - range - &#x60;DrbdOptions/Resource/peer-ack-delay&#x60; - range - &#x60;DrbdOptions/Resource/quorum-minimum-redundancy&#x60; - enum [&#x60;1-32&#x60;] * off * majority * all - &#x60;DrbdOptions/Resource/max-io-depth&#x60; - range - &#x60;DrbdOptions/Resource/auto-promote-timeout&#x60; - range - &#x60;DrbdOptions/Resource/quorum&#x60; - enum [&#x60;1-32&#x60;] * off * majority * all - &#x60;DrbdOptions/Resource/on-no-data-accessible&#x60; - enum * io-error * suspend-io - &#x60;DrbdOptions/Resource/auto-promote&#x60; - boolean - &#x60;DrbdOptions/Resource/cpu-mask&#x60; - string - &#x60;DrbdOptions/Resource/twopc-timeout&#x60; - range - &#x60;DrbdOptions/Resource/twopc-retry-timeout&#x60; - range - &#x60;DrbdOptions/Resource/peer-ack-window&#x60; - range - &#x60;DrbdOptions/Resource/on-no-quorum&#x60; - enum * io-error * suspend-io - &#x60;DrbdOptions/Net/max-epoch-size&#x60; - range - &#x60;DrbdOptions/Net/protocol&#x60; - enum * A * B * C - &#x60;DrbdOptions/Net/allow-two-primaries&#x60; - boolean - &#x60;DrbdOptions/Net/after-sb-0pri&#x60; - enum * disconnect * discard-younger-primary * discard-older-primary * discard-zero-changes * discard-least-changes * discard-local * discard-remote - &#x60;DrbdOptions/Net/ko-count&#x60; - range - &#x60;DrbdOptions/Net/data-integrity-alg&#x60; - string - &#x60;DrbdOptions/Net/ping-timeout&#x60; - range - &#x60;DrbdOptions/Net/sndbuf-size&#x60; - range - &#x60;DrbdOptions/Net/transport&#x60; - string - &#x60;DrbdOptions/Net/rcvbuf-size&#x60; - range - &#x60;DrbdOptions/Net/max-buffers&#x60; - range - &#x60;DrbdOptions/Net/fencing&#x60; - enum * dont-care * resource-only * resource-and-stonith - &#x60;DrbdOptions/Net/csums-alg&#x60; - string - &#x60;DrbdOptions/Net/always-asbp&#x60; - boolean - &#x60;DrbdOptions/Net/congestion-extents&#x60; - range - &#x60;DrbdOptions/Net/on-congestion&#x60; - enum * block * pull-ahead * disconnect - &#x60;DrbdOptions/Net/ping-int&#x60; - range - &#x60;DrbdOptions/Net/rr-conflict&#x60; - enum * disconnect * call-pri-lost * violently - &#x60;DrbdOptions/Net/tcp-cork&#x60; - boolean - &#x60;DrbdOptions/Net/use-rle&#x60; - boolean - &#x60;DrbdOptions/Net/csums-after-crash-only&#x60; - boolean - &#x60;DrbdOptions/Net/socket-check-timeout&#x60; - range - &#x60;DrbdOptions/Net/congestion-fill&#x60; - range - &#x60;DrbdOptions/Net/cram-hmac-alg&#x60; - string - &#x60;DrbdOptions/Net/verify-alg&#x60; - string - &#x60;DrbdOptions/Net/shared-secret&#x60; - string - &#x60;DrbdOptions/Net/connect-int&#x60; - range - &#x60;DrbdOptions/Net/timeout&#x60; - range - &#x60;DrbdOptions/Net/after-sb-2pri&#x60; - enum * disconnect * call-pri-lost-after-sb * violently-as0p - &#x60;DrbdOptions/Net/after-sb-1pri&#x60; - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - &#x60;DrbdOptions/Handlers/after-resync-target&#x60; - string - &#x60;DrbdOptions/Handlers/before-resync-target&#x60; - string - &#x60;DrbdOptions/Handlers/before-resync-source&#x60; - string - &#x60;DrbdOptions/Handlers/out-of-sync&#x60; - string - &#x60;DrbdOptions/Handlers/quorum-lost&#x60; - string - &#x60;DrbdOptions/Handlers/fence-peer&#x60; - string - &#x60;DrbdOptions/Handlers/unfence-peer&#x60; - string - &#x60;DrbdOptions/Handlers/initial-split-brain&#x60; - string - &#x60;DrbdOptions/Handlers/local-io-error&#x60; - string - &#x60;DrbdOptions/Handlers/pri-lost&#x60; - string - &#x60;DrbdOptions/Handlers/pri-lost-after-sb&#x60; - string - &#x60;DrbdOptions/Handlers/pri-on-incon-degr&#x60; - string - &#x60;DrbdOptions/Handlers/split-brain&#x60; - string

Options Hash (opts):



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# 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

#controller_version(opts = {}) ⇒ ControllerVersion

show controller version info Show Controller version info



210
211
212
213
# 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

#controller_version_with_http_info(opts = {}) ⇒ Array<(ControllerVersion, Integer, Hash)>

show controller version info Show Controller version info



219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# 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

#create_device_pool(node, opts = {}) ⇒ ApiCallRc

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.

Options Hash (opts):



269
270
271
272
# 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

#create_device_pool_with_http_info(node, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

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.

Options Hash (opts):



280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# 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

#encryption_passphrase_create(opts = {}) ⇒ ApiCallRc

create a encryption passphrase

Options Hash (opts):



337
338
339
340
# 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

#encryption_passphrase_create_with_http_info(opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

create a encryption passphrase

Options Hash (opts):



346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
# 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

#encryption_passphrase_enter(opts = {}) ⇒ ApiCallRc

enter the encryption passphrase

Options Hash (opts):

  • :body (String)


399
400
401
402
# 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

#encryption_passphrase_enter_with_http_info(opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

enter the encryption passphrase

Options Hash (opts):

  • :body (String)


408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# 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

#encryption_passphrase_modify(opts = {}) ⇒ ApiCallRc

modifies the encryption passphrase

Options Hash (opts):



461
462
463
464
# 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

#encryption_passphrase_modify_with_http_info(opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modifies the encryption passphrase

Options Hash (opts):



470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
# 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

#error_report_list(opts = {}) ⇒ Array<ErrorReport>

list all error reports List all error reports

Options Hash (opts):

  • :node (String)

    Only show error reports of this node

  • :since (Integer)

    Unix timestamp from the starting interval

  • :to (Integer)

    Unix timestamp to the ending interval

  • :with_content (Boolean)

    Include error report text in response. (default to false)

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



529
530
531
532
# 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

#error_report_list_with_http_info(opts = {}) ⇒ Array<(Array<ErrorReport>, Integer, Hash)>

list all error reports List all error reports

Options Hash (opts):

  • :node (String)

    Only show error reports of this node

  • :since (Integer)

    Unix timestamp from the starting interval

  • :to (Integer)

    Unix timestamp to the ending interval

  • :with_content (Boolean)

    Include error report text in response.

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
# 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

#error_report_show(reportid, opts = {}) ⇒ Array<ErrorReport>

query the specified reportid Query the specified reportid

Options Hash (opts):

  • :node (String)

    Only show error reports of this node

  • :since (Integer)

    Unix timestamp from the starting interval

  • :to (Integer)

    Unix timestamp to the ending interval

  • :with_content (Boolean)

    Include error report text in response. (default to true)

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



617
618
619
620
# 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

#error_report_show_with_http_info(reportid, opts = {}) ⇒ Array<(Array<ErrorReport>, Integer, Hash)>

query the specified reportid Query the specified reportid

Options Hash (opts):

  • :node (String)

    Only show error reports of this node

  • :since (Integer)

    Unix timestamp from the starting interval

  • :to (Integer)

    Unix timestamp to the ending interval

  • :with_content (Boolean)

    Include error report text in response.

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
# 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

#key_value_store_delete(instance, opts = {}) ⇒ ApiCallRc

delete a key value store Delete a key value store



704
705
706
707
# 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

#key_value_store_delete_with_http_info(instance, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

delete a key value store Delete a key value store



714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
# 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

#key_value_store_list(instance, opts = {}) ⇒ Array<KeyValueStore>

list all key value stores List all known key value store instances



767
768
769
770
# 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

#key_value_store_list_with_http_info(instance, opts = {}) ⇒ Array<(Array<KeyValueStore>, Integer, Hash)>

list all key value stores List all known key value store instances



777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
# 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

#key_value_store_modify(instance, opts = {}) ⇒ ApiCallRc

modify a key value store Modify a key value store

Options Hash (opts):



831
832
833
834
# 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

#key_value_store_modify_with_http_info(instance, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modify a key value store Modify a key value store

Options Hash (opts):



842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
# 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

#key_value_stores_list(opts = {}) ⇒ Array<KeyValueStore>

list all key value stores List all known key value store instances



899
900
901
902
# 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

#key_value_stores_list_with_http_info(opts = {}) ⇒ Array<(Array<KeyValueStore>, Integer, Hash)>

list all key value stores List all known key value store instances



908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
# 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

#netinterface_create(node, opts = {}) ⇒ ApiCallRc

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

Options Hash (opts):



958
959
960
961
# 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

#netinterface_create_with_http_info(node, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

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

Options Hash (opts):



969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
# 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

#netinterface_delete(node, netinterface, opts = {}) ⇒ ApiCallRc

delete a netinterface from a node Delete a netinterface from a node



1028
1029
1030
1031
# 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

#netinterface_delete_with_http_info(node, netinterface, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

delete a netinterface from a node Delete a netinterface from a node



1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
# 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

#netinterface_list(node, opts = {}) ⇒ Array<NetInterface>

return the list of net-interfaces Returns the list of netinterfaces for this node

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



1098
1099
1100
1101
# 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

#netinterface_list_with_http_info(node, opts = {}) ⇒ Array<(Array<NetInterface>, Integer, Hash)>

return the list of net-interfaces Returns the list of netinterfaces for this node

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
# 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

#netinterface_modified(node, netinterface, opts = {}) ⇒ ApiCallRc

modify a netinterface from a node Modify a netinterface from a node

Options Hash (opts):



1179
1180
1181
1182
# 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

#netinterface_modified_with_http_info(node, netinterface, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modify a netinterface from a node Modify a netinterface from a node

Options Hash (opts):



1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# 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

#node_add(opts = {}) ⇒ ApiCallRc

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.

Options Hash (opts):

  • :node (Node)

    Node to add to Linstor



1253
1254
1255
1256
# 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

#node_add_with_http_info(opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

add a node to Linstor Adds a node to Linstor If only one net-interface is specified and it is does not specify a &#x60;satellite_port&#x60; it will apply the default port and &#x60;satellite_encryption_type&#x60; for this net-interface.

Options Hash (opts):

  • :node (Node)

    Node to add to Linstor



1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
# 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

#node_delete(node, opts = {}) ⇒ ApiCallRc

delete a node Delete a node from Linstor



1317
1318
1319
1320
# 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

#node_delete_with_http_info(node, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

delete a node Delete a node from Linstor



1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
# 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

#node_list(opts = {}) ⇒ Array<Node>

Lists nodes registered to the controller Returns an array of all nodes registered to Linstor.

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



1381
1382
1383
1384
# 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

#node_list_with_http_info(opts = {}) ⇒ Array<(Array<Node>, Integer, Hash)>

Lists nodes registered to the controller Returns an array of all nodes registered to Linstor.

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
# 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

#node_lost(node, opts = {}) ⇒ ApiCallRc

delete an unrecoverable node Delete an unrecoverable node



1455
1456
1457
1458
# 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

#node_lost_with_http_info(node, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

delete an unrecoverable node Delete an unrecoverable node



1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
# 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

#node_modify(node, opts = {}) ⇒ ApiCallRc

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

Options Hash (opts):



1519
1520
1521
1522
# 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

#node_modify_with_http_info(node, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modify a node Sets or modifies properties Possible properties are: - &#x60;PrefNic&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Preferred network interface to use - &#x60;StorPoolName&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name to use. - &#x60;StorPoolNameDrbdMeta&#x60; - regex[&#x60;^|.internal|[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name to use. - &#x60;DrbdMetaType&#x60; - enum * external * internal - &#x60;sys/fs/blkio_throttle_read&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - &#x60;sys/fs/blkio_throttle_write&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device - &#x60;Writecache/PoolName&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name for writecache - &#x60;Writecache/Size&#x60; - regex[&#x60;^100%|1,2([.][0-9]*)?%|[0-9]2,$&#x60;] Size of the writecache in % (0-100) or KiB otherwise - &#x60;Writecache/Blocksize&#x60; - long 4096 is recommended; the maximum block size is the page size - &#x60;Writecache/Options/StartSector&#x60; - long offset from the start of cache device in 512-byte sectors - &#x60;Writecache/Options/HighWatermark&#x60; - long start writeback when the number of used blocks reach this watermark - &#x60;Writecache/Options/LowWatermark&#x60; - long stop writeback when the number of used blocks drops below this watermark - &#x60;Writecache/Options/WritebackJobs&#x60; - 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 - &#x60;Writecache/Options/AutocommitBlocks&#x60; - long when the application writes this amount of blocks without issuing the FLUSH request, the blocks are automatically commited - &#x60;Writecache/Options/AutocommitTime&#x60; - long autocommit time in milliseconds. The data is automatically commited if this time passes and no FLUSH request is received - &#x60;Writecache/Options/Fua&#x60; - enum &quot;On&quot; results in &quot;fua&quot; as argument, whereas the value &quot;Off&quot; results in &quot;nofua&quot; argument * On * Off - &#x60;Writecache/Options/Additional&#x60; - string Additional arguments passed through

Options Hash (opts):



1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
# 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

#node_reconnect(node, opts = {}) ⇒ ApiCallRc

reconnect a node to the controller Reconnect a node to the controller



1588
1589
1590
1591
# 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

#node_reconnect_with_http_info(node, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

reconnect a node to the controller Reconnect a node to the controller



1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
# 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

#node_storage_pool_create(node, opts = {}) ⇒ ApiCallRc

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

Options Hash (opts):



1652
1653
1654
1655
# 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

#node_storage_pool_create_with_http_info(node, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

creates a new storage pool on this node Creates a new storage pool on this node. &#x60;provider_kind&#x60; has to be specified and additional to that the linked &#x60;StorDriver&#x60; property that has the value to the backing pool: * &#x60;LVM&#x60;: &#x60;StorDriver/LvmVg&#x60; * &#x60;LVM_THIN&#x60;: &#x60;StorDriver/LvmVg&#x60; and &#x60;StorDriver/ThinPool&#x60; * &#x60;ZFS&#x60;: &#x60;StorDriver/ZPool&#x60; * &#x60;ZFS_THIN&#x60;: &#x60;StorDriver/ZPoolThin&#x60; * &#x60;DISKLESS&#x60;: Does not need a property as it has no backing pool

Options Hash (opts):



1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
# 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

#node_storage_pool_delete(node, storagepool, opts = {}) ⇒ ApiCallRc

delete a storage pool Delete a storage pool



1722
1723
1724
1725
# 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

#node_storage_pool_delete_with_http_info(node, storagepool, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

delete a storage pool Delete a storage pool



1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
# 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

#node_storage_pool_list(node, opts = {}) ⇒ Array<StoragePool>

lists all storage pools for a node Lists all storage pools of a node

Options Hash (opts):

  • :nodes (Array<String>)

    Filter only for the specified nodes, if not specified no filtering.

  • :storage_pools (Array<String>)

    Filter only for the specified storage pools, if not specified no filtering.

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



1794
1795
1796
1797
# 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

#node_storage_pool_list_with_http_info(node, opts = {}) ⇒ Array<(Array<StoragePool>, Integer, Hash)>

lists all storage pools for a node Lists all storage pools of a node

Options Hash (opts):

  • :nodes (Array<String>)

    Filter only for the specified nodes, if not specified no filtering.

  • :storage_pools (Array<String>)

    Filter only for the specified storage pools, if not specified no filtering.

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
# 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

#node_storage_pool_modify(node, storagepool, opts = {}) ⇒ ApiCallRc

modify a storage pool Sets or modifies properties Possible properties are: - StorDriver/LvmVg - regex[[a-zA-Z0-9_-]+] - StorDriver/ThinPool - regex[[a-zA-Z0-9_-]+] - StorDriver/ZPool - regex[[a-zA-Z0-9_/-]+] - StorDriver/ZPoolThin - regex[[a-zA-Z0-9_/-]+] - 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[[0-9]+] - 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

Options Hash (opts):



1879
1880
1881
1882
# 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

#node_storage_pool_modify_with_http_info(node, storagepool, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modify a storage pool Sets or modifies properties Possible properties are: - &#x60;StorDriver/LvmVg&#x60; - regex[&#x60;&#x60;] - &#x60;StorDriver/ThinPool&#x60; - regex[&#x60;&#x60;] - &#x60;StorDriver/ZPool&#x60; - regex[&#x60;&#x60;] - &#x60;StorDriver/ZPoolThin&#x60; - regex[&#x60;&#x60;] - &#x60;StorDriver/FileDir&#x60; - regex - &#x60;PrefNic&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Preferred network interface to use - &#x60;NVMe/PrefNic&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Preferred network interface to use - &#x60;StorDriver/LvcreateType&#x60; - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - &#x60;StorDriver/WaitTimeoutAfterCreate&#x60; - regex[&#x60;+&#x60;] - &#x60;sys/fs/blkio_throttle_read&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - &#x60;sys/fs/blkio_throttle_write&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device

Options Hash (opts):



1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
# 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_max_volume_size(opts = {}) ⇒ MaxVolumeSizes

query the maximum volume size Query the maximum possible volume size storage pools

Options Hash (opts):



1953
1954
1955
1956
# 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_max_volume_size_from_rsc_grp(resource_group, opts = {}) ⇒ MaxVolumeSizes

query the maximum volume size from a given resource group Query the maximum possible volume size storage pools



2017
2018
2019
2020
# 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_max_volume_size_from_rsc_grp_with_http_info(resource_group, opts = {}) ⇒ Array<(MaxVolumeSizes, Integer, Hash)>

query the maximum volume size from a given resource group Query the maximum possible volume size storage pools



2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
# 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_max_volume_size_with_http_info(opts = {}) ⇒ Array<(MaxVolumeSizes, Integer, Hash)>

query the maximum volume size Query the maximum possible volume size storage pools

Options Hash (opts):



1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
# 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

#resource_autoplace(resource, opts = {}) ⇒ ApiCallRc

autoplace resource Auto place the resource on the specified place_count redundency. If place_count isn’t given 2 is the default.

Options Hash (opts):



2081
2082
2083
2084
# 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

#resource_autoplace_with_http_info(resource, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

autoplace resource Auto place the resource on the specified place_count redundency. If place_count isn&#39;t given 2 is the default.

Options Hash (opts):



2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
# 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

#resource_connection_list(resource, node_a, node_b, opts = {}) ⇒ Array<ResourceConnection>

show the specified resource connection show the specified resource connection



2152
2153
2154
2155
# 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

#resource_connection_list_with_http_info(resource, node_a, node_b, opts = {}) ⇒ Array<(Array<ResourceConnection>, Integer, Hash)>

show the specified resource connection show the specified resource connection



2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
# 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

#resource_connection_modify(resource, node_a, node_b, opts = {}) ⇒ ApiCallRc

modify a resource connection Sets or modifies properties Possible properties are: - DrbdOptions/PeerDevice/c-fill-target - range[0-1048576] - DrbdOptions/PeerDevice/c-max-rate - range[250-4194304] - DrbdOptions/PeerDevice/resync-rate - range[1-8388608] - DrbdOptions/PeerDevice/c-delay-target - range[1-100] - DrbdOptions/PeerDevice/c-min-rate - range[0-4194304] - DrbdOptions/PeerDevice/bitmap - boolean - DrbdOptions/PeerDevice/c-plan-ahead - range[0-300] - DrbdOptions/Net/max-epoch-size - range[1-20000] - 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[0-200] - DrbdOptions/Net/data-integrity-alg - string - DrbdOptions/Net/ping-timeout - range[1-300] - DrbdOptions/Net/sndbuf-size - range[0-10485760] - DrbdOptions/Net/transport - string - DrbdOptions/Net/rcvbuf-size - range[0-10485760] - DrbdOptions/Net/max-buffers - range[32-131072] - 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[67-65534] - DrbdOptions/Net/on-congestion - enum * block * pull-ahead * disconnect - DrbdOptions/Net/ping-int - range[1-120] - 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[0-300] - DrbdOptions/Net/congestion-fill - range[0-20971520] - DrbdOptions/Net/cram-hmac-alg - string - DrbdOptions/Net/verify-alg - string - DrbdOptions/Net/shared-secret - string - DrbdOptions/Net/connect-int - range[1-120] - DrbdOptions/Net/timeout - range[1-600] - 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

Options Hash (opts):



2228
2229
2230
2231
# 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

#resource_connection_modify_with_http_info(resource, node_a, node_b, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modify a resource connection Sets or modifies properties Possible properties are: - &#x60;DrbdOptions/PeerDevice/c-fill-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-max-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/resync-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-delay-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-min-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/bitmap&#x60; - boolean - &#x60;DrbdOptions/PeerDevice/c-plan-ahead&#x60; - range - &#x60;DrbdOptions/Net/max-epoch-size&#x60; - range - &#x60;DrbdOptions/Net/protocol&#x60; - enum * A * B * C - &#x60;DrbdOptions/Net/allow-two-primaries&#x60; - boolean - &#x60;DrbdOptions/Net/after-sb-0pri&#x60; - enum * disconnect * discard-younger-primary * discard-older-primary * discard-zero-changes * discard-least-changes * discard-local * discard-remote - &#x60;DrbdOptions/Net/ko-count&#x60; - range - &#x60;DrbdOptions/Net/data-integrity-alg&#x60; - string - &#x60;DrbdOptions/Net/ping-timeout&#x60; - range - &#x60;DrbdOptions/Net/sndbuf-size&#x60; - range - &#x60;DrbdOptions/Net/transport&#x60; - string - &#x60;DrbdOptions/Net/rcvbuf-size&#x60; - range - &#x60;DrbdOptions/Net/max-buffers&#x60; - range - &#x60;DrbdOptions/Net/fencing&#x60; - enum * dont-care * resource-only * resource-and-stonith - &#x60;DrbdOptions/Net/csums-alg&#x60; - string - &#x60;DrbdOptions/Net/always-asbp&#x60; - boolean - &#x60;DrbdOptions/Net/congestion-extents&#x60; - range - &#x60;DrbdOptions/Net/on-congestion&#x60; - enum * block * pull-ahead * disconnect - &#x60;DrbdOptions/Net/ping-int&#x60; - range - &#x60;DrbdOptions/Net/rr-conflict&#x60; - enum * disconnect * call-pri-lost * violently - &#x60;DrbdOptions/Net/tcp-cork&#x60; - boolean - &#x60;DrbdOptions/Net/use-rle&#x60; - boolean - &#x60;DrbdOptions/Net/csums-after-crash-only&#x60; - boolean - &#x60;DrbdOptions/Net/socket-check-timeout&#x60; - range - &#x60;DrbdOptions/Net/congestion-fill&#x60; - range - &#x60;DrbdOptions/Net/cram-hmac-alg&#x60; - string - &#x60;DrbdOptions/Net/verify-alg&#x60; - string - &#x60;DrbdOptions/Net/shared-secret&#x60; - string - &#x60;DrbdOptions/Net/connect-int&#x60; - range - &#x60;DrbdOptions/Net/timeout&#x60; - range - &#x60;DrbdOptions/Net/after-sb-2pri&#x60; - enum * disconnect * call-pri-lost-after-sb * violently-as0p - &#x60;DrbdOptions/Net/after-sb-1pri&#x60; - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p

Options Hash (opts):



2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
# 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

#resource_connections_list(resource, opts = {}) ⇒ Array<ResourceConnection>

list all resource connections for resource List all resource connections for resource



2307
2308
2309
2310
# 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

#resource_connections_list_with_http_info(resource, opts = {}) ⇒ Array<(Array<ResourceConnection>, Integer, Hash)>

list all resource connections for resource List all resource connections for resource



2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
# 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

#resource_create(resource, opts = {}) ⇒ ApiCallRc

create one or more resources. Adds one or more resource(s).

Options Hash (opts):



2371
2372
2373
2374
# 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

#resource_create_on_node(resource, node, opts = {}) ⇒ ApiCallRc

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"] } } “`

Options Hash (opts):



2442
2443
2444
2445
# 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

#resource_create_on_node_with_http_info(resource, node, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

create a resource on a node Adds a resource on a node. To use a specific storage pool add the &#x60;StorPoolName&#x60; property and use the storage pool name as value. If the &#x60;StorPoolName&#x60; property is not set, the &#x60;DfltStorPool&#x60; will be used. To create a diskless resource you have to set the &quot;DISKLESS&quot; flag in the flags list. &#x60;&#x60;&#x60; { &quot;resource&quot;: { &quot;flags&quot;: [&quot;DISKLESS&quot;] } } &#x60;&#x60;&#x60;

Options Hash (opts):



2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
# 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

#resource_create_with_http_info(resource, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

create one or more resources. Adds one or more resource(s).

Options Hash (opts):



2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
# 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

#resource_definition_create(opts = {}) ⇒ ApiCallRc

add a resource-definition Adds a resource-definition. Only required property is the name of the resource definition. All other properties are optional.

Options Hash (opts):



2516
2517
2518
2519
# 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

#resource_definition_create_with_http_info(opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

add a resource-definition Adds a resource-definition. Only required property is the name of the resource definition. All other properties are optional.

Options Hash (opts):



2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
# 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

#resource_definition_delete(resource, opts = {}) ⇒ ApiCallRc

delete a resource-definition Delete a resource-definition



2580
2581
2582
2583
# 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

#resource_definition_delete_with_http_info(resource, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

delete a resource-definition Delete a resource-definition



2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
# 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

#resource_definition_list(opts = {}) ⇒ Array<ResourceDefinition>

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

Options Hash (opts):

  • :resource_definitions (Array<String>)

    Filter only for the specified resource definitions, if not specified no filtering.

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



2645
2646
2647
2648
# 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

#resource_definition_list_with_http_info(opts = {}) ⇒ Array<(Array<ResourceDefinition>, Integer, Hash)>

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

Options Hash (opts):

  • :resource_definitions (Array<String>)

    Filter only for the specified resource definitions, if not specified no filtering.

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
# 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

#resource_definition_modify(resource, opts = {}) ⇒ ApiCallRc

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[1-31] 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[1-65535] - 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[0-6000] - DrbdOptions/Disk/disable-write-same - boolean - DrbdOptions/Disk/rs-discard-granularity - range[0-1048576] - DrbdOptions/Disk/disk-flushes - boolean - DrbdOptions/Disk/al-extents - range[67-65534] - 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[0-1048576] - DrbdOptions/PeerDevice/c-max-rate - range[250-4194304] - DrbdOptions/PeerDevice/resync-rate - range[1-8388608] - DrbdOptions/PeerDevice/c-delay-target - range[1-100] - DrbdOptions/PeerDevice/c-min-rate - range[0-4194304] - DrbdOptions/PeerDevice/bitmap - boolean - DrbdOptions/PeerDevice/c-plan-ahead - range[0-300] - DrbdOptions/Resource/peer-ack-delay - range[1-10000] - DrbdOptions/Resource/quorum-minimum-redundancy - enum [1-32] * off * majority * all - DrbdOptions/Resource/max-io-depth - range[4-4294967295] - DrbdOptions/Resource/auto-promote-timeout - range[0-600] - 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[50-600] - DrbdOptions/Resource/twopc-retry-timeout - range[1-50] - DrbdOptions/Resource/peer-ack-window - range[2048-204800] - DrbdOptions/Resource/on-no-quorum - enum * io-error * suspend-io - DrbdOptions/Net/max-epoch-size - range[1-20000] - 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[0-200] - DrbdOptions/Net/data-integrity-alg - string - DrbdOptions/Net/ping-timeout - range[1-300] - DrbdOptions/Net/sndbuf-size - range[0-10485760] - DrbdOptions/Net/transport - string - DrbdOptions/Net/rcvbuf-size - range[0-10485760] - DrbdOptions/Net/max-buffers - range[32-131072] - 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[67-65534] - DrbdOptions/Net/on-congestion - enum * block * pull-ahead * disconnect - DrbdOptions/Net/ping-int - range[1-120] - 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[0-300] - DrbdOptions/Net/congestion-fill - range[0-20971520] - DrbdOptions/Net/cram-hmac-alg - string - DrbdOptions/Net/verify-alg - string - DrbdOptions/Net/shared-secret - string - DrbdOptions/Net/connect-int - range[1-120] - DrbdOptions/Net/timeout - range[1-600] - 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

Options Hash (opts):



2722
2723
2724
2725
# 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

#resource_definition_modify_with_http_info(resource, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modify a resource-definition Sets or modifies properties Possible properties are: - &#x60;StorPoolName&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name to use. - &#x60;StorPoolNameDrbdMeta&#x60; - regex[&#x60;^|.internal|[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name to use. - &#x60;DrbdMetaType&#x60; - enum * external * internal - &#x60;PeerSlotsNewResource&#x60; - 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 - &#x60;DrbdProxy/CompressionType&#x60; - enum * zlib * lzma * lz4 * zstd - &#x60;FileSystem/Type&#x60; - enum File system type to use * ext4 * xfs - &#x60;FileSystem/MkfsParams&#x60; - string Additional parameters for the mkfs command - &#x60;NVMe/enabled&#x60; - enum * rdma * tcp - &#x60;NVMe/enabled&#x60; - range - &#x60;StorDriver/LvcreateType&#x60; - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - &#x60;sys/fs/blkio_throttle_read&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - &#x60;sys/fs/blkio_throttle_write&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device - &#x60;DrbdOptions/auto-quorum&#x60; - enum Enables automatic setting of the &#39;quroum&#39; and &#39;on-no-quroum&#39; property * io-error * suspend-io * disabled - &#x60;DrbdOptions/auto-add-quorum-tiebreaker&#x60; - boolean_true_false Enables automatic management (creation and deletion) of tie breaking resource - &#x60;Writecache/PoolName&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name for writecache - &#x60;Writecache/Size&#x60; - regex[&#x60;^100%|1,2([.][0-9]*)?%|[0-9]2,$&#x60;] Size of the writecache in % (0-100) or KiB otherwise - &#x60;Writecache/Blocksize&#x60; - long 4096 is recommended; the maximum block size is the page size - &#x60;Writecache/Options/StartSector&#x60; - long offset from the start of cache device in 512-byte sectors - &#x60;Writecache/Options/HighWatermark&#x60; - long start writeback when the number of used blocks reach this watermark - &#x60;Writecache/Options/LowWatermark&#x60; - long stop writeback when the number of used blocks drops below this watermark - &#x60;Writecache/Options/WritebackJobs&#x60; - 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 - &#x60;Writecache/Options/AutocommitBlocks&#x60; - long when the application writes this amount of blocks without issuing the FLUSH request, the blocks are automatically commited - &#x60;Writecache/Options/AutocommitTime&#x60; - long autocommit time in milliseconds. The data is automatically commited if this time passes and no FLUSH request is received - &#x60;Writecache/Options/Fua&#x60; - enum &quot;On&quot; results in &quot;fua&quot; as argument, whereas the value &quot;Off&quot; results in &quot;nofua&quot; argument * On * Off - &#x60;Writecache/Options/Additional&#x60; - string Additional arguments passed through - &#x60;DrbdOptions/Disk/read-balancing&#x60; - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - &#x60;DrbdOptions/Disk/on-io-error&#x60; - enum * pass_on * call-local-io-error * detach - &#x60;DrbdOptions/Disk/disk-drain&#x60; - boolean - &#x60;DrbdOptions/Disk/resync-after&#x60; - string - &#x60;DrbdOptions/Disk/disk-timeout&#x60; - range - &#x60;DrbdOptions/Disk/disable-write-same&#x60; - boolean - &#x60;DrbdOptions/Disk/rs-discard-granularity&#x60; - range - &#x60;DrbdOptions/Disk/disk-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/al-extents&#x60; - range - &#x60;DrbdOptions/Disk/al-updates&#x60; - boolean - &#x60;DrbdOptions/Disk/md-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-barrier&#x60; - boolean - &#x60;DrbdOptions/Disk/discard-zeroes-if-aligned&#x60; - boolean - &#x60;DrbdOptions/PeerDevice/c-fill-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-max-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/resync-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-delay-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-min-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/bitmap&#x60; - boolean - &#x60;DrbdOptions/PeerDevice/c-plan-ahead&#x60; - range - &#x60;DrbdOptions/Resource/peer-ack-delay&#x60; - range - &#x60;DrbdOptions/Resource/quorum-minimum-redundancy&#x60; - enum [&#x60;1-32&#x60;] * off * majority * all - &#x60;DrbdOptions/Resource/max-io-depth&#x60; - range - &#x60;DrbdOptions/Resource/auto-promote-timeout&#x60; - range - &#x60;DrbdOptions/Resource/quorum&#x60; - enum [&#x60;1-32&#x60;] * off * majority * all - &#x60;DrbdOptions/Resource/on-no-data-accessible&#x60; - enum * io-error * suspend-io - &#x60;DrbdOptions/Resource/auto-promote&#x60; - boolean - &#x60;DrbdOptions/Resource/cpu-mask&#x60; - string - &#x60;DrbdOptions/Resource/twopc-timeout&#x60; - range - &#x60;DrbdOptions/Resource/twopc-retry-timeout&#x60; - range - &#x60;DrbdOptions/Resource/peer-ack-window&#x60; - range - &#x60;DrbdOptions/Resource/on-no-quorum&#x60; - enum * io-error * suspend-io - &#x60;DrbdOptions/Net/max-epoch-size&#x60; - range - &#x60;DrbdOptions/Net/protocol&#x60; - enum * A * B * C - &#x60;DrbdOptions/Net/allow-two-primaries&#x60; - boolean - &#x60;DrbdOptions/Net/after-sb-0pri&#x60; - enum * disconnect * discard-younger-primary * discard-older-primary * discard-zero-changes * discard-least-changes * discard-local * discard-remote - &#x60;DrbdOptions/Net/ko-count&#x60; - range - &#x60;DrbdOptions/Net/data-integrity-alg&#x60; - string - &#x60;DrbdOptions/Net/ping-timeout&#x60; - range - &#x60;DrbdOptions/Net/sndbuf-size&#x60; - range - &#x60;DrbdOptions/Net/transport&#x60; - string - &#x60;DrbdOptions/Net/rcvbuf-size&#x60; - range - &#x60;DrbdOptions/Net/max-buffers&#x60; - range - &#x60;DrbdOptions/Net/fencing&#x60; - enum * dont-care * resource-only * resource-and-stonith - &#x60;DrbdOptions/Net/csums-alg&#x60; - string - &#x60;DrbdOptions/Net/always-asbp&#x60; - boolean - &#x60;DrbdOptions/Net/congestion-extents&#x60; - range - &#x60;DrbdOptions/Net/on-congestion&#x60; - enum * block * pull-ahead * disconnect - &#x60;DrbdOptions/Net/ping-int&#x60; - range - &#x60;DrbdOptions/Net/rr-conflict&#x60; - enum * disconnect * call-pri-lost * violently - &#x60;DrbdOptions/Net/tcp-cork&#x60; - boolean - &#x60;DrbdOptions/Net/use-rle&#x60; - boolean - &#x60;DrbdOptions/Net/csums-after-crash-only&#x60; - boolean - &#x60;DrbdOptions/Net/socket-check-timeout&#x60; - range - &#x60;DrbdOptions/Net/congestion-fill&#x60; - range - &#x60;DrbdOptions/Net/cram-hmac-alg&#x60; - string - &#x60;DrbdOptions/Net/verify-alg&#x60; - string - &#x60;DrbdOptions/Net/shared-secret&#x60; - string - &#x60;DrbdOptions/Net/connect-int&#x60; - range - &#x60;DrbdOptions/Net/timeout&#x60; - range - &#x60;DrbdOptions/Net/after-sb-2pri&#x60; - enum * disconnect * call-pri-lost-after-sb * violently-as0p - &#x60;DrbdOptions/Net/after-sb-1pri&#x60; - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - &#x60;DrbdOptions/Handlers/after-resync-target&#x60; - string - &#x60;DrbdOptions/Handlers/before-resync-target&#x60; - string - &#x60;DrbdOptions/Handlers/before-resync-source&#x60; - string - &#x60;DrbdOptions/Handlers/out-of-sync&#x60; - string - &#x60;DrbdOptions/Handlers/quorum-lost&#x60; - string - &#x60;DrbdOptions/Handlers/fence-peer&#x60; - string - &#x60;DrbdOptions/Handlers/unfence-peer&#x60; - string - &#x60;DrbdOptions/Handlers/initial-split-brain&#x60; - string - &#x60;DrbdOptions/Handlers/local-io-error&#x60; - string - &#x60;DrbdOptions/Handlers/pri-lost&#x60; - string - &#x60;DrbdOptions/Handlers/pri-lost-after-sb&#x60; - string - &#x60;DrbdOptions/Handlers/pri-on-incon-degr&#x60; - string - &#x60;DrbdOptions/Handlers/split-brain&#x60; - string

Options Hash (opts):



2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
# 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

#resource_delete(resource, node, opts = {}) ⇒ ApiCallRc

delete a resource Delete a resource on a node



2792
2793
2794
2795
# 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

#resource_delete_with_http_info(resource, node, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

delete a resource Delete a resource on a node



2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
# 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

#resource_drbd_proxy_disable(resource, node_a, node_b, opts = {}) ⇒ ApiCallRc

disables a drbd proxy on a node connection Disables a drbd proxy on a node connection



2862
2863
2864
2865
# 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

#resource_drbd_proxy_disable_with_http_info(resource, node_a, node_b, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

disables a drbd proxy on a node connection Disables a drbd proxy on a node connection



2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
# 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

#resource_drbd_proxy_enable(resource, node_a, node_b, opts = {}) ⇒ ApiCallRc

enable a drbd proxy on a node connection Enables a drbd proxy on a node connection

Options Hash (opts):



2938
2939
2940
2941
# 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

#resource_drbd_proxy_enable_with_http_info(resource, node_a, node_b, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

enable a drbd proxy on a node connection Enables a drbd proxy on a node connection

Options Hash (opts):



2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
# 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

#resource_drbd_proxy_modify(resource, opts = {}) ⇒ ApiCallRc

modify drbd proxy option properties Sets or modifies properties Possible properties are: - DrbdOptions/Proxy/memlimit - range[16777216-9223372036854775807] - DrbdOptions/Proxy/read-loops - range[0-2147483647] - DrbdOptions/Proxy/sndbuf-size - range[0-10485760] - DrbdOptions/Proxy/rcvbuf-size - range[0-10485760] - DrbdOptions/Proxy/ping-timeout - range[1-300] - DrbdOptions/ProxyCompression/dict-size - range[4096-1610612736] - DrbdOptions/ProxyCompression/lc - range[0-4] - DrbdOptions/ProxyCompression/lp - range[0-4] - DrbdOptions/ProxyCompression/pb - range[0-4] - DrbdOptions/ProxyCompression/nice-len - range[0-273] - DrbdOptions/ProxyCompression/mf - enum * hc4 * hc3 * bt2 * bt3 * bt4 - DrbdOptions/ProxyCompression/mode - enum * fast * normal - DrbdOptions/ProxyCompression/depth - range[0-1000] - DrbdOptions/ProxyCompression/level - range[1-9] - DrbdOptions/ProxyCompression/contexts - range[1-253] - DrbdOptions/ProxyCompression/fallback-to-zlib - enum * off * on - DrbdOptions/ProxyCompression/numa-threshold - range[0-253] - DrbdOptions/ProxyCompression/level - range[1-9] - DrbdOptions/ProxyCompression/level - range[1-22]

Options Hash (opts):



3018
3019
3020
3021
# 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

#resource_drbd_proxy_modify_with_http_info(resource, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modify drbd proxy option properties Sets or modifies properties Possible properties are: - &#x60;DrbdOptions/Proxy/memlimit&#x60; - range - &#x60;DrbdOptions/Proxy/read-loops&#x60; - range - &#x60;DrbdOptions/Proxy/sndbuf-size&#x60; - range - &#x60;DrbdOptions/Proxy/rcvbuf-size&#x60; - range - &#x60;DrbdOptions/Proxy/ping-timeout&#x60; - range - &#x60;DrbdOptions/ProxyCompression/dict-size&#x60; - range - &#x60;DrbdOptions/ProxyCompression/lc&#x60; - range - &#x60;DrbdOptions/ProxyCompression/lp&#x60; - range - &#x60;DrbdOptions/ProxyCompression/pb&#x60; - range - &#x60;DrbdOptions/ProxyCompression/nice-len&#x60; - range - &#x60;DrbdOptions/ProxyCompression/mf&#x60; - enum * hc4 * hc3 * bt2 * bt3 * bt4 - &#x60;DrbdOptions/ProxyCompression/mode&#x60; - enum * fast * normal - &#x60;DrbdOptions/ProxyCompression/depth&#x60; - range - &#x60;DrbdOptions/ProxyCompression/level&#x60; - range - &#x60;DrbdOptions/ProxyCompression/contexts&#x60; - range - &#x60;DrbdOptions/ProxyCompression/fallback-to-zlib&#x60; - enum * off * on - &#x60;DrbdOptions/ProxyCompression/numa-threshold&#x60; - range - &#x60;DrbdOptions/ProxyCompression/level&#x60; - range - &#x60;DrbdOptions/ProxyCompression/level&#x60; - range

Options Hash (opts):



3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
# 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

#resource_group_create(opts = {}) ⇒ ApiCallRc

add a resource-group Adds a resource-group. Only required property is the name of the resource group. All other properties are optional.

Options Hash (opts):



3087
3088
3089
3090
# 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

#resource_group_create_with_http_info(opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

add a resource-group Adds a resource-group. Only required property is the name of the resource group. All other properties are optional.

Options Hash (opts):



3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
# 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

#resource_group_delete(resource_group, opts = {}) ⇒ ApiCallRc

delete a resource-group Delete a resource-group



3151
3152
3153
3154
# 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

#resource_group_delete_with_http_info(resource_group, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

delete a resource-group Delete a resource-group



3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
# 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

#resource_group_list(opts = {}) ⇒ Array<ResourceGroup>

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

Options Hash (opts):

  • :resource_groups (Array<String>)

    Filter only for the specified resource groups, if not specified no filtering.

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



3216
3217
3218
3219
# 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

#resource_group_list_with_http_info(opts = {}) ⇒ Array<(Array<ResourceGroup>, Integer, Hash)>

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

Options Hash (opts):

  • :resource_groups (Array<String>)

    Filter only for the specified resource groups, if not specified no filtering.

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
# 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

#resource_group_modify(resource_group, opts = {}) ⇒ ApiCallRc

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[1-31] 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[1-65535] - 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[0-6000] - DrbdOptions/Disk/disable-write-same - boolean - DrbdOptions/Disk/rs-discard-granularity - range[0-1048576] - DrbdOptions/Disk/disk-flushes - boolean - DrbdOptions/Disk/al-extents - range[67-65534] - 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[0-1048576] - DrbdOptions/PeerDevice/c-max-rate - range[250-4194304] - DrbdOptions/PeerDevice/resync-rate - range[1-8388608] - DrbdOptions/PeerDevice/c-delay-target - range[1-100] - DrbdOptions/PeerDevice/c-min-rate - range[0-4194304] - DrbdOptions/PeerDevice/bitmap - boolean - DrbdOptions/PeerDevice/c-plan-ahead - range[0-300] - DrbdOptions/Resource/peer-ack-delay - range[1-10000] - DrbdOptions/Resource/quorum-minimum-redundancy - enum [1-32] * off * majority * all - DrbdOptions/Resource/max-io-depth - range[4-4294967295] - DrbdOptions/Resource/auto-promote-timeout - range[0-600] - 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[50-600] - DrbdOptions/Resource/twopc-retry-timeout - range[1-50] - DrbdOptions/Resource/peer-ack-window - range[2048-204800] - DrbdOptions/Resource/on-no-quorum - enum * io-error * suspend-io - DrbdOptions/Net/max-epoch-size - range[1-20000] - 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[0-200] - DrbdOptions/Net/data-integrity-alg - string - DrbdOptions/Net/ping-timeout - range[1-300] - DrbdOptions/Net/sndbuf-size - range[0-10485760] - DrbdOptions/Net/transport - string - DrbdOptions/Net/rcvbuf-size - range[0-10485760] - DrbdOptions/Net/max-buffers - range[32-131072] - 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[67-65534] - DrbdOptions/Net/on-congestion - enum * block * pull-ahead * disconnect - DrbdOptions/Net/ping-int - range[1-120] - 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[0-300] - DrbdOptions/Net/congestion-fill - range[0-20971520] - DrbdOptions/Net/cram-hmac-alg - string - DrbdOptions/Net/verify-alg - string - DrbdOptions/Net/shared-secret - string - DrbdOptions/Net/connect-int - range[1-120] - DrbdOptions/Net/timeout - range[1-600] - 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

Options Hash (opts):



3293
3294
3295
3296
# 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

#resource_group_modify_with_http_info(resource_group, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modify a resource-group Sets or modifies properties Possible properties are: - &#x60;StorPoolName&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name to use. - &#x60;PeerSlotsNewResource&#x60; - 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 - &#x60;DrbdProxy/CompressionType&#x60; - enum * zlib * lzma * lz4 - &#x60;FileSystem/Type&#x60; - enum File system type to use * ext4 * xfs - &#x60;FileSystem/MkfsParams&#x60; - string Additional parameters for the mkfs command - &#x60;NVMe/enabled&#x60; - enum * rdma * tcp - &#x60;NVMe/enabled&#x60; - range - &#x60;DrbdOptions/Disk/read-balancing&#x60; - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - &#x60;DrbdOptions/Disk/on-io-error&#x60; - enum * pass_on * call-local-io-error * detach - &#x60;DrbdOptions/Disk/disk-drain&#x60; - boolean - &#x60;DrbdOptions/Disk/resync-after&#x60; - string - &#x60;DrbdOptions/Disk/disk-timeout&#x60; - range - &#x60;DrbdOptions/Disk/disable-write-same&#x60; - boolean - &#x60;DrbdOptions/Disk/rs-discard-granularity&#x60; - range - &#x60;DrbdOptions/Disk/disk-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/al-extents&#x60; - range - &#x60;DrbdOptions/Disk/al-updates&#x60; - boolean - &#x60;DrbdOptions/Disk/md-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-barrier&#x60; - boolean - &#x60;DrbdOptions/Disk/discard-zeroes-if-aligned&#x60; - boolean - &#x60;DrbdOptions/PeerDevice/c-fill-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-max-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/resync-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-delay-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-min-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/bitmap&#x60; - boolean - &#x60;DrbdOptions/PeerDevice/c-plan-ahead&#x60; - range - &#x60;DrbdOptions/Resource/peer-ack-delay&#x60; - range - &#x60;DrbdOptions/Resource/quorum-minimum-redundancy&#x60; - enum [&#x60;1-32&#x60;] * off * majority * all - &#x60;DrbdOptions/Resource/max-io-depth&#x60; - range - &#x60;DrbdOptions/Resource/auto-promote-timeout&#x60; - range - &#x60;DrbdOptions/Resource/quorum&#x60; - enum [&#x60;1-32&#x60;] * off * majority * all - &#x60;DrbdOptions/Resource/on-no-data-accessible&#x60; - enum * io-error * suspend-io - &#x60;DrbdOptions/Resource/auto-promote&#x60; - boolean - &#x60;DrbdOptions/Resource/cpu-mask&#x60; - string - &#x60;DrbdOptions/Resource/twopc-timeout&#x60; - range - &#x60;DrbdOptions/Resource/twopc-retry-timeout&#x60; - range - &#x60;DrbdOptions/Resource/peer-ack-window&#x60; - range - &#x60;DrbdOptions/Resource/on-no-quorum&#x60; - enum * io-error * suspend-io - &#x60;DrbdOptions/Net/max-epoch-size&#x60; - range - &#x60;DrbdOptions/Net/protocol&#x60; - enum * A * B * C - &#x60;DrbdOptions/Net/allow-two-primaries&#x60; - boolean - &#x60;DrbdOptions/Net/after-sb-0pri&#x60; - enum * disconnect * discard-younger-primary * discard-older-primary * discard-zero-changes * discard-least-changes * discard-local * discard-remote - &#x60;DrbdOptions/Net/ko-count&#x60; - range - &#x60;DrbdOptions/Net/data-integrity-alg&#x60; - string - &#x60;DrbdOptions/Net/ping-timeout&#x60; - range - &#x60;DrbdOptions/Net/sndbuf-size&#x60; - range - &#x60;DrbdOptions/Net/transport&#x60; - string - &#x60;DrbdOptions/Net/rcvbuf-size&#x60; - range - &#x60;DrbdOptions/Net/max-buffers&#x60; - range - &#x60;DrbdOptions/Net/fencing&#x60; - enum * dont-care * resource-only * resource-and-stonith - &#x60;DrbdOptions/Net/csums-alg&#x60; - string - &#x60;DrbdOptions/Net/always-asbp&#x60; - boolean - &#x60;DrbdOptions/Net/congestion-extents&#x60; - range - &#x60;DrbdOptions/Net/on-congestion&#x60; - enum * block * pull-ahead * disconnect - &#x60;DrbdOptions/Net/ping-int&#x60; - range - &#x60;DrbdOptions/Net/rr-conflict&#x60; - enum * disconnect * call-pri-lost * violently - &#x60;DrbdOptions/Net/tcp-cork&#x60; - boolean - &#x60;DrbdOptions/Net/use-rle&#x60; - boolean - &#x60;DrbdOptions/Net/csums-after-crash-only&#x60; - boolean - &#x60;DrbdOptions/Net/socket-check-timeout&#x60; - range - &#x60;DrbdOptions/Net/congestion-fill&#x60; - range - &#x60;DrbdOptions/Net/cram-hmac-alg&#x60; - string - &#x60;DrbdOptions/Net/verify-alg&#x60; - string - &#x60;DrbdOptions/Net/shared-secret&#x60; - string - &#x60;DrbdOptions/Net/connect-int&#x60; - range - &#x60;DrbdOptions/Net/timeout&#x60; - range - &#x60;DrbdOptions/Net/after-sb-2pri&#x60; - enum * disconnect * call-pri-lost-after-sb * violently-as0p - &#x60;DrbdOptions/Net/after-sb-1pri&#x60; - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - &#x60;DrbdOptions/Handlers/after-resync-target&#x60; - string - &#x60;DrbdOptions/Handlers/before-resync-target&#x60; - string - &#x60;DrbdOptions/Handlers/before-resync-source&#x60; - string - &#x60;DrbdOptions/Handlers/out-of-sync&#x60; - string - &#x60;DrbdOptions/Handlers/quorum-lost&#x60; - string - &#x60;DrbdOptions/Handlers/fence-peer&#x60; - string - &#x60;DrbdOptions/Handlers/unfence-peer&#x60; - string - &#x60;DrbdOptions/Handlers/initial-split-brain&#x60; - string - &#x60;DrbdOptions/Handlers/local-io-error&#x60; - string - &#x60;DrbdOptions/Handlers/pri-lost&#x60; - string - &#x60;DrbdOptions/Handlers/pri-lost-after-sb&#x60; - string - &#x60;DrbdOptions/Handlers/pri-on-incon-degr&#x60; - string - &#x60;DrbdOptions/Handlers/split-brain&#x60; - string

Options Hash (opts):



3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
# 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

#resource_group_spawn(resource_group, opts = {}) ⇒ ApiCallRc

create a new resource-definition based on the given resource-group Creates a new resource-definition and auto-deploys if configured to do so.

Options Hash (opts):



3363
3364
3365
3366
# 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

#resource_group_spawn_with_http_info(resource_group, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

create a new resource-definition based on the given resource-group Creates a new resource-definition and auto-deploys if configured to do so.

Options Hash (opts):



3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
# 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

#resource_list(resource, opts = {}) ⇒ Array<Resource>

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

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



3434
3435
3436
3437
# 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

#resource_list_with_http_info(resource, opts = {}) ⇒ Array<(Array<Resource>, Integer, Hash)>

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

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
# 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

#resource_migrate_disk(resource, node, fromnode, opts = {}) ⇒ ApiCallRc

migrate a resource to another node migrate a resource to another node without reducing the redundancy count



3515
3516
3517
3518
# 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

#resource_migrate_disk_storagepool(resource, node, fromnode, storagepool, opts = {}) ⇒ ApiCallRc

migrate a resource to another node migrate a resource to another node without reducing the redundency count



3591
3592
3593
3594
# 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

#resource_migrate_disk_storagepool_with_http_info(resource, node, fromnode, storagepool, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

migrate a resource to another node migrate a resource to another node without reducing the redundency count



3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
# 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

#resource_migrate_disk_with_http_info(resource, node, fromnode, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

migrate a resource to another node migrate a resource to another node without reducing the redundancy count



3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
# 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

#resource_modify(resource, node, opts = {}) ⇒ ApiCallRc

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[1-31] 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

Options Hash (opts):



3671
3672
3673
3674
# 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

#resource_modify_with_http_info(resource, node, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modify a resource Sets or modifies properties Possible properties are: - &#x60;StorPoolName&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name to use. - &#x60;StorPoolNameDrbdMeta&#x60; - regex[&#x60;^|.internal|[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name to use. - &#x60;DrbdMetaType&#x60; - enum * external * internal - &#x60;PrefNic&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Preferred network interface to use - &#x60;PeerSlots&#x60; - range DRBD peer slots present on resource - &#x60;FileSystem/Type&#x60; - enum File system type to use * ext4 * xfs - &#x60;FileSystem/MkfsParams&#x60; - string Additional parameters for the mkfs command - &#x60;NVMe/PrefNic&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Preferred network interface to use - &#x60;sys/fs/blkio_throttle_read&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - &#x60;sys/fs/blkio_throttle_write&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device

Options Hash (opts):



3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
# 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

#resource_snapshot_create(resource, opts = {}) ⇒ ApiCallRc

create a snapshot Create a snapshot for a resource

Options Hash (opts):



3746
3747
3748
3749
# 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

#resource_snapshot_create_with_http_info(resource, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

create a snapshot Create a snapshot for a resource

Options Hash (opts):



3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
# 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

#resource_snapshot_delete(resource, snapshot, opts = {}) ⇒ ApiCallRc

delete a snapshot Delete a snapshot



3816
3817
3818
3819
# 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

#resource_snapshot_delete_with_http_info(resource, snapshot, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

delete a snapshot Delete a snapshot



3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
# 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

#resource_snapshot_list(resource, snapshot, opts = {}) ⇒ Snapshot

list a specific snapshot List the given snapshot for a resource



3885
3886
3887
3888
# 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

#resource_snapshot_list_with_http_info(resource, snapshot, opts = {}) ⇒ Array<(Snapshot, Integer, Hash)>

list a specific snapshot List the given snapshot for a resource



3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
# 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

#resource_snapshot_restore(resource, snapshot, opts = {}) ⇒ ApiCallRc

restore a snapshot Restore a snapshot to a new resource

Options Hash (opts):



3955
3956
3957
3958
# 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

#resource_snapshot_restore_with_http_info(resource, snapshot, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

restore a snapshot Restore a snapshot to a new resource

Options Hash (opts):



3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
# 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

#resource_snapshot_rollback(resource, snapshot, opts = {}) ⇒ ApiCallRc

rollback a snapshot Rollback a resource to the snapshot state



4030
4031
4032
4033
# 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

#resource_snapshot_rollback_with_http_info(resource, snapshot, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

rollback a snapshot Rollback a resource to the snapshot state



4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
# 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

#resource_snapshots_list(resource, opts = {}) ⇒ Array<Snapshot>

list snapshots List snapshots for a resource



4098
4099
4100
4101
# 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

#resource_snapshots_list_with_http_info(resource, opts = {}) ⇒ Array<(Array<Snapshot>, Integer, Hash)>

list snapshots List snapshots for a resource



4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
# 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

#resource_snapshots_restore_volume_definition(resource, snapshot, opts = {}) ⇒ ApiCallRc

restore a snapshot volume definition Restore a snapshot volume definition to a new resource

Options Hash (opts):



4163
4164
4165
4166
# 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

#resource_snapshots_restore_volume_definition_with_http_info(resource, snapshot, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

restore a snapshot volume definition Restore a snapshot volume definition to a new resource

Options Hash (opts):



4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
# 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

#resource_toggle_diskful(resource, node, opts = {}) ⇒ ApiCallRc

toggle a resource to a diskful resource toggle a resource to a diskful resource using the default storage pool



4238
4239
4240
4241
# 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

#resource_toggle_diskful_storagepool(resource, node, storagepool, opts = {}) ⇒ ApiCallRc

toggle a resource to a diskful resource toggle a resource to a diskful resource



4308
4309
4310
4311
# 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

#resource_toggle_diskful_storagepool_with_http_info(resource, node, storagepool, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

toggle a resource to a diskful resource toggle a resource to a diskful resource



4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
# 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

#resource_toggle_diskful_with_http_info(resource, node, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

toggle a resource to a diskful resource toggle a resource to a diskful resource using the default storage pool



4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
# 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

#resource_toggle_diskless(resource, node, opts = {}) ⇒ ApiCallRc

toggle a resource to diskless toggle a resource to a diskless resource



4382
4383
4384
4385
# 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

#resource_toggle_diskless_disklesspool(resource, node, disklesspool, opts = {}) ⇒ ApiCallRc

toggle a resource to diskless resource toggle a resource to a diskless.



4452
4453
4454
4455
# 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

#resource_toggle_diskless_disklesspool_with_http_info(resource, node, disklesspool, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

toggle a resource to diskless resource toggle a resource to a diskless.



4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
# 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

#resource_toggle_diskless_with_http_info(resource, node, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

toggle a resource to diskless toggle a resource to a diskless resource



4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
# 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

#resource_volume_list(resource, node, opts = {}) ⇒ Array<Volume>

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

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



4528
4529
4530
4531
# 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

#resource_volume_list_with_http_info(resource, node, opts = {}) ⇒ Array<(Array<Volume>, Integer, Hash)>

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

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
# 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

#stor_pool_dfn_modify(storagepool, opts = {}) ⇒ ApiCallRc

modify a storage pool definition Sets or modifies properties Possible properties are: - MaxOversubscriptionRatio - range[1-1000]

Options Hash (opts):



4613
4614
4615
4616
# 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

#stor_pool_dfn_modify_with_http_info(storagepool, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modify a storage pool definition Sets or modifies properties Possible properties are: - &#x60;MaxOversubscriptionRatio&#x60; - range

Options Hash (opts):



4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
# 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

#storage_pool_definition_delete(storagepool, opts = {}) ⇒ ApiCallRc

delete a storage pool definition Delete a storage pool definition from Linstor



4682
4683
4684
4685
# 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

#storage_pool_definition_delete_with_http_info(storagepool, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

delete a storage pool definition Delete a storage pool definition from Linstor



4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
# 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

#storage_pool_dfn_add(opts = {}) ⇒ ApiCallRc

add a storage pool definition to Linstor Adds a storage pool definition to Linstor

Options Hash (opts):



4745
4746
4747
4748
# 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

#storage_pool_dfn_add_with_http_info(opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

add a storage pool definition to Linstor Adds a storage pool definition to Linstor

Options Hash (opts):



4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
# 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

#storage_pool_dfn_get(storagepool, opts = {}) ⇒ StoragePoolDefinition

Lists a specific storage pool definition Returns a specific storage pool definition



4809
4810
4811
4812
# 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

#storage_pool_dfn_get_with_http_info(storagepool, opts = {}) ⇒ Array<(StoragePoolDefinition, Integer, Hash)>

Lists a specific storage pool definition Returns a specific storage pool definition



4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
# 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

#storage_pool_dfn_list(opts = {}) ⇒ Array<StoragePoolDefinition>

Lists storage pool definitions Returns an array of all storage pool definitions

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



4873
4874
4875
4876
# 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

#storage_pool_dfn_list_with_http_info(opts = {}) ⇒ Array<(Array<StoragePoolDefinition>, Integer, Hash)>

Lists storage pool definitions Returns an array of all storage pool definitions

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
# 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

#view_physica_storage(opts = {}) ⇒ Array<PhysicalStorage>

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

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



4948
4949
4950
4951
# 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

#view_physica_storage_with_http_info(opts = {}) ⇒ Array<(Array<PhysicalStorage>, Integer, Hash)>

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

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
# 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

#view_resources(opts = {}) ⇒ Array<ResourceWithVolumes>

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.

Options Hash (opts):

  • :nodes (Array<String>)

    Filter only for the specified nodes, if not specified no filtering.

  • :storage_pools (Array<String>)

    Filter only for the specified storage pools, if not specified no filtering.

  • :resources (Array<String>)

    Filter only for the specified resources, if not specified no filtering.

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



5026
5027
5028
5029
# 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

#view_resources_with_http_info(opts = {}) ⇒ Array<(Array<ResourceWithVolumes>, Integer, Hash)>

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.

Options Hash (opts):

  • :nodes (Array<String>)

    Filter only for the specified nodes, if not specified no filtering.

  • :storage_pools (Array<String>)

    Filter only for the specified storage pools, if not specified no filtering.

  • :resources (Array<String>)

    Filter only for the specified resources, if not specified no filtering.

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
# 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

#view_storage_pools(opts = {}) ⇒ Array<StoragePool>

query all storage pools This REST-resource should be used if you want to get an overview of all storage pools.

Options Hash (opts):

  • :nodes (Array<String>)

    Filter only for the specified nodes, if not specified no filtering.

  • :storage_pools (Array<String>)

    Filter only for the specified storage pools, if not specified no filtering.

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



5109
5110
5111
5112
# 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

#view_storage_pools_with_http_info(opts = {}) ⇒ Array<(Array<StoragePool>, Integer, Hash)>

query all storage pools This REST-resource should be used if you want to get an overview of all storage pools.

Options Hash (opts):

  • :nodes (Array<String>)

    Filter only for the specified nodes, if not specified no filtering.

  • :storage_pools (Array<String>)

    Filter only for the specified storage pools, if not specified no filtering.

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
# 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

#volume_definition_create(resource, opts = {}) ⇒ ApiCallRc

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.

Options Hash (opts):



5188
5189
5190
5191
# 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

#volume_definition_create_with_http_info(resource, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

add a volume-definition to a resource Adds a volume-definition. Required properties is only &#x60;size&#x60;, all other will be auto generated if not given.

Options Hash (opts):



5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
# 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

#volume_definition_delete(resource, volume_number, opts = {}) ⇒ ApiCallRc

delete a volume-definition Delete a volume-definition



5258
5259
5260
5261
# 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

#volume_definition_delete_with_http_info(resource, volume_number, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

delete a volume-definition Delete a volume-definition



5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
# 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

#volume_definition_list(resource, opts = {}) ⇒ Array<VolumeDefinition>

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

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



5328
5329
5330
5331
# 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

#volume_definition_list_with_http_info(resource, opts = {}) ⇒ Array<(Array<VolumeDefinition>, Integer, Hash)>

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

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
# 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

#volume_definition_modify(resource, volume_number, opts = {}) ⇒ ApiCallRc

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[0-6000] - DrbdOptions/Disk/disable-write-same - boolean - DrbdOptions/Disk/rs-discard-granularity - range[0-1048576] - DrbdOptions/Disk/disk-flushes - boolean - DrbdOptions/Disk/al-extents - range[67-65534] - DrbdOptions/Disk/al-updates - boolean - DrbdOptions/Disk/md-flushes - boolean - DrbdOptions/Disk/disk-barrier - boolean - DrbdOptions/Disk/discard-zeroes-if-aligned - boolean

Options Hash (opts):



5409
5410
5411
5412
# 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

#volume_definition_modify_with_http_info(resource, volume_number, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modify a volume-definition Sets or modifies properties Possible properties are: - &#x60;StorPoolName&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name to use. - &#x60;StorPoolNameDrbdMeta&#x60; - regex[&#x60;^|.internal|[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name to use. - &#x60;DrbdMetaType&#x60; - enum * external * internal - &#x60;OverrideVlmId&#x60; - regex Overwrites the generated &#39;&lt;resource-name&gt;_&lt;5 digit volume number&gt;&#39; volume name for migration purposes - &#x60;AllowLargerVolumeSize&#x60; - boolean_true_false Do not fail when the underlying volume is larger than expected - &#x60;FileSystem/Type&#x60; - enum File system type to use * ext4 * xfs - &#x60;FileSystem/MkfsParams&#x60; - string Additional parameters for the mkfs command - &#x60;StorDriver/LvcreateType&#x60; - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - &#x60;DrbdCurrentGi&#x60; - regex[&#x60;16&#x60;] - &#x60;sys/fs/blkio_throttle_read&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device - &#x60;sys/fs/blkio_throttle_write&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device - &#x60;Writecache/PoolName&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name for writecache - &#x60;Writecache/Size&#x60; - regex[&#x60;^100%|1,2([.][0-9]*)?%|[0-9]2,$&#x60;] Size of the writecache in % (0-100) or KiB otherwise - &#x60;Writecache/Blocksize&#x60; - long 4096 is recommended; the maximum block size is the page size - &#x60;Writecache/Options/StartSector&#x60; - long offset from the start of cache device in 512-byte sectors - &#x60;Writecache/Options/HighWatermark&#x60; - long start writeback when the number of used blocks reach this watermark - &#x60;Writecache/Options/LowWatermark&#x60; - long stop writeback when the number of used blocks drops below this watermark - &#x60;Writecache/Options/WritebackJobs&#x60; - 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 - &#x60;Writecache/Options/AutocommitBlocks&#x60; - long when the application writes this amount of blocks without issuing the FLUSH request, the blocks are automatically commited - &#x60;Writecache/Options/AutocommitTime&#x60; - long autocommit time in milliseconds. The data is automatically commited if this time passes and no FLUSH request is received - &#x60;Writecache/Options/Fua&#x60; - enum &quot;On&quot; results in &quot;fua&quot; as argument, whereas the value &quot;Off&quot; results in &quot;nofua&quot; argument * On * Off - &#x60;Writecache/Options/Additional&#x60; - string Additional arguments passed through - &#x60;DrbdOptions/Disk/read-balancing&#x60; - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - &#x60;DrbdOptions/Disk/on-io-error&#x60; - enum * pass_on * call-local-io-error * detach - &#x60;DrbdOptions/Disk/disk-drain&#x60; - boolean - &#x60;DrbdOptions/Disk/resync-after&#x60; - string - &#x60;DrbdOptions/Disk/disk-timeout&#x60; - range - &#x60;DrbdOptions/Disk/disable-write-same&#x60; - boolean - &#x60;DrbdOptions/Disk/rs-discard-granularity&#x60; - range - &#x60;DrbdOptions/Disk/disk-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/al-extents&#x60; - range - &#x60;DrbdOptions/Disk/al-updates&#x60; - boolean - &#x60;DrbdOptions/Disk/md-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-barrier&#x60; - boolean - &#x60;DrbdOptions/Disk/discard-zeroes-if-aligned&#x60; - boolean

Options Hash (opts):



5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
# 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

#volume_group_create(resource_group, opts = {}) ⇒ ApiCallRc

add a volume-group to a resource-group Adds a volume-group.

Options Hash (opts):



5484
5485
5486
5487
# 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

#volume_group_create_with_http_info(resource_group, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

add a volume-group to a resource-group Adds a volume-group.

Options Hash (opts):



5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
# 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

#volume_group_delete(resource_group, volume_number, opts = {}) ⇒ ApiCallRc

delete a volume-group Delete a volume-group



5554
5555
5556
5557
# 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

#volume_group_delete_with_http_info(resource_group, volume_number, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

delete a volume-group Delete a volume-group



5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
# 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

#volume_group_list(resource_group, opts = {}) ⇒ Array<VolumeGroup>

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

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



5624
5625
5626
5627
# 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

#volume_group_list_with_http_info(resource_group, opts = {}) ⇒ Array<(Array<VolumeGroup>, Integer, Hash)>

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

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return



5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
# 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

#volume_group_modify(resource_group, volume_number, opts = {}) ⇒ ApiCallRc

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[0-6000] - DrbdOptions/Disk/disable-write-same - boolean - DrbdOptions/Disk/rs-discard-granularity - range[0-1048576] - DrbdOptions/Disk/disk-flushes - boolean - DrbdOptions/Disk/al-extents - range[67-65534] - DrbdOptions/Disk/al-updates - boolean - DrbdOptions/Disk/md-flushes - boolean - DrbdOptions/Disk/disk-barrier - boolean - DrbdOptions/Disk/discard-zeroes-if-aligned - boolean

Options Hash (opts):



5705
5706
5707
5708
# 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

#volume_group_modify_with_http_info(resource_group, volume_number, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modify a resource-group Sets or modifies properties Possible properties are: - &#x60;StorPoolName&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Linstor storage pool name to use. - &#x60;OverrideVlmId&#x60; - regex Overwrites the generated &#39;&lt;resource-name&gt;_&lt;5 digit volume number&gt;&#39; volume name for migration purposes - &#x60;AllowLargerVolumeSize&#x60; - boolean_true_false Do not fail when the underlying volume is larger than expected - &#x60;FileSystem/Type&#x60; - enum File system type to use * ext4 * xfs - &#x60;FileSystem/MkfsParams&#x60; - string Additional parameters for the mkfs command - &#x60;StorDriver/LvcreateType&#x60; - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - &#x60;DrbdCurrentGi&#x60; - regex[&#x60;16&#x60;] - &#x60;DrbdOptions/Disk/read-balancing&#x60; - enum * prefer-local * prefer-remote * round-robin * least-pending * when-congested-remote * 32K-striping * 64K-striping * 128K-striping * 256K-striping * 512K-striping * 1M-striping - &#x60;DrbdOptions/Disk/on-io-error&#x60; - enum * pass_on * call-local-io-error * detach - &#x60;DrbdOptions/Disk/disk-drain&#x60; - boolean - &#x60;DrbdOptions/Disk/resync-after&#x60; - string - &#x60;DrbdOptions/Disk/disk-timeout&#x60; - range - &#x60;DrbdOptions/Disk/disable-write-same&#x60; - boolean - &#x60;DrbdOptions/Disk/rs-discard-granularity&#x60; - range - &#x60;DrbdOptions/Disk/disk-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/al-extents&#x60; - range - &#x60;DrbdOptions/Disk/al-updates&#x60; - boolean - &#x60;DrbdOptions/Disk/md-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-barrier&#x60; - boolean - &#x60;DrbdOptions/Disk/discard-zeroes-if-aligned&#x60; - boolean

Options Hash (opts):



5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
# 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

#volume_modify(resource, node, volume_number, opts = {}) ⇒ ApiCallRc

modify a volume Sets or modifies properties Possible properties are: - sys/fs/blkio_throttle_read - number - sys/fs/blkio_throttle_write - number

Options Hash (opts):



5782
5783
5784
5785
# 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

#volume_modify_with_http_info(resource, node, volume_number, opts = {}) ⇒ Array<(ApiCallRc, Integer, Hash)>

modify a volume Sets or modifies properties Possible properties are: - &#x60;sys/fs/blkio_throttle_read&#x60; - number - &#x60;sys/fs/blkio_throttle_write&#x60; - number

Options Hash (opts):



5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
# 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