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

Returns a new instance of 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_config(opts = {}) ⇒ ControllerConfig

show controller config Show Controller config

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



26
27
28
29
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 26

def controller_config(opts = {})
  data, _status_code, _headers = controller_config_with_http_info(opts)
  data
end

#controller_config_with_http_info(opts = {}) ⇒ Array<(ControllerConfig, Integer, Hash)>

show controller config Show Controller config

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ControllerConfig, Integer, Hash)>)

    ControllerConfig data, response status code and response headers



35
36
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 35

def controller_config_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevelopersApi.controller_config ...'
  end
  # resource path
  local_var_path = '/v1/controller/config'

  # 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] || 'ControllerConfig'

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

  new_options = opts.merge(
    :operation => :"DevelopersApi.controller_config",
    :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_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Deletes a controller property Delete a controller property

Parameters:

  • key (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



84
85
86
87
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 84

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

Parameters:

  • key (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



94
95
96
97
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 94

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Hash<String, String>)


146
147
148
149
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 146

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Hash<String, String>, Integer, Hash)>)

    Hash<String, String> data, response status code and response headers



155
156
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 155

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 - REST/disable-http-metrics - boolean_true_false Disable Prometheus /metrics on HTTP, if HTTPS is enabled - DrbdOptions/AutoEvictAfterTime - long Time a node can be offline before it is declared EVICTED in minutes - DrbdOptions/AutoEvictMaxDisconnectedNodes - range[0-100] Percentage(0-100) of nodes that can disconnect at the same time without the controller stopping the max_offline_time timer - DrbdOptions/AutoEvictMinReplicaCount - long The minimum amount of replicas that should be present for a resource at all times. - NVMe/TRType - enum NVMe transportion type * rdma * tcp - NVMe/Port - range[1-65535] NVMe port - 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 - sys/fs/blkio_throttle_read_iops - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_iops_device - sys/fs/blkio_throttle_write_iops - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_iops_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 - DrbdOptions/auto-diskful - long Makes a resource diskful if it was continously diskless primary for X minutes - DrbdOptions/auto-diskful-allow-cleanup - boolean_true_false Allows this resource to be cleaned up after toggle-disk + resync is finished - 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/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 - Cache/OpMode - enum Operation mode * writeback * writethrough * passthrough - Cache/MetaPool - regex[‘^[a-zA-Z0-9_-]2,47$`] Name of the storage pool used for the cache metadata. If not specified, this will default to the CachePool property - Cache/Metasize - regex[‘^100%|1,2([.][0-9]*)?%|[0-9]2,$`] Size of the cache in % (0-100) or KiB otherwise. - Cache/CachePool - regex[‘^[a-zA-Z0-9_-]2,47$`] Name of the storage pool used for the cache cache device - Cache/Cachesize - regex[‘^100%|1,2([.][0-9]*)?%|[0-9]2,$`] Size of the cache in % (0-100) or KiB otherwise. - Cache/Blocksize - long Block size - Cache/Policy - enum Replacemant policy * mq * smq * cleaner - StorDriver/LvcreateOptions - regex[.*] Additional parameters added to every ’lvcreate … ‘ command - StorDriver/ZfscreateOptions - regex[.*] Additional parameters added to every ’zfs create … ‘ command - StorDriver/Openflex/ApiHost - regex[.+] Openflex API host name - StorDriver/Openflex/ApiPort - regex[[0-9]+] Openflex API port - StorDriver/Openflex/UserName - regex[.+] Openflex user name - StorDriver/Openflex/UserPassword - regex[.+] Openflex password - StorDriver/Openflex/JobWaitDelay - regex[[0-9]+] Delay in milliseconds linstor waits between fetching the job status - StorDriver/Openflex/JobWaitMaxCount - regex[[0-9]+] Maximum retries with wait delay until openflex fails - Autoplacer/Weights/MaxFreeSpace - regex[‘^([.][0-9])?`] Weight of ’MaxFreeSpace’ autoplacer-strategy - Autoplacer/Weights/MinReservedSpace - regex[‘^([.][0-9])?‘] Weight of ’MinReservedSpace’ autoplacer-strategy - Autoplacer/Weights/MinRscCount - regex[‘^([.][0-9])?‘] Weight of ’MinRscCount’ autoplacer-strategy - Autoplacer/Weights/MaxThroughput - regex[‘^([.][0-9])?‘] Weight of ’MaxThroughput’ autoplacer-strategy - Autoplacer/PreSelectScript - string Filename of the preselection script. File must be in /etc/linstor/selector/ - Autoplacer/PreSelectScriptTimeout - long Timeout in ms Linstor waits for the script to run. - Autoplacer/MaxThroughput - long The maximum throughput the given storage pool is capable of. - DrbdProxy/AutoEnable - boolean_true_false - Site - string - UpdateCacheInterval - long Interval for space cache background updates in seconds - DrbdOptions/Disk/on-io-error - enum * pass_on * call-local-io-error * detach - DrbdOptions/Disk/disk-barrier - boolean - DrbdOptions/Disk/disk-flushes - boolean - DrbdOptions/Disk/disk-drain - boolean - DrbdOptions/Disk/md-flushes - boolean - DrbdOptions/Disk/resync-after - string - DrbdOptions/Disk/al-extents - range[67-65534] - DrbdOptions/Disk/al-updates - boolean - DrbdOptions/Disk/discard-zeroes-if-aligned - boolean - DrbdOptions/Disk/disable-write-same - boolean - DrbdOptions/Disk/disk-timeout - range[0-6000] - 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/rs-discard-granularity - range[0-1048576] - DrbdOptions/PeerDevice/resync-rate - range[1-8388608] - DrbdOptions/PeerDevice/c-plan-ahead - range[0-300] - DrbdOptions/PeerDevice/c-delay-target - range[1-100] - DrbdOptions/PeerDevice/c-fill-target - range[0-1048576] - DrbdOptions/PeerDevice/c-max-rate - range[250-4194304] - DrbdOptions/PeerDevice/c-min-rate - range[0-4194304] - DrbdOptions/PeerDevice/bitmap - boolean - DrbdOptions/Resource/cpu-mask - string - DrbdOptions/Resource/on-no-data-accessible - enum * io-error * suspend-io - DrbdOptions/Resource/auto-promote - boolean - DrbdOptions/Resource/peer-ack-window - range[2048-204800] - DrbdOptions/Resource/peer-ack-delay - range[1-10000] - DrbdOptions/Resource/twopc-timeout - range[50-600] - DrbdOptions/Resource/twopc-retry-timeout - range[1-50] - DrbdOptions/Resource/auto-promote-timeout - range[0-600] - DrbdOptions/Resource/max-io-depth - range[4-4294967295] - DrbdOptions/Resource/quorum - enum [1-32] * off * majority * all - DrbdOptions/Resource/on-no-quorum - enum * io-error * suspend-io - DrbdOptions/Resource/quorum-minimum-redundancy - enum [1-32] * off * majority * all - DrbdOptions/Net/transport - string - DrbdOptions/Net/protocol - enum * A * B * C - DrbdOptions/Net/timeout - range[1-600] - DrbdOptions/Net/max-epoch-size - range[1-20000] - DrbdOptions/Net/connect-int - range[1-120] - DrbdOptions/Net/ping-int - range[1-120] - DrbdOptions/Net/sndbuf-size - range[0-10485760] - DrbdOptions/Net/rcvbuf-size - range[0-10485760] - DrbdOptions/Net/ko-count - range[0-200] - DrbdOptions/Net/allow-two-primaries - boolean - DrbdOptions/Net/cram-hmac-alg - string - DrbdOptions/Net/shared-secret - string - 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/after-sb-1pri - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - DrbdOptions/Net/after-sb-2pri - enum * disconnect * call-pri-lost-after-sb * violently-as0p - DrbdOptions/Net/always-asbp - boolean - DrbdOptions/Net/rr-conflict - enum * disconnect * call-pri-lost * violently * retry-connect - DrbdOptions/Net/ping-timeout - range[1-300] - DrbdOptions/Net/data-integrity-alg - string - DrbdOptions/Net/tcp-cork - boolean - DrbdOptions/Net/on-congestion - enum * block * pull-ahead * disconnect - DrbdOptions/Net/congestion-fill - range[0-20971520] - DrbdOptions/Net/congestion-extents - range[67-65534] - DrbdOptions/Net/csums-alg - string - DrbdOptions/Net/csums-after-crash-only - boolean - DrbdOptions/Net/verify-alg - string - DrbdOptions/Net/use-rle - boolean - DrbdOptions/Net/socket-check-timeout - range[0-300] - DrbdOptions/Net/fencing - enum * dont-care * resource-only * resource-and-stonith - DrbdOptions/Net/max-buffers - range[32-131072] - DrbdOptions/Net/allow-remote-read - boolean - 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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



204
205
206
207
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 204

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;REST/disable-http-metrics&#x60; - boolean_true_false Disable Prometheus /metrics on HTTP, if HTTPS is enabled - &#x60;DrbdOptions/AutoEvictAfterTime&#x60; - long Time a node can be offline before it is declared EVICTED in minutes - &#x60;DrbdOptions/AutoEvictMaxDisconnectedNodes&#x60; - range Percentage(0-100) of nodes that can disconnect at the same time without the controller stopping the max_offline_time timer - &#x60;DrbdOptions/AutoEvictMinReplicaCount&#x60; - long The minimum amount of replicas that should be present for a resource at all times. - &#x60;NVMe/TRType&#x60; - enum NVMe transportion type * rdma * tcp - &#x60;NVMe/Port&#x60; - range NVMe port - &#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;sys/fs/blkio_throttle_read_iops&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_iops_device - &#x60;sys/fs/blkio_throttle_write_iops&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_iops_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;DrbdOptions/auto-diskful&#x60; - long Makes a resource diskful if it was continously diskless primary for X minutes - &#x60;DrbdOptions/auto-diskful-allow-cleanup&#x60; - boolean_true_false Allows this resource to be cleaned up after toggle-disk + resync is finished - &#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/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;Cache/OpMode&#x60; - enum Operation mode * writeback * writethrough * passthrough - &#x60;Cache/MetaPool&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Name of the storage pool used for the cache metadata. If not specified, this will default to the CachePool property - &#x60;Cache/Metasize&#x60; - regex[&#x60;^100%|1,2([.][0-9]*)?%|[0-9]2,$&#x60;] Size of the cache in % (0-100) or KiB otherwise. - &#x60;Cache/CachePool&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Name of the storage pool used for the cache cache device - &#x60;Cache/Cachesize&#x60; - regex[&#x60;^100%|1,2([.][0-9]*)?%|[0-9]2,$&#x60;] Size of the cache in % (0-100) or KiB otherwise. - &#x60;Cache/Blocksize&#x60; - long Block size - &#x60;Cache/Policy&#x60; - enum Replacemant policy * mq * smq * cleaner - &#x60;StorDriver/LvcreateOptions&#x60; - regex Additional parameters added to every &#39;lvcreate … &#39; command - &#x60;StorDriver/ZfscreateOptions&#x60; - regex Additional parameters added to every &#39;zfs create … &#39; command - &#x60;StorDriver/Openflex/ApiHost&#x60; - regex Openflex API host name - &#x60;StorDriver/Openflex/ApiPort&#x60; - regex[&#x60;&#x60;] Openflex API port - &#x60;StorDriver/Openflex/UserName&#x60; - regex Openflex user name - &#x60;StorDriver/Openflex/UserPassword&#x60; - regex Openflex password - &#x60;StorDriver/Openflex/JobWaitDelay&#x60; - regex[&#x60;&#x60;] Delay in milliseconds linstor waits between fetching the job status - &#x60;StorDriver/Openflex/JobWaitMaxCount&#x60; - regex[&#x60;&#x60;] Maximum retries with wait delay until openflex fails - &#x60;Autoplacer/Weights/MaxFreeSpace&#x60; - regex[&#x60;^([.][0-9])?&#x60;] Weight of &#39;MaxFreeSpace&#39; autoplacer-strategy - &#x60;Autoplacer/Weights/MinReservedSpace&#x60; - regex[&#x60;^([.][0-9])?&#x60;] Weight of &#39;MinReservedSpace&#39; autoplacer-strategy - &#x60;Autoplacer/Weights/MinRscCount&#x60; - regex[&#x60;^([.][0-9])?&#x60;] Weight of &#39;MinRscCount&#39; autoplacer-strategy - &#x60;Autoplacer/Weights/MaxThroughput&#x60; - regex[&#x60;^([.][0-9])?&#x60;] Weight of &#39;MaxThroughput&#39; autoplacer-strategy - &#x60;Autoplacer/PreSelectScript&#x60; - string Filename of the preselection script. File must be in /etc/linstor/selector/ - &#x60;Autoplacer/PreSelectScriptTimeout&#x60; - long Timeout in ms Linstor waits for the script to run. - &#x60;Autoplacer/MaxThroughput&#x60; - long The maximum throughput the given storage pool is capable of. - &#x60;DrbdProxy/AutoEnable&#x60; - boolean_true_false - &#x60;Site&#x60; - string - &#x60;UpdateCacheInterval&#x60; - long Interval for space cache background updates in seconds - &#x60;DrbdOptions/Disk/on-io-error&#x60; - enum * pass_on * call-local-io-error * detach - &#x60;DrbdOptions/Disk/disk-barrier&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-drain&#x60; - boolean - &#x60;DrbdOptions/Disk/md-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/resync-after&#x60; - string - &#x60;DrbdOptions/Disk/al-extents&#x60; - range - &#x60;DrbdOptions/Disk/al-updates&#x60; - boolean - &#x60;DrbdOptions/Disk/discard-zeroes-if-aligned&#x60; - boolean - &#x60;DrbdOptions/Disk/disable-write-same&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-timeout&#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/rs-discard-granularity&#x60; - range - &#x60;DrbdOptions/PeerDevice/resync-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-plan-ahead&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-delay-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-fill-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-max-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-min-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/bitmap&#x60; - boolean - &#x60;DrbdOptions/Resource/cpu-mask&#x60; - string - &#x60;DrbdOptions/Resource/on-no-data-accessible&#x60; - enum * io-error * suspend-io - &#x60;DrbdOptions/Resource/auto-promote&#x60; - boolean - &#x60;DrbdOptions/Resource/peer-ack-window&#x60; - range - &#x60;DrbdOptions/Resource/peer-ack-delay&#x60; - range - &#x60;DrbdOptions/Resource/twopc-timeout&#x60; - range - &#x60;DrbdOptions/Resource/twopc-retry-timeout&#x60; - range - &#x60;DrbdOptions/Resource/auto-promote-timeout&#x60; - range - &#x60;DrbdOptions/Resource/max-io-depth&#x60; - range - &#x60;DrbdOptions/Resource/quorum&#x60; - enum [&#x60;1-32&#x60;] * off * majority * all - &#x60;DrbdOptions/Resource/on-no-quorum&#x60; - enum * io-error * suspend-io - &#x60;DrbdOptions/Resource/quorum-minimum-redundancy&#x60; - enum [&#x60;1-32&#x60;] * off * majority * all - &#x60;DrbdOptions/Net/transport&#x60; - string - &#x60;DrbdOptions/Net/protocol&#x60; - enum * A * B * C - &#x60;DrbdOptions/Net/timeout&#x60; - range - &#x60;DrbdOptions/Net/max-epoch-size&#x60; - range - &#x60;DrbdOptions/Net/connect-int&#x60; - range - &#x60;DrbdOptions/Net/ping-int&#x60; - range - &#x60;DrbdOptions/Net/sndbuf-size&#x60; - range - &#x60;DrbdOptions/Net/rcvbuf-size&#x60; - range - &#x60;DrbdOptions/Net/ko-count&#x60; - range - &#x60;DrbdOptions/Net/allow-two-primaries&#x60; - boolean - &#x60;DrbdOptions/Net/cram-hmac-alg&#x60; - string - &#x60;DrbdOptions/Net/shared-secret&#x60; - string - &#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/after-sb-1pri&#x60; - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - &#x60;DrbdOptions/Net/after-sb-2pri&#x60; - enum * disconnect * call-pri-lost-after-sb * violently-as0p - &#x60;DrbdOptions/Net/always-asbp&#x60; - boolean - &#x60;DrbdOptions/Net/rr-conflict&#x60; - enum * disconnect * call-pri-lost * violently * retry-connect - &#x60;DrbdOptions/Net/ping-timeout&#x60; - range - &#x60;DrbdOptions/Net/data-integrity-alg&#x60; - string - &#x60;DrbdOptions/Net/tcp-cork&#x60; - boolean - &#x60;DrbdOptions/Net/on-congestion&#x60; - enum * block * pull-ahead * disconnect - &#x60;DrbdOptions/Net/congestion-fill&#x60; - range - &#x60;DrbdOptions/Net/congestion-extents&#x60; - range - &#x60;DrbdOptions/Net/csums-alg&#x60; - string - &#x60;DrbdOptions/Net/csums-after-crash-only&#x60; - boolean - &#x60;DrbdOptions/Net/verify-alg&#x60; - string - &#x60;DrbdOptions/Net/use-rle&#x60; - boolean - &#x60;DrbdOptions/Net/socket-check-timeout&#x60; - range - &#x60;DrbdOptions/Net/fencing&#x60; - enum * dont-care * resource-only * resource-and-stonith - &#x60;DrbdOptions/Net/max-buffers&#x60; - range - &#x60;DrbdOptions/Net/allow-remote-read&#x60; - boolean - &#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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



214
215
216
217
218
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 214

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



267
268
269
270
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 267

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ControllerVersion, Integer, Hash)>)

    ControllerVersion data, response status code and response headers



276
277
278
279
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 276

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. Also note VDO can only used with LVM-fat.

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



326
327
328
329
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 326

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. Also note VDO can only used with LVM-fat.

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



337
338
339
340
341
342
343
344
345
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 337

def create_device_pool_with_http_info(node, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevelopersApi.create_device_pool ...'
  end
  # verify the required parameter 'node' is set
  if @api_client.config.client_side_validation && node.nil?
    fail ArgumentError, "Missing the required parameter 'node' when calling DevelopersApi.create_device_pool"
  end
  # resource path
  local_var_path = '/v1/physical-storage/{node}'.sub('{' + 'node' + '}', CGI.escape(node.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'physical_storage_create'])

  # return_type
  return_type = opts[:debug_return_type] || 'ApiCallRc'

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

  new_options = opts.merge(
    :operation => :"DevelopersApi.create_device_pool",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DevelopersApi#create_device_pool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

creates a SOS report in the log directory of the controller

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :since (Integer)

    Unix epoch milliseconds

Returns:



395
396
397
398
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 395

def create_sos_report(node, opts = {})
  data, _status_code, _headers = create_sos_report_with_http_info(node, opts)
  data
end

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

creates a SOS report in the log directory of the controller

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :since (Integer)

    Unix epoch milliseconds

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



405
406
407
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 405

def create_sos_report_with_http_info(node, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevelopersApi.create_sos_report ...'
  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_sos_report"
  end
  # resource path
  local_var_path = '/v1/sos-report'.sub('{' + 'node' + '}', CGI.escape(node.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].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] || 'ApiCallRc'

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

  new_options = opts.merge(
    :operation => :"DevelopersApi.create_sos_report",
    :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#create_sos_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#ctrl_set_config(opts = {}) ⇒ ApiCallRc

modify controller config

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



458
459
460
461
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 458

def ctrl_set_config(opts = {})
  data, _status_code, _headers = ctrl_set_config_with_http_info(opts)
  data
end

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

modify controller config

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



467
468
469
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 467

def ctrl_set_config_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevelopersApi.ctrl_set_config ...'
  end
  # resource path
  local_var_path = '/v1/controller/config'

  # 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_config'])

  # return_type
  return_type = opts[:debug_return_type] || 'ApiCallRc'

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

  new_options = opts.merge(
    :operation => :"DevelopersApi.ctrl_set_config",
    :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#ctrl_set_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_sos_report(node, opts = {}) ⇒ File

request sos report to download

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :since (Integer)

    Unix epoch milliseconds

Returns:

  • (File)


521
522
523
524
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 521

def download_sos_report(node, opts = {})
  data, _status_code, _headers = download_sos_report_with_http_info(node, opts)
  data
end

#download_sos_report_with_http_info(node, opts = {}) ⇒ Array<(File, Integer, Hash)>

request sos report to download

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :since (Integer)

    Unix epoch milliseconds

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



531
532
533
534
535
536
537
538
539
540
541
542
543
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 531

def download_sos_report_with_http_info(node, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevelopersApi.download_sos_report ...'
  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.download_sos_report"
  end
  # resource path
  local_var_path = '/v1/sos-report/download'.sub('{' + 'node' + '}', CGI.escape(node.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', '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] || 'File'

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

  new_options = opts.merge(
    :operation => :"DevelopersApi.download_sos_report",
    :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#download_sos_report\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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



584
585
586
587
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 584

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 593

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (String)

Returns:



646
647
648
649
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 646

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (String)

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
698
699
700
701
702
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 655

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



708
709
710
711
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 708

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
761
762
763
764
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 717

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_delete(opts = {}) ⇒ ApiCallRc

Deletes a range of error-reports Deletes a range of error-reports

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



771
772
773
774
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 771

def error_report_delete(opts = {})
  data, _status_code, _headers = error_report_delete_with_http_info(opts)
  data
end

#error_report_delete_single(reportid, opts = {}) ⇒ ApiCallRc

Deletes a single error-report Deletes a single error-report

Parameters:

  • reportid (String)

    Error id to select

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



835
836
837
838
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 835

def error_report_delete_single(reportid, opts = {})
  data, _status_code, _headers = error_report_delete_single_with_http_info(reportid, opts)
  data
end

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

Deletes a single error-report Deletes a single error-report

Parameters:

  • reportid (String)

    Error id to select

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 845

def error_report_delete_single_with_http_info(reportid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevelopersApi.error_report_delete_single ...'
  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_delete_single"
  end
  # resource path
  local_var_path = '/v1/error-reports/{reportid}'.sub('{' + 'reportid' + '}', CGI.escape(reportid.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.error_report_delete_single",
    :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#error_report_delete_single\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Deletes a range of error-reports Deletes a range of error-reports

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
824
825
826
827
828
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 781

def error_report_delete_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevelopersApi.error_report_delete ...'
  end
  # resource path
  local_var_path = '/v1/error-reports'

  # 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[:'error_report_delete'])

  # return_type
  return_type = opts[:debug_return_type] || 'ApiCallRc'

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

  new_options = opts.merge(
    :operation => :"DevelopersApi.error_report_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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DevelopersApi#error_report_delete\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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :node (String)

    Only show error reports of this node

  • :since (Integer)

    Unix epoch milliseconds

  • :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

Returns:



903
904
905
906
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 903

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :node (String)

    Only show error reports of this node

  • :since (Integer)

    Unix epoch milliseconds

  • :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

Returns:

  • (Array<(Array<ErrorReport>, Integer, Hash)>)

    Array<ErrorReport> data, response status code and response headers



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
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 918

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

Parameters:

  • reportid (String)

    Error id to select

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :node (String)

    Only show error reports of this node

  • :since (Integer)

    Unix epoch milliseconds

  • :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

Returns:



991
992
993
994
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 991

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

Parameters:

  • reportid (String)

    Error id to select

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :node (String)

    Only show error reports of this node

  • :since (Integer)

    Unix epoch milliseconds

  • :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

Returns:

  • (Array<(Array<ErrorReport>, Integer, Hash)>)

    Array<ErrorReport> data, response status code and response headers



1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1007

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

Parameters:

  • instance (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1078
1079
1080
1081
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1078

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

Parameters:

  • instance (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1088

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

Parameters:

  • instance (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1141
1142
1143
1144
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1141

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

Parameters:

  • instance (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<KeyValueStore>, Integer, Hash)>)

    Array<KeyValueStore> data, response status code and response headers



1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1151

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

Parameters:

  • instance (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



1205
1206
1207
1208
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1205

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

Parameters:

  • instance (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1216

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1273
1274
1275
1276
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1273

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<KeyValueStore>, Integer, Hash)>)

    Array<KeyValueStore> data, response status code and response headers



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
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1282

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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



1332
1333
1334
1335
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1332

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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1343

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

Parameters:

  • node (String)

    node to use

  • netinterface (String)

    netinterface name to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1402
1403
1404
1405
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1402

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

Parameters:

  • node (String)

    node to use

  • netinterface (String)

    netinterface name to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1413

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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:



1472
1473
1474
1475
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1472

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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:

  • (Array<(Array<NetInterface>, Integer, Hash)>)

    Array<NetInterface> data, response status code and response headers



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
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1484

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

Parameters:

  • node (String)

    node to use

  • netinterface (String)

    netinterface name to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



1553
1554
1555
1556
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1553

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

Parameters:

  • node (String)

    node to use

  • netinterface (String)

    netinterface name to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1565

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :node (Node)

    Node to add to Linstor

Returns:



1627
1628
1629
1630
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1627

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :node (Node)

    Node to add to Linstor

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1637

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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1691
1692
1693
1694
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1691

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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1701

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :nodes (Array<String>)

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

  • :props (Array<String>)

    filter by given properties, full property path

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:



1757
1758
1759
1760
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1757

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :nodes (Array<String>)

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

  • :props (Array<String>)

    filter by given properties, full property path

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:

  • (Array<(Array<Node>, Integer, Hash)>)

    Array<Node> data, response status code and response headers



1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1770

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[:'nodes'] = @api_client.build_collection_param(opts[:'nodes'], :multi) if !opts[:'nodes'].nil?
  query_params[:'props'] = @api_client.build_collection_param(opts[:'props'], :multi) if !opts[:'props'].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<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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1835
1836
1837
1838
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1835

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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1845

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 for external metadata. - 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 - sys/fs/blkio_throttle_read_iops - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_iops_device - sys/fs/blkio_throttle_write_iops - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_iops_device - DrbdOptions/AutoEvictAfterTime - long Time a node can be offline before it is declared EVICTED in minutes - 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/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 - Cache/OpMode - enum Operation mode * writeback * writethrough * passthrough - Cache/MetaPool - regex[‘^[a-zA-Z0-9_-]2,47$`] Name of the storage pool used for the cache metadata. If not specified, this will default to the CachePool property - Cache/Metasize - regex[‘^100%|1,2([.][0-9]*)?%|[0-9]2,$`] Size of the cache in % (0-100) or KiB otherwise. - Cache/CachePool - regex[‘^[a-zA-Z0-9_-]2,47$`] Name of the storage pool used for the cache cache device - Cache/Cachesize - regex[‘^100%|1,2([.][0-9]*)?%|[0-9]2,$`] Size of the cache in % (0-100) or KiB otherwise. - Cache/Blocksize - long Block size - Cache/Policy - enum Replacemant policy * mq * smq * cleaner - StorDriver/LvcreateOptions - regex[.*] Additional parameters added to every ’lvcreate … ‘ command - StorDriver/ZfscreateOptions - regex[.*] Additional parameters added to every ’zfs create … ‘ command - StorDriver/Openflex/ApiHost - regex[.+] Openflex API host name - StorDriver/Openflex/ApiPort - regex[[0-9]+] Openflex API port - StorDriver/Openflex/UserName - regex[.+] Openflex user name - StorDriver/Openflex/UserPassword - regex[.+] Openflex password - StorDriver/Openflex/StorDev - regex[.+] Openflex storage device - StorDriver/Openflex/StorDevHost - regex[.+] Openflex storage device host - StorDriver/Openflex/JobWaitDelay - regex[[0-9]+] Delay in milliseconds linstor waits between fetching the job status - StorDriver/Openflex/JobWaitMaxCount - regex[[0-9]+] Maximum retries with wait delay until openflex fails - Autoplacer/MaxThroughput - long The maximum throughput the given storage pool is capable of. - DrbdProxy/AutoEnable - boolean_true_false - Site - string - DrbdOptions/auto-diskful-allow-cleanup - boolean_true_false Allows this resource to be cleaned up after toggle-disk + resync is finished

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



1899
1900
1901
1902
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1899

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 for external metadata. - &#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;sys/fs/blkio_throttle_read_iops&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_iops_device - &#x60;sys/fs/blkio_throttle_write_iops&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_iops_device - &#x60;DrbdOptions/AutoEvictAfterTime&#x60; - long Time a node can be offline before it is declared EVICTED in minutes - &#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/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;Cache/OpMode&#x60; - enum Operation mode * writeback * writethrough * passthrough - &#x60;Cache/MetaPool&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Name of the storage pool used for the cache metadata. If not specified, this will default to the CachePool property - &#x60;Cache/Metasize&#x60; - regex[&#x60;^100%|1,2([.][0-9]*)?%|[0-9]2,$&#x60;] Size of the cache in % (0-100) or KiB otherwise. - &#x60;Cache/CachePool&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Name of the storage pool used for the cache cache device - &#x60;Cache/Cachesize&#x60; - regex[&#x60;^100%|1,2([.][0-9]*)?%|[0-9]2,$&#x60;] Size of the cache in % (0-100) or KiB otherwise. - &#x60;Cache/Blocksize&#x60; - long Block size - &#x60;Cache/Policy&#x60; - enum Replacemant policy * mq * smq * cleaner - &#x60;StorDriver/LvcreateOptions&#x60; - regex Additional parameters added to every &#39;lvcreate … &#39; command - &#x60;StorDriver/ZfscreateOptions&#x60; - regex Additional parameters added to every &#39;zfs create … &#39; command - &#x60;StorDriver/Openflex/ApiHost&#x60; - regex Openflex API host name - &#x60;StorDriver/Openflex/ApiPort&#x60; - regex[&#x60;&#x60;] Openflex API port - &#x60;StorDriver/Openflex/UserName&#x60; - regex Openflex user name - &#x60;StorDriver/Openflex/UserPassword&#x60; - regex Openflex password - &#x60;StorDriver/Openflex/StorDev&#x60; - regex Openflex storage device - &#x60;StorDriver/Openflex/StorDevHost&#x60; - regex Openflex storage device host - &#x60;StorDriver/Openflex/JobWaitDelay&#x60; - regex[&#x60;&#x60;] Delay in milliseconds linstor waits between fetching the job status - &#x60;StorDriver/Openflex/JobWaitMaxCount&#x60; - regex[&#x60;&#x60;] Maximum retries with wait delay until openflex fails - &#x60;Autoplacer/MaxThroughput&#x60; - long The maximum throughput the given storage pool is capable of. - &#x60;DrbdProxy/AutoEnable&#x60; - boolean_true_false - &#x60;Site&#x60; - string - &#x60;DrbdOptions/auto-diskful-allow-cleanup&#x60; - boolean_true_false Allows this resource to be cleaned up after toggle-disk + resync is finished

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1910

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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1968
1969
1970
1971
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1968

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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 1978

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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2032
2033
2034
2035
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2032

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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2043

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

Parameters:

  • node (String)

    node to use

  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2102
2103
2104
2105
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2102

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

Parameters:

  • node (String)

    node to use

  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2113

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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

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

Returns:



2174
2175
2176
2177
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2174

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

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

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

Returns:

  • (Array<(Array<StoragePool>, Integer, Hash)>)

    Array<StoragePool> data, response status code and response headers



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
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2188

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/StorPoolName - regex[[a-zA-Z0-9_/-]+] - 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/LvcreateOptions - regex[.*] Additional parameters added to every ’lvcreate … ‘ command - StorDriver/ZfscreateOptions - regex[.*] Additional parameters added to every ’zfs create … ‘ command - 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 - sys/fs/blkio_throttle_read_iops - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_iops_device - sys/fs/blkio_throttle_write_iops - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_iops_device - StorDriver/Openflex/ApiHost - regex[.+] Openflex API host name - StorDriver/Openflex/ApiPort - regex[[0-9]+] Openflex API port - StorDriver/Openflex/UserName - regex[.+] Openflex user name - StorDriver/Openflex/UserPassword - regex[.+] Openflex password - StorDriver/Openflex/StorDev - regex[.+] Openflex storage device - StorDriver/Openflex/StorDevHost - regex[.+] Openflex storage device host - StorDriver/Openflex/StorPool - regex[[0-9]+] Openflex storage pool name - Autoplacer/MaxThroughput - long The maximum throughput the given storage pool is capable of.

Parameters:

  • node (String)

    node to use

  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2259
2260
2261
2262
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2259

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/StorPoolName&#x60; - regex[&#x60;&#x60;] - &#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/LvcreateOptions&#x60; - regex Additional parameters added to every &#39;lvcreate … &#39; command - &#x60;StorDriver/ZfscreateOptions&#x60; - regex Additional parameters added to every &#39;zfs create … &#39; command - &#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;sys/fs/blkio_throttle_read_iops&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_iops_device - &#x60;sys/fs/blkio_throttle_write_iops&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_iops_device - &#x60;StorDriver/Openflex/ApiHost&#x60; - regex Openflex API host name - &#x60;StorDriver/Openflex/ApiPort&#x60; - regex[&#x60;&#x60;] Openflex API port - &#x60;StorDriver/Openflex/UserName&#x60; - regex Openflex user name - &#x60;StorDriver/Openflex/UserPassword&#x60; - regex Openflex password - &#x60;StorDriver/Openflex/StorDev&#x60; - regex Openflex storage device - &#x60;StorDriver/Openflex/StorDevHost&#x60; - regex Openflex storage device host - &#x60;StorDriver/Openflex/StorPool&#x60; - regex[&#x60;+&#x60;] Openflex storage pool name - &#x60;Autoplacer/MaxThroughput&#x60; - long The maximum throughput the given storage pool is capable of.

Parameters:

  • node (String)

    node to use

  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2271

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2333
2334
2335
2336
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2333

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

Parameters:

  • resource_group (String)

    resource group to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2397
2398
2399
2400
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2397

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

Parameters:

  • resource_group (String)

    resource group to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(MaxVolumeSizes, Integer, Hash)>)

    MaxVolumeSizes data, response status code and response headers



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
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2407

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(MaxVolumeSizes, Integer, Hash)>)

    MaxVolumeSizes data, response status code and response headers



2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2343

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.

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2461
2462
2463
2464
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2461

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.

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2472

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

Parameters:

  • resource (String)

    resource to use

  • node_a (String)

    source node of the connection

  • node_b (String)

    target node of the connection

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2532
2533
2534
2535
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2532

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

Parameters:

  • resource (String)

    resource to use

  • node_a (String)

    source node of the connection

  • node_b (String)

    target node of the connection

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<ResourceConnection>, Integer, Hash)>)

    Array<ResourceConnection> data, response status code and response headers



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
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2544

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/resync-rate - range[1-8388608] - DrbdOptions/PeerDevice/c-plan-ahead - range[0-300] - DrbdOptions/PeerDevice/c-delay-target - range[1-100] - DrbdOptions/PeerDevice/c-fill-target - range[0-1048576] - DrbdOptions/PeerDevice/c-max-rate - range[250-4194304] - DrbdOptions/PeerDevice/c-min-rate - range[0-4194304] - DrbdOptions/PeerDevice/bitmap - boolean - DrbdOptions/Net/transport - string - DrbdOptions/Net/protocol - enum * A * B * C - DrbdOptions/Net/timeout - range[1-600] - DrbdOptions/Net/max-epoch-size - range[1-20000] - DrbdOptions/Net/connect-int - range[1-120] - DrbdOptions/Net/ping-int - range[1-120] - DrbdOptions/Net/sndbuf-size - range[0-10485760] - DrbdOptions/Net/rcvbuf-size - range[0-10485760] - DrbdOptions/Net/ko-count - range[0-200] - DrbdOptions/Net/allow-two-primaries - boolean - DrbdOptions/Net/cram-hmac-alg - string - DrbdOptions/Net/shared-secret - string - 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/after-sb-1pri - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - DrbdOptions/Net/after-sb-2pri - enum * disconnect * call-pri-lost-after-sb * violently-as0p - DrbdOptions/Net/always-asbp - boolean - DrbdOptions/Net/rr-conflict - enum * disconnect * call-pri-lost * violently * retry-connect - DrbdOptions/Net/ping-timeout - range[1-300] - DrbdOptions/Net/data-integrity-alg - string - DrbdOptions/Net/tcp-cork - boolean - DrbdOptions/Net/on-congestion - enum * block * pull-ahead * disconnect - DrbdOptions/Net/congestion-fill - range[0-20971520] - DrbdOptions/Net/congestion-extents - range[67-65534] - DrbdOptions/Net/csums-alg - string - DrbdOptions/Net/csums-after-crash-only - boolean - DrbdOptions/Net/verify-alg - string - DrbdOptions/Net/use-rle - boolean - DrbdOptions/Net/socket-check-timeout - range[0-300] - DrbdOptions/Net/fencing - enum * dont-care * resource-only * resource-and-stonith - DrbdOptions/Net/max-buffers - range[32-131072] - DrbdOptions/Net/allow-remote-read - boolean

Parameters:

  • resource (String)

    resource to use

  • node_a (String)

    source node of the connection

  • node_b (String)

    target node of the connection

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2608
2609
2610
2611
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2608

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/resync-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-plan-ahead&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-delay-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-fill-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-max-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-min-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/bitmap&#x60; - boolean - &#x60;DrbdOptions/Net/transport&#x60; - string - &#x60;DrbdOptions/Net/protocol&#x60; - enum * A * B * C - &#x60;DrbdOptions/Net/timeout&#x60; - range - &#x60;DrbdOptions/Net/max-epoch-size&#x60; - range - &#x60;DrbdOptions/Net/connect-int&#x60; - range - &#x60;DrbdOptions/Net/ping-int&#x60; - range - &#x60;DrbdOptions/Net/sndbuf-size&#x60; - range - &#x60;DrbdOptions/Net/rcvbuf-size&#x60; - range - &#x60;DrbdOptions/Net/ko-count&#x60; - range - &#x60;DrbdOptions/Net/allow-two-primaries&#x60; - boolean - &#x60;DrbdOptions/Net/cram-hmac-alg&#x60; - string - &#x60;DrbdOptions/Net/shared-secret&#x60; - string - &#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/after-sb-1pri&#x60; - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - &#x60;DrbdOptions/Net/after-sb-2pri&#x60; - enum * disconnect * call-pri-lost-after-sb * violently-as0p - &#x60;DrbdOptions/Net/always-asbp&#x60; - boolean - &#x60;DrbdOptions/Net/rr-conflict&#x60; - enum * disconnect * call-pri-lost * violently * retry-connect - &#x60;DrbdOptions/Net/ping-timeout&#x60; - range - &#x60;DrbdOptions/Net/data-integrity-alg&#x60; - string - &#x60;DrbdOptions/Net/tcp-cork&#x60; - boolean - &#x60;DrbdOptions/Net/on-congestion&#x60; - enum * block * pull-ahead * disconnect - &#x60;DrbdOptions/Net/congestion-fill&#x60; - range - &#x60;DrbdOptions/Net/congestion-extents&#x60; - range - &#x60;DrbdOptions/Net/csums-alg&#x60; - string - &#x60;DrbdOptions/Net/csums-after-crash-only&#x60; - boolean - &#x60;DrbdOptions/Net/verify-alg&#x60; - string - &#x60;DrbdOptions/Net/use-rle&#x60; - boolean - &#x60;DrbdOptions/Net/socket-check-timeout&#x60; - range - &#x60;DrbdOptions/Net/fencing&#x60; - enum * dont-care * resource-only * resource-and-stonith - &#x60;DrbdOptions/Net/max-buffers&#x60; - range - &#x60;DrbdOptions/Net/allow-remote-read&#x60; - boolean

Parameters:

  • resource (String)

    resource to use

  • node_a (String)

    source node of the connection

  • node_b (String)

    target node of the connection

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2621

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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2687
2688
2689
2690
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2687

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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<ResourceConnection>, Integer, Hash)>)

    Array<ResourceConnection> data, response status code and response headers



2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2697

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).

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2751
2752
2753
2754
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2751

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2822
2823
2824
2825
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2822

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;

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2834

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).

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2762

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2896
2897
2898
2899
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2896

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2906

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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2960
2961
2962
2963
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2960

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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
3011
3012
3013
3014
3015
3016
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 2970

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :resource_definitions (Array<String>)

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

  • :props (Array<String>)

    filter by given properties, full property path

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:



3026
3027
3028
3029
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3026

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :resource_definitions (Array<String>)

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

  • :props (Array<String>)

    filter by given properties, full property path

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:

  • (Array<(Array<ResourceDefinition>, Integer, Hash)>)

    Array<ResourceDefinition> data, response status code and response headers



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
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3039

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[:'props'] = @api_client.build_collection_param(opts[:'props'], :multi) if !opts[:'props'].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 for external metadata. - 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 - DrbdOptions/AutoEvictMinReplicaCount - long The minimum amount of replicas that should be present for a resource at all times. - FileSystem/Type - enum File system type to use * ext4 * xfs - FileSystem/MkfsParams - string Additional parameters for the mkfs command - NVMe/TRType - enum NVMe transportion type * rdma * tcp - NVMe/Port - range[1-65535] NVMe port - StorDriver/LvcreateType - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - StorDriver/LvcreateOptions - regex[.*] Additional parameters added to every ’lvcreate … ‘ command - StorDriver/ZfscreateOptions - regex[.*] Additional parameters added to every ’zfs create … ‘ command - 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 - sys/fs/blkio_throttle_read_iops - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_iops_device - sys/fs/blkio_throttle_write_iops - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_iops_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 - DrbdOptions/auto-diskful - long Makes a resource diskful if it was continously diskless primary for X minutes - DrbdOptions/auto-diskful-allow-cleanup - boolean_true_false Allows this resource to be cleaned up after toggle-disk + resync is finished - 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/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 - Cache/OpMode - enum Operation mode * writeback * writethrough * passthrough - Cache/MetaPool - regex[‘^[a-zA-Z0-9_-]2,47$`] Name of the storage pool used for the cache metadata. If not specified, this will default to the CachePool property - Cache/Metasize - regex[‘^100%|1,2([.][0-9]*)?%|[0-9]2,$`] Size of the cache in % (0-100) or KiB otherwise. - Cache/CachePool - regex[‘^[a-zA-Z0-9_-]2,47$`] Name of the storage pool used for the cache cache device - Cache/Cachesize - regex[‘^100%|1,2([.][0-9]*)?%|[0-9]2,$`] Size of the cache in % (0-100) or KiB otherwise. - Cache/Blocksize - long Block size - Cache/Policy - enum Replacemant policy * mq * smq * cleaner - SnapshotShipping/SourceNode - string Node name of the snapshot shipping source - SnapshotShipping/TargetNode - string Node name of the snapshot shipping target - SnapshotShipping/RunEvery - long Runs every X minutes an auto-snapshot-shipping unless the current snapshot-shipping is still running. In this case a new one will be started asap. - SnapshotShipping/Keep - long Keeps the last X sihpped snapshots. Removing this property or having a value <= 0 disables auto-cleanup, all auto-snapshots will be kept - AutoSnapshot/RunEvery - long Runs every X minutes an snapshot-creation. Removing this property or having a value <= 0 disables auto-snapshotting. - AutoSnapshot/Keep - long Keeps the last X auto-snapshots. Removing this property or having a value <= 0 disables auto-cleanup, all auto-snapshots will be kept - AutoSnapshot/NextAutoId - long The next ID to try for auto-snapshots - DrbdOptions/Disk/on-io-error - enum * pass_on * call-local-io-error * detach - DrbdOptions/Disk/disk-barrier - boolean - DrbdOptions/Disk/disk-flushes - boolean - DrbdOptions/Disk/disk-drain - boolean - DrbdOptions/Disk/md-flushes - boolean - DrbdOptions/Disk/resync-after - string - DrbdOptions/Disk/al-extents - range[67-65534] - DrbdOptions/Disk/al-updates - boolean - DrbdOptions/Disk/discard-zeroes-if-aligned - boolean - DrbdOptions/Disk/disable-write-same - boolean - DrbdOptions/Disk/disk-timeout - range[0-6000] - 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/rs-discard-granularity - range[0-1048576] - DrbdOptions/PeerDevice/resync-rate - range[1-8388608] - DrbdOptions/PeerDevice/c-plan-ahead - range[0-300] - DrbdOptions/PeerDevice/c-delay-target - range[1-100] - DrbdOptions/PeerDevice/c-fill-target - range[0-1048576] - DrbdOptions/PeerDevice/c-max-rate - range[250-4194304] - DrbdOptions/PeerDevice/c-min-rate - range[0-4194304] - DrbdOptions/PeerDevice/bitmap - boolean - DrbdOptions/Resource/cpu-mask - string - DrbdOptions/Resource/on-no-data-accessible - enum * io-error * suspend-io - DrbdOptions/Resource/auto-promote - boolean - DrbdOptions/Resource/peer-ack-window - range[2048-204800] - DrbdOptions/Resource/peer-ack-delay - range[1-10000] - DrbdOptions/Resource/twopc-timeout - range[50-600] - DrbdOptions/Resource/twopc-retry-timeout - range[1-50] - DrbdOptions/Resource/auto-promote-timeout - range[0-600] - DrbdOptions/Resource/max-io-depth - range[4-4294967295] - DrbdOptions/Resource/quorum - enum [1-32] * off * majority * all - DrbdOptions/Resource/on-no-quorum - enum * io-error * suspend-io - DrbdOptions/Resource/quorum-minimum-redundancy - enum [1-32] * off * majority * all - DrbdOptions/Net/transport - string - DrbdOptions/Net/protocol - enum * A * B * C - DrbdOptions/Net/timeout - range[1-600] - DrbdOptions/Net/max-epoch-size - range[1-20000] - DrbdOptions/Net/connect-int - range[1-120] - DrbdOptions/Net/ping-int - range[1-120] - DrbdOptions/Net/sndbuf-size - range[0-10485760] - DrbdOptions/Net/rcvbuf-size - range[0-10485760] - DrbdOptions/Net/ko-count - range[0-200] - DrbdOptions/Net/allow-two-primaries - boolean - DrbdOptions/Net/cram-hmac-alg - string - DrbdOptions/Net/shared-secret - string - 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/after-sb-1pri - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - DrbdOptions/Net/after-sb-2pri - enum * disconnect * call-pri-lost-after-sb * violently-as0p - DrbdOptions/Net/always-asbp - boolean - DrbdOptions/Net/rr-conflict - enum * disconnect * call-pri-lost * violently * retry-connect - DrbdOptions/Net/ping-timeout - range[1-300] - DrbdOptions/Net/data-integrity-alg - string - DrbdOptions/Net/tcp-cork - boolean - DrbdOptions/Net/on-congestion - enum * block * pull-ahead * disconnect - DrbdOptions/Net/congestion-fill - range[0-20971520] - DrbdOptions/Net/congestion-extents - range[67-65534] - DrbdOptions/Net/csums-alg - string - DrbdOptions/Net/csums-after-crash-only - boolean - DrbdOptions/Net/verify-alg - string - DrbdOptions/Net/use-rle - boolean - DrbdOptions/Net/socket-check-timeout - range[0-300] - DrbdOptions/Net/fencing - enum * dont-care * resource-only * resource-and-stonith - DrbdOptions/Net/max-buffers - range[32-131072] - DrbdOptions/Net/allow-remote-read - boolean - 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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



3105
3106
3107
3108
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3105

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 for external metadata. - &#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;DrbdOptions/AutoEvictMinReplicaCount&#x60; - long The minimum amount of replicas that should be present for a resource at all times. - &#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/TRType&#x60; - enum NVMe transportion type * rdma * tcp - &#x60;NVMe/Port&#x60; - range NVMe port - &#x60;StorDriver/LvcreateType&#x60; - enum * linear * striped * mirror * raid0 * raid1 * raid4 * raid5 * raid6 * raid10 * lzma * lz4 - &#x60;StorDriver/LvcreateOptions&#x60; - regex Additional parameters added to every &#39;lvcreate … &#39; command - &#x60;StorDriver/ZfscreateOptions&#x60; - regex Additional parameters added to every &#39;zfs create … &#39; command - &#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;sys/fs/blkio_throttle_read_iops&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_iops_device - &#x60;sys/fs/blkio_throttle_write_iops&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_iops_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;DrbdOptions/auto-diskful&#x60; - long Makes a resource diskful if it was continously diskless primary for X minutes - &#x60;DrbdOptions/auto-diskful-allow-cleanup&#x60; - boolean_true_false Allows this resource to be cleaned up after toggle-disk + resync is finished - &#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/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;Cache/OpMode&#x60; - enum Operation mode * writeback * writethrough * passthrough - &#x60;Cache/MetaPool&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Name of the storage pool used for the cache metadata. If not specified, this will default to the CachePool property - &#x60;Cache/Metasize&#x60; - regex[&#x60;^100%|1,2([.][0-9]*)?%|[0-9]2,$&#x60;] Size of the cache in % (0-100) or KiB otherwise. - &#x60;Cache/CachePool&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Name of the storage pool used for the cache cache device - &#x60;Cache/Cachesize&#x60; - regex[&#x60;^100%|1,2([.][0-9]*)?%|[0-9]2,$&#x60;] Size of the cache in % (0-100) or KiB otherwise. - &#x60;Cache/Blocksize&#x60; - long Block size - &#x60;Cache/Policy&#x60; - enum Replacemant policy * mq * smq * cleaner - &#x60;SnapshotShipping/SourceNode&#x60; - string Node name of the snapshot shipping source - &#x60;SnapshotShipping/TargetNode&#x60; - string Node name of the snapshot shipping target - &#x60;SnapshotShipping/RunEvery&#x60; - long Runs every X minutes an auto-snapshot-shipping unless the current snapshot-shipping is still running. In this case a new one will be started asap. - &#x60;SnapshotShipping/Keep&#x60; - long Keeps the last X sihpped snapshots. Removing this property or having a value &lt;&#x3D; 0 disables auto-cleanup, all auto-snapshots will be kept - &#x60;AutoSnapshot/RunEvery&#x60; - long Runs every X minutes an snapshot-creation. Removing this property or having a value &lt;&#x3D; 0 disables auto-snapshotting. - &#x60;AutoSnapshot/Keep&#x60; - long Keeps the last X auto-snapshots. Removing this property or having a value &lt;&#x3D; 0 disables auto-cleanup, all auto-snapshots will be kept - &#x60;AutoSnapshot/NextAutoId&#x60; - long The next ID to try for auto-snapshots - &#x60;DrbdOptions/Disk/on-io-error&#x60; - enum * pass_on * call-local-io-error * detach - &#x60;DrbdOptions/Disk/disk-barrier&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-drain&#x60; - boolean - &#x60;DrbdOptions/Disk/md-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/resync-after&#x60; - string - &#x60;DrbdOptions/Disk/al-extents&#x60; - range - &#x60;DrbdOptions/Disk/al-updates&#x60; - boolean - &#x60;DrbdOptions/Disk/discard-zeroes-if-aligned&#x60; - boolean - &#x60;DrbdOptions/Disk/disable-write-same&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-timeout&#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/rs-discard-granularity&#x60; - range - &#x60;DrbdOptions/PeerDevice/resync-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-plan-ahead&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-delay-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-fill-target&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-max-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/c-min-rate&#x60; - range - &#x60;DrbdOptions/PeerDevice/bitmap&#x60; - boolean - &#x60;DrbdOptions/Resource/cpu-mask&#x60; - string - &#x60;DrbdOptions/Resource/on-no-data-accessible&#x60; - enum * io-error * suspend-io - &#x60;DrbdOptions/Resource/auto-promote&#x60; - boolean - &#x60;DrbdOptions/Resource/peer-ack-window&#x60; - range - &#x60;DrbdOptions/Resource/peer-ack-delay&#x60; - range - &#x60;DrbdOptions/Resource/twopc-timeout&#x60; - range - &#x60;DrbdOptions/Resource/twopc-retry-timeout&#x60; - range - &#x60;DrbdOptions/Resource/auto-promote-timeout&#x60; - range - &#x60;DrbdOptions/Resource/max-io-depth&#x60; - range - &#x60;DrbdOptions/Resource/quorum&#x60; - enum [&#x60;1-32&#x60;] * off * majority * all - &#x60;DrbdOptions/Resource/on-no-quorum&#x60; - enum * io-error * suspend-io - &#x60;DrbdOptions/Resource/quorum-minimum-redundancy&#x60; - enum [&#x60;1-32&#x60;] * off * majority * all - &#x60;DrbdOptions/Net/transport&#x60; - string - &#x60;DrbdOptions/Net/protocol&#x60; - enum * A * B * C - &#x60;DrbdOptions/Net/timeout&#x60; - range - &#x60;DrbdOptions/Net/max-epoch-size&#x60; - range - &#x60;DrbdOptions/Net/connect-int&#x60; - range - &#x60;DrbdOptions/Net/ping-int&#x60; - range - &#x60;DrbdOptions/Net/sndbuf-size&#x60; - range - &#x60;DrbdOptions/Net/rcvbuf-size&#x60; - range - &#x60;DrbdOptions/Net/ko-count&#x60; - range - &#x60;DrbdOptions/Net/allow-two-primaries&#x60; - boolean - &#x60;DrbdOptions/Net/cram-hmac-alg&#x60; - string - &#x60;DrbdOptions/Net/shared-secret&#x60; - string - &#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/after-sb-1pri&#x60; - enum * disconnect * consensus * discard-secondary * call-pri-lost-after-sb * violently-as0p - &#x60;DrbdOptions/Net/after-sb-2pri&#x60; - enum * disconnect * call-pri-lost-after-sb * violently-as0p - &#x60;DrbdOptions/Net/always-asbp&#x60; - boolean - &#x60;DrbdOptions/Net/rr-conflict&#x60; - enum * disconnect * call-pri-lost * violently * retry-connect - &#x60;DrbdOptions/Net/ping-timeout&#x60; - range - &#x60;DrbdOptions/Net/data-integrity-alg&#x60; - string - &#x60;DrbdOptions/Net/tcp-cork&#x60; - boolean - &#x60;DrbdOptions/Net/on-congestion&#x60; - enum * block * pull-ahead * disconnect - &#x60;DrbdOptions/Net/congestion-fill&#x60; - range - &#x60;DrbdOptions/Net/congestion-extents&#x60; - range - &#x60;DrbdOptions/Net/csums-alg&#x60; - string - &#x60;DrbdOptions/Net/csums-after-crash-only&#x60; - boolean - &#x60;DrbdOptions/Net/verify-alg&#x60; - string - &#x60;DrbdOptions/Net/use-rle&#x60; - boolean - &#x60;DrbdOptions/Net/socket-check-timeout&#x60; - range - &#x60;DrbdOptions/Net/fencing&#x60; - enum * dont-care * resource-only * resource-and-stonith - &#x60;DrbdOptions/Net/max-buffers&#x60; - range - &#x60;DrbdOptions/Net/allow-remote-read&#x60; - boolean - &#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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3116

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3175
3176
3177
3178
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3175

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3186

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

Parameters:

  • resource (String)

    resource to use

  • node_a (String)
  • node_b (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3245
3246
3247
3248
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3245

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

Parameters:

  • resource (String)

    resource to use

  • node_a (String)
  • node_b (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3257

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

Parameters:

  • resource (String)

    resource to use

  • node_a (String)

    source node of the connection

  • node_b (String)

    target node of the connection

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



3321
3322
3323
3324
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3321

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

Parameters:

  • resource (String)

    resource to use

  • node_a (String)

    source node of the connection

  • node_b (String)

    target node of the connection

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3334

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]

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



3401
3402
3403
3404
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3401

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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3412

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



3470
3471
3472
3473
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3470

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3480

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

Parameters:

  • resource_group (String)

    resource group to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3534
3535
3536
3537
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3534

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

Parameters:

  • resource_group (String)

    resource group to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
3582
3583
3584
3585
3586
3587
3588
3589
3590
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3544

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :resource_groups (Array<String>)

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

  • :props (Array<String>)

    filter by given properties, full property path

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:



3600
3601
3602
3603
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3600

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :resource_groups (Array<String>)

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

  • :props (Array<String>)

    filter by given properties, full property path

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:

  • (Array<(Array<ResourceGroup>, Integer, Hash)>)

    Array<ResourceGroup> data, response status code and response headers



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
3663
3664
3665
3666
3667
3668
3669
3670
3671
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3613

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[:'props'] = @api_client.build_collection_param(opts[:'props'], :multi) if !opts[:'props'].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

Parameters:

  • resource_group (String)

    resource group to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



3679
3680
3681
3682
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3679

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

Parameters:

  • resource_group (String)

    resource group to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
3739
3740
3741
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3690

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.

Parameters:

  • resource_group (String)

    resource group to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



3749
3750
3751
3752
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3749

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.

Parameters:

  • resource_group (String)

    resource group to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
3809
3810
3811
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3760

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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:



3820
3821
3822
3823
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3820

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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:

  • (Array<(Array<Resource>, Integer, Hash)>)

    Array<Resource> data, response status code and response headers



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
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3832

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • fromnode (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3901
3902
3903
3904
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3901

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • fromnode (String)
  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3977
3978
3979
3980
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3977

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • fromnode (String)
  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3990

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • fromnode (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 3913

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 for external metadata. - 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 - sys/fs/blkio_throttle_read_iops - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_iops_device - sys/fs/blkio_throttle_write_iops - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_iops_device - DrbdOptions/auto-diskful-allow-cleanup - boolean_true_false Allows this resource to be cleaned up after toggle-disk + resync is finished

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



4057
4058
4059
4060
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4057

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 for external metadata. - &#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 - &#x60;sys/fs/blkio_throttle_read_iops&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_iops_device - &#x60;sys/fs/blkio_throttle_write_iops&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_iops_device - &#x60;DrbdOptions/auto-diskful-allow-cleanup&#x60; - boolean_true_false Allows this resource to be cleaned up after toggle-disk + resync is finished

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4069

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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



4132
4133
4134
4135
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4132

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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4143

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

Parameters:

  • resource (String)

    resource to use

  • snapshot (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4202
4203
4204
4205
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4202

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

Parameters:

  • resource (String)

    resource to use

  • snapshot (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4213

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

Parameters:

  • resource (String)

    resource to use

  • snapshot (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4271
4272
4273
4274
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4271

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

Parameters:

  • resource (String)

    resource to use

  • snapshot (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Snapshot, Integer, Hash)>)

    Snapshot data, response status code and response headers



4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4282

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

Parameters:

  • resource (String)

    resource to use

  • snapshot (String)

    Snapshot name to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



4341
4342
4343
4344
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4341

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

Parameters:

  • resource (String)

    resource to use

  • snapshot (String)

    Snapshot name to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4353

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

Parameters:

  • resource (String)

    resource to use

  • snapshot (String)

    Snapshot name to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4416
4417
4418
4419
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4416

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

Parameters:

  • resource (String)

    resource to use

  • snapshot (String)

    Snapshot name to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4427

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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4484
4485
4486
4487
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4484

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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<Snapshot>, Integer, Hash)>)

    Array<Snapshot> data, response status code and response headers



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
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4494

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

Parameters:

  • resource (String)

    resource to use

  • snapshot (String)

    Snapshot name to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



4549
4550
4551
4552
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4549

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

Parameters:

  • resource (String)

    resource to use

  • snapshot (String)

    Snapshot name to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4561

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4624
4625
4626
4627
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4624

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4694
4695
4696
4697
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4694

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4706

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4635

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4768
4769
4770
4771
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4768

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.

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • disklesspool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4838
4839
4840
4841
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4838

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.

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • disklesspool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4850

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4779

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:



4914
4915
4916
4917
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4914

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:

  • (Array<(Array<Volume>, Integer, Hash)>)

    Array<Volume> data, response status code and response headers



4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4927

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

#satellite_config(node, opts = {}) ⇒ SatelliteConfig

show satellite config Show Satellite config

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4998
4999
5000
5001
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 4998

def satellite_config(node, opts = {})
  data, _status_code, _headers = satellite_config_with_http_info(node, opts)
  data
end

#satellite_config_with_http_info(node, opts = {}) ⇒ Array<(SatelliteConfig, Integer, Hash)>

show satellite config Show Satellite config

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SatelliteConfig, Integer, Hash)>)

    SatelliteConfig data, response status code and response headers



5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5008

def satellite_config_with_http_info(node, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevelopersApi.satellite_config ...'
  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.satellite_config"
  end
  # resource path
  local_var_path = '/v1/nodes/{node}/config'.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] || 'SatelliteConfig'

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

  new_options = opts.merge(
    :operation => :"DevelopersApi.satellite_config",
    :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#satellite_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

ship a snapshot Transfers the resource from one node to another based on snapshot-shipping

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



5062
5063
5064
5065
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5062

def snapshot_shipping(resource, opts = {})
  data, _status_code, _headers = snapshot_shipping_with_http_info(resource, opts)
  data
end

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

ship a snapshot Transfers the resource from one node to another based on snapshot-shipping

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5073

def snapshot_shipping_with_http_info(resource, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevelopersApi.snapshot_shipping ...'
  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.snapshot_shipping"
  end
  # resource path
  local_var_path = '/v1/resource-definitions/{resource}/snapshot-shipping'.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_shipping'])

  # return_type
  return_type = opts[:debug_return_type] || 'ApiCallRc'

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

  new_options = opts.merge(
    :operation => :"DevelopersApi.snapshot_shipping",
    :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#snapshot_shipping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

modify satellite config

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



5131
5132
5133
5134
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5131

def stlt_set_config(node, opts = {})
  data, _status_code, _headers = stlt_set_config_with_http_info(node, opts)
  data
end

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

modify satellite config

Parameters:

  • node (String)

    node to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5141

def stlt_set_config_with_http_info(node, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevelopersApi.stlt_set_config ...'
  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.stlt_set_config"
  end
  # resource path
  local_var_path = '/v1/nodes/{node}/config'.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[:'satellite_config'])

  # return_type
  return_type = opts[:debug_return_type] || 'ApiCallRc'

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

  new_options = opts.merge(
    :operation => :"DevelopersApi.stlt_set_config",
    :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#stlt_set_config\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]

Parameters:

  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



5200
5201
5202
5203
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5200

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

Parameters:

  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5211

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

Parameters:

  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



5269
5270
5271
5272
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5269

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

Parameters:

  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
5320
5321
5322
5323
5324
5325
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5279

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



5332
5333
5334
5335
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5332

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5342

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

Parameters:

  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



5396
5397
5398
5399
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5396

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

Parameters:

  • storagepool (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(StoragePoolDefinition, Integer, Hash)>)

    StoragePoolDefinition data, response status code and response headers



5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5406

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:



5460
5461
5462
5463
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5460

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:

  • (Array<(Array<StoragePoolDefinition>, Integer, Hash)>)

    Array<StoragePoolDefinition> data, response status code and response headers



5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5471

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

#v1_events_drbd_promotion_get(opts = {}) ⇒ OneOfEventMayPromoteChange

drbd promotion event changes Notifies clients about changes in may_promote of resources

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (OneOfEventMayPromoteChange)


5533
5534
5535
5536
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5533

def v1_events_drbd_promotion_get(opts = {})
  data, _status_code, _headers = v1_events_drbd_promotion_get_with_http_info(opts)
  data
end

#v1_events_drbd_promotion_get_with_http_info(opts = {}) ⇒ Array<(OneOfEventMayPromoteChange, Integer, Hash)>

drbd promotion event changes Notifies clients about changes in may_promote of resources

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(OneOfEventMayPromoteChange, Integer, Hash)>)

    OneOfEventMayPromoteChange data, response status code and response headers



5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5542

def v1_events_drbd_promotion_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevelopersApi.v1_events_drbd_promotion_get ...'
  end
  # resource path
  local_var_path = '/v1/events/drbd/promotion'

  # 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(['text/event-stream'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OneOfEventMayPromoteChange'

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

  new_options = opts.merge(
    :operation => :"DevelopersApi.v1_events_drbd_promotion_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#v1_events_drbd_promotion_get\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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:



5592
5593
5594
5595
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5592

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:

  • (Array<(Array<PhysicalStorage>, Integer, Hash)>)

    Array<PhysicalStorage> data, response status code and response headers



5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5603

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :nodes (Array<String>)

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

  • :resources (Array<String>)

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

  • :storage_pools (Array<String>)

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

  • :props (Array<String>)

    filter by given properties, full property path

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:



5671
5672
5673
5674
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5671

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :nodes (Array<String>)

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

  • :resources (Array<String>)

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

  • :storage_pools (Array<String>)

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

  • :props (Array<String>)

    filter by given properties, full property path

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:

  • (Array<(Array<ResourceWithVolumes>, Integer, Hash)>)

    Array<ResourceWithVolumes> data, response status code and response headers



5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5686

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[:'resources'] = @api_client.build_collection_param(opts[:'resources'], :multi) if !opts[:'resources'].nil?
  query_params[:'storage_pools'] = @api_client.build_collection_param(opts[:'storage_pools'], :multi) if !opts[:'storage_pools'].nil?
  query_params[:'props'] = @api_client.build_collection_param(opts[:'props'], :multi) if !opts[:'props'].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_snapshot_shippings(opts = {}) ⇒ Array<SnapshotShippingStatus>

view current snapshot shippings

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :nodes (Array<String>)

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

  • :resources (Array<String>)

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

  • :snapshots (Array<String>)

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

  • :status (Array<String>)

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

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:



5757
5758
5759
5760
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5757

def view_snapshot_shippings(opts = {})
  data, _status_code, _headers = view_snapshot_shippings_with_http_info(opts)
  data
end

#view_snapshot_shippings_with_http_info(opts = {}) ⇒ Array<(Array<SnapshotShippingStatus>, Integer, Hash)>

view current snapshot shippings

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :nodes (Array<String>)

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

  • :resources (Array<String>)

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

  • :snapshots (Array<String>)

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

  • :status (Array<String>)

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

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:

  • (Array<(Array<SnapshotShippingStatus>, Integer, Hash)>)

    Array<SnapshotShippingStatus> data, response status code and response headers



5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
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
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5771

def view_snapshot_shippings_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevelopersApi.view_snapshot_shippings ...'
  end
  allowable_values = ["running", "complete"]
  if @api_client.config.client_side_validation && opts[:'status'] && !opts[:'status'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"status\", must include one of #{allowable_values}"
  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_snapshot_shippings, 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_snapshot_shippings, 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_snapshot_shippings, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/v1/view/snapshot-shippings'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'nodes'] = @api_client.build_collection_param(opts[:'nodes'], :multi) if !opts[:'nodes'].nil?
  query_params[:'resources'] = @api_client.build_collection_param(opts[:'resources'], :multi) if !opts[:'resources'].nil?
  query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
  query_params[:'status'] = @api_client.build_collection_param(opts[:'status'], :multi) if !opts[:'status'].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<SnapshotShippingStatus>'

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

  new_options = opts.merge(
    :operation => :"DevelopersApi.view_snapshot_shippings",
    :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_snapshot_shippings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#view_snapshots(opts = {}) ⇒ Array<Snapshot>

query all snapshots known to linstor This REST-resource should be used if you want to get an overview of all snapshots.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :nodes (Array<String>)

    Filter only for the specified nodes, 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

Returns:



5845
5846
5847
5848
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5845

def view_snapshots(opts = {})
  data, _status_code, _headers = view_snapshots_with_http_info(opts)
  data
end

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

query all snapshots known to linstor This REST-resource should be used if you want to get an overview of all snapshots.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :nodes (Array<String>)

    Filter only for the specified nodes, 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

Returns:

  • (Array<(Array<Snapshot>, Integer, Hash)>)

    Array<Snapshot> data, response status code and response headers



5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5858

def view_snapshots_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DevelopersApi.view_snapshots ...'
  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_snapshots, 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_snapshots, 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_snapshots, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/v1/view/snapshots'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'nodes'] = @api_client.build_collection_param(opts[:'nodes'], :multi) if !opts[:'nodes'].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<Snapshot>'

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

  new_options = opts.merge(
    :operation => :"DevelopersApi.view_snapshots",
    :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_snapshots\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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

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.

  • :props (Array<String>)

    filter by given properties, full property path

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:



5927
5928
5929
5930
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5927

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

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.

  • :props (Array<String>)

    filter by given properties, full property path

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:

  • (Array<(Array<StoragePool>, Integer, Hash)>)

    Array<StoragePool> data, response status code and response headers



5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 5941

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[:'props'] = @api_client.build_collection_param(opts[:'props'], :multi) if !opts[:'props'].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.

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



6008
6009
6010
6011
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6008

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.

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6019

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

Parameters:

  • resource (String)

    resource to use

  • volume_number (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



6078
6079
6080
6081
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6078

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

Parameters:

  • resource (String)

    resource to use

  • volume_number (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6089

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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:



6148
6149
6150
6151
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6148

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

Parameters:

  • resource (String)

    resource to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:

  • (Array<(Array<VolumeDefinition>, Integer, Hash)>)

    Array<VolumeDefinition> data, response status code and response headers



6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6160

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 for external metadata. - OverrideVlmId - regex[.*] Overwrites the generated ’<resource-name>_<5 digit volume number>‘ volume name for migration purposes - 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 - StorDriver/LvcreateOptions - regex[.*] Additional parameters added to every ’lvcreate … ‘ command - StorDriver/ZfscreateOptions - regex[.*] Additional parameters added to every ’zfs create … ‘ command - DrbdCurrentGi - regex[‘16`] Initial DRBD generation id, if initial sync is skipped, this ID will be set - 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 - sys/fs/blkio_throttle_read_iops - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_iops_device - sys/fs/blkio_throttle_write_iops - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_iops_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/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 - Cache/OpMode - enum Operation mode * writeback * writethrough * passthrough - Cache/MetaPool - regex[‘^[a-zA-Z0-9_-]2,47$`] Name of the storage pool used for the cache metadata. If not specified, this will default to the CachePool property - Cache/Metasize - regex[‘^100%|1,2([.][0-9]*)?%|[0-9]2,$`] Size of the cache in % (0-100) or KiB otherwise. - Cache/CachePool - regex[‘^[a-zA-Z0-9_-]2,47$`] Name of the storage pool used for the cache cache device - Cache/Cachesize - regex[‘^100%|1,2([.][0-9]*)?%|[0-9]2,$`] Size of the cache in % (0-100) or KiB otherwise. - Cache/Blocksize - long Block size - Cache/Policy - enum Replacemant policy * mq * smq * cleaner - DrbdOptions/Disk/on-io-error - enum * pass_on * call-local-io-error * detach - DrbdOptions/Disk/disk-barrier - boolean - DrbdOptions/Disk/disk-flushes - boolean - DrbdOptions/Disk/disk-drain - boolean - DrbdOptions/Disk/md-flushes - boolean - DrbdOptions/Disk/resync-after - string - DrbdOptions/Disk/al-extents - range[67-65534] - DrbdOptions/Disk/al-updates - boolean - DrbdOptions/Disk/discard-zeroes-if-aligned - boolean - DrbdOptions/Disk/disable-write-same - boolean - DrbdOptions/Disk/disk-timeout - range[0-6000] - 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/rs-discard-granularity - range[0-1048576]

Parameters:

  • resource (String)

    resource to use

  • volume_number (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



6229
6230
6231
6232
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6229

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 for external metadata. - &#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;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;StorDriver/LvcreateOptions&#x60; - regex Additional parameters added to every &#39;lvcreate … &#39; command - &#x60;StorDriver/ZfscreateOptions&#x60; - regex Additional parameters added to every &#39;zfs create … &#39; command - &#x60;DrbdCurrentGi&#x60; - regex[&#x60;16&#x60;] Initial DRBD generation id, if initial sync is skipped, this ID will be set - &#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;sys/fs/blkio_throttle_read_iops&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.read_iops_device - &#x60;sys/fs/blkio_throttle_write_iops&#x60; - long Sets the /sys/fs/cgroup/blkio/blkio.throttle.write_iops_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/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;Cache/OpMode&#x60; - enum Operation mode * writeback * writethrough * passthrough - &#x60;Cache/MetaPool&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Name of the storage pool used for the cache metadata. If not specified, this will default to the CachePool property - &#x60;Cache/Metasize&#x60; - regex[&#x60;^100%|1,2([.][0-9]*)?%|[0-9]2,$&#x60;] Size of the cache in % (0-100) or KiB otherwise. - &#x60;Cache/CachePool&#x60; - regex[&#x60;^[a-zA-Z0-9_-]2,47$&#x60;] Name of the storage pool used for the cache cache device - &#x60;Cache/Cachesize&#x60; - regex[&#x60;^100%|1,2([.][0-9]*)?%|[0-9]2,$&#x60;] Size of the cache in % (0-100) or KiB otherwise. - &#x60;Cache/Blocksize&#x60; - long Block size - &#x60;Cache/Policy&#x60; - enum Replacemant policy * mq * smq * cleaner - &#x60;DrbdOptions/Disk/on-io-error&#x60; - enum * pass_on * call-local-io-error * detach - &#x60;DrbdOptions/Disk/disk-barrier&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-drain&#x60; - boolean - &#x60;DrbdOptions/Disk/md-flushes&#x60; - boolean - &#x60;DrbdOptions/Disk/resync-after&#x60; - string - &#x60;DrbdOptions/Disk/al-extents&#x60; - range - &#x60;DrbdOptions/Disk/al-updates&#x60; - boolean - &#x60;DrbdOptions/Disk/discard-zeroes-if-aligned&#x60; - boolean - &#x60;DrbdOptions/Disk/disable-write-same&#x60; - boolean - &#x60;DrbdOptions/Disk/disk-timeout&#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/rs-discard-granularity&#x60; - range

Parameters:

  • resource (String)

    resource to use

  • volume_number (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6241

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.

Parameters:

  • resource_group (String)

    resource group to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



6304
6305
6306
6307
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6304

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.

Parameters:

  • resource_group (String)

    resource group to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6315

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

Parameters:

  • resource_group (String)

    resource group to use

  • volume_number (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



6374
6375
6376
6377
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6374

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

Parameters:

  • resource_group (String)

    resource group to use

  • volume_number (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6385

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

Parameters:

  • resource_group (String)

    resource group to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:



6444
6445
6446
6447
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6444

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

Parameters:

  • resource_group (String)

    resource group to use

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    number of records to skip for pagination

  • :limit (Integer)

    maximum number of records to return

Returns:

  • (Array<(Array<VolumeGroup>, Integer, Hash)>)

    Array<VolumeGroup> data, response status code and response headers



6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6456

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

Parameters:

  • resource_group (String)

    resource group to use

  • volume_number (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



6525
6526
6527
6528
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6525

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

Parameters:

  • resource_group (String)

    resource group to use

  • volume_number (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6537

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • volume_number (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



6602
6603
6604
6605
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6602

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

Parameters:

  • resource (String)

    resource to use

  • node (String)

    node to use

  • volume_number (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiCallRc, Integer, Hash)>)

    ApiCallRc data, response status code and response headers



6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
# File 'lib/ruby-linstor-client/api/developers_api.rb', line 6615

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