ruby-linstor-client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +86 -0
- data/LICENSE +21 -0
- data/README.md +21 -0
- data/Rakefile +10 -0
- data/codegen.sh +22 -0
- data/generator/custom/one_of_drbd_resource_definition_layer.rb +7 -0
- data/generator/custom/one_of_drbd_volume_definition.rb +7 -0
- data/generator/custom/one_of_drbd_volume_luks_volume_storage_nvme_volme_writecache_volume.rb +11 -0
- data/generator/openapi-generator.yaml +11 -0
- data/generator/template/Gemfile.mustache +9 -0
- data/generator/template/README.mustache +148 -0
- data/generator/template/Rakefile.mustache +10 -0
- data/generator/template/api.mustache +209 -0
- data/generator/template/api_client.mustache +264 -0
- data/generator/template/api_client_faraday_partial.mustache +136 -0
- data/generator/template/api_client_spec.mustache +220 -0
- data/generator/template/api_client_typhoeus_partial.mustache +153 -0
- data/generator/template/api_doc.mustache +118 -0
- data/generator/template/api_error.mustache +49 -0
- data/generator/template/api_info.mustache +12 -0
- data/generator/template/api_test.mustache +47 -0
- data/generator/template/base_object.mustache +120 -0
- data/generator/template/configuration.mustache +385 -0
- data/generator/template/configuration_spec.mustache +34 -0
- data/generator/template/configuration_tls_faraday_partial.mustache +29 -0
- data/generator/template/configuration_tls_typhoeus_partial.mustache +34 -0
- data/generator/template/gem.mustache +53 -0
- data/generator/template/gemspec.mustache +35 -0
- data/generator/template/git_push.sh.mustache +57 -0
- data/generator/template/gitignore.mustache +39 -0
- data/generator/template/model.mustache +26 -0
- data/generator/template/model_doc.mustache +12 -0
- data/generator/template/model_test.mustache +77 -0
- data/generator/template/partial_model_enum_class.mustache +20 -0
- data/generator/template/partial_model_generic.mustache +371 -0
- data/generator/template/partial_model_generic_doc.mustache +28 -0
- data/generator/template/partial_oneof_module.mustache +137 -0
- data/generator/template/partial_oneof_module_doc.mustache +92 -0
- data/generator/template/rspec.mustache +2 -0
- data/generator/template/rubocop.mustache +148 -0
- data/generator/template/spec_helper.mustache +103 -0
- data/generator/template/travis.mustache +14 -0
- data/generator/template/version.mustache +7 -0
- data/lib/ruby-linstor-client/api/developers_api.rb +5856 -0
- data/lib/ruby-linstor-client/api_client.rb +393 -0
- data/lib/ruby-linstor-client/api_error.rb +57 -0
- data/lib/ruby-linstor-client/configuration.rb +298 -0
- data/lib/ruby-linstor-client/models/api_call_rc.rb +293 -0
- data/lib/ruby-linstor-client/models/auto_place_request.rb +245 -0
- data/lib/ruby-linstor-client/models/auto_select_filter.rb +305 -0
- data/lib/ruby-linstor-client/models/candidate.rb +248 -0
- data/lib/ruby-linstor-client/models/controller_props_modify.rb +243 -0
- data/lib/ruby-linstor-client/models/controller_version.rb +245 -0
- data/lib/ruby-linstor-client/models/drbd_proxy_enable.rb +219 -0
- data/lib/ruby-linstor-client/models/drbd_proxy_modify.rb +288 -0
- data/lib/ruby-linstor-client/models/drbd_resource.rb +276 -0
- data/lib/ruby-linstor-client/models/drbd_resource_definition_layer.rb +283 -0
- data/lib/ruby-linstor-client/models/drbd_volume.rb +285 -0
- data/lib/ruby-linstor-client/models/drbd_volume_definition.rb +236 -0
- data/lib/ruby-linstor-client/models/error_report.rb +252 -0
- data/lib/ruby-linstor-client/models/key_value_store.rb +231 -0
- data/lib/ruby-linstor-client/models/key_value_store_modify.rb +243 -0
- data/lib/ruby-linstor-client/models/layer_type.rb +40 -0
- data/lib/ruby-linstor-client/models/luks_resource.rb +220 -0
- data/lib/ruby-linstor-client/models/luks_volume.rb +275 -0
- data/lib/ruby-linstor-client/models/max_volume_sizes.rb +229 -0
- data/lib/ruby-linstor-client/models/net_interface.rb +309 -0
- data/lib/ruby-linstor-client/models/node.rb +381 -0
- data/lib/ruby-linstor-client/models/node_modify.rb +252 -0
- data/lib/ruby-linstor-client/models/nvme_resource.rb +220 -0
- data/lib/ruby-linstor-client/models/nvme_volume.rb +266 -0
- data/lib/ruby-linstor-client/models/one_of_drbd_resource_definition_layer.rb +7 -0
- data/lib/ruby-linstor-client/models/one_of_drbd_volume_definition.rb +7 -0
- data/lib/ruby-linstor-client/models/one_of_drbd_volume_luks_volume_storage_nvme_volme_writecache_volume.rb +11 -0
- data/lib/ruby-linstor-client/models/pass_phrase_create.rb +227 -0
- data/lib/ruby-linstor-client/models/physical_storage.rb +238 -0
- data/lib/ruby-linstor-client/models/physical_storage_create.rb +337 -0
- data/lib/ruby-linstor-client/models/physical_storage_device.rb +245 -0
- data/lib/ruby-linstor-client/models/physical_storage_storage_pool_create.rb +232 -0
- data/lib/ruby-linstor-client/models/provider_kind.rb +43 -0
- data/lib/ruby-linstor-client/models/resource.rb +278 -0
- data/lib/ruby-linstor-client/models/resource_connection.rb +261 -0
- data/lib/ruby-linstor-client/models/resource_connection_modify.rb +243 -0
- data/lib/ruby-linstor-client/models/resource_create.rb +238 -0
- data/lib/ruby-linstor-client/models/resource_definition.rb +295 -0
- data/lib/ruby-linstor-client/models/resource_definition_create.rb +262 -0
- data/lib/ruby-linstor-client/models/resource_definition_layer.rb +228 -0
- data/lib/ruby-linstor-client/models/resource_definition_modify.rb +274 -0
- data/lib/ruby-linstor-client/models/resource_group.rb +262 -0
- data/lib/ruby-linstor-client/models/resource_group_modify.rb +261 -0
- data/lib/ruby-linstor-client/models/resource_group_spawn.rb +255 -0
- data/lib/ruby-linstor-client/models/resource_layer.rb +283 -0
- data/lib/ruby-linstor-client/models/resource_modify.rb +243 -0
- data/lib/ruby-linstor-client/models/resource_state.rb +218 -0
- data/lib/ruby-linstor-client/models/resource_with_volumes.rb +297 -0
- data/lib/ruby-linstor-client/models/resource_with_volumes_all_of.rb +220 -0
- data/lib/ruby-linstor-client/models/snapshot.rb +282 -0
- data/lib/ruby-linstor-client/models/snapshot_restore.rb +236 -0
- data/lib/ruby-linstor-client/models/snapshot_volume_definition.rb +228 -0
- data/lib/ruby-linstor-client/models/storage_pool.rb +333 -0
- data/lib/ruby-linstor-client/models/storage_pool_definition.rb +230 -0
- data/lib/ruby-linstor-client/models/storage_pool_definition_modify.rb +243 -0
- data/lib/ruby-linstor-client/models/storage_resource.rb +220 -0
- data/lib/ruby-linstor-client/models/storage_volume.rb +256 -0
- data/lib/ruby-linstor-client/models/volume.rb +327 -0
- data/lib/ruby-linstor-client/models/volume_definition.rb +277 -0
- data/lib/ruby-linstor-client/models/volume_definition_create.rb +232 -0
- data/lib/ruby-linstor-client/models/volume_definition_layer.rb +233 -0
- data/lib/ruby-linstor-client/models/volume_definition_modify.rb +264 -0
- data/lib/ruby-linstor-client/models/volume_group.rb +251 -0
- data/lib/ruby-linstor-client/models/volume_group_modify.rb +255 -0
- data/lib/ruby-linstor-client/models/volume_layer.rb +228 -0
- data/lib/ruby-linstor-client/models/volume_modify.rb +243 -0
- data/lib/ruby-linstor-client/models/volume_state.rb +218 -0
- data/lib/ruby-linstor-client/models/writecache_resource.rb +220 -0
- data/lib/ruby-linstor-client/models/writecache_volume.rb +266 -0
- data/lib/ruby-linstor-client/version.rb +15 -0
- data/lib/ruby-linstor-client.rb +109 -0
- data/pkg/ruby-linstor-client-1.0.0.gem +0 -0
- data/ruby-linstor-client.gemspec +39 -0
- data/spec/api/developers_api_spec.rb +1116 -0
- data/spec/api_client_spec.rb +188 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/api_call_rc_spec.rb +70 -0
- data/spec/models/auto_place_request_spec.rb +46 -0
- data/spec/models/auto_select_filter_spec.rb +82 -0
- data/spec/models/candidate_spec.rb +52 -0
- data/spec/models/controller_props_modify_spec.rb +46 -0
- data/spec/models/controller_version_spec.rb +52 -0
- data/spec/models/drbd_proxy_enable_spec.rb +34 -0
- data/spec/models/drbd_proxy_modify_spec.rb +56 -0
- data/spec/models/drbd_resource_definition_layer_spec.rb +76 -0
- data/spec/models/drbd_resource_spec.rb +70 -0
- data/spec/models/drbd_volume_definition_spec.rb +46 -0
- data/spec/models/drbd_volume_spec.rb +76 -0
- data/spec/models/error_report_spec.rb +52 -0
- data/spec/models/key_value_store_modify_spec.rb +46 -0
- data/spec/models/key_value_store_spec.rb +40 -0
- data/spec/models/layer_type_spec.rb +28 -0
- data/spec/models/luks_resource_spec.rb +34 -0
- data/spec/models/luks_volume_spec.rb +70 -0
- data/spec/models/max_volume_sizes_spec.rb +40 -0
- data/spec/models/net_interface_spec.rb +68 -0
- data/spec/models/node_modify_spec.rb +52 -0
- data/spec/models/node_spec.rb +102 -0
- data/spec/models/nvme_resource_spec.rb +34 -0
- data/spec/models/nvme_volume_spec.rb +64 -0
- data/spec/models/pass_phrase_create_spec.rb +40 -0
- data/spec/models/physical_storage_create_spec.rb +80 -0
- data/spec/models/physical_storage_device_spec.rb +52 -0
- data/spec/models/physical_storage_spec.rb +46 -0
- data/spec/models/physical_storage_storage_pool_create_spec.rb +40 -0
- data/spec/models/provider_kind_spec.rb +28 -0
- data/spec/models/resource_connection_modify_spec.rb +46 -0
- data/spec/models/resource_connection_spec.rb +58 -0
- data/spec/models/resource_create_spec.rb +46 -0
- data/spec/models/resource_definition_create_spec.rb +58 -0
- data/spec/models/resource_definition_layer_spec.rb +40 -0
- data/spec/models/resource_definition_modify_spec.rb +64 -0
- data/spec/models/resource_definition_spec.rb +76 -0
- data/spec/models/resource_group_modify_spec.rb +58 -0
- data/spec/models/resource_group_spawn_spec.rb +52 -0
- data/spec/models/resource_group_spec.rb +58 -0
- data/spec/models/resource_layer_spec.rb +76 -0
- data/spec/models/resource_modify_spec.rb +46 -0
- data/spec/models/resource_spec.rb +70 -0
- data/spec/models/resource_state_spec.rb +34 -0
- data/spec/models/resource_with_volumes_all_of_spec.rb +34 -0
- data/spec/models/resource_with_volumes_spec.rb +76 -0
- data/spec/models/snapshot_restore_spec.rb +40 -0
- data/spec/models/snapshot_spec.rb +70 -0
- data/spec/models/snapshot_volume_definition_spec.rb +40 -0
- data/spec/models/storage_pool_definition_modify_spec.rb +46 -0
- data/spec/models/storage_pool_definition_spec.rb +40 -0
- data/spec/models/storage_pool_spec.rb +94 -0
- data/spec/models/storage_resource_spec.rb +34 -0
- data/spec/models/storage_volume_spec.rb +58 -0
- data/spec/models/volume_definition_create_spec.rb +40 -0
- data/spec/models/volume_definition_layer_spec.rb +40 -0
- data/spec/models/volume_definition_modify_spec.rb +58 -0
- data/spec/models/volume_definition_spec.rb +64 -0
- data/spec/models/volume_group_modify_spec.rb +52 -0
- data/spec/models/volume_group_spec.rb +52 -0
- data/spec/models/volume_layer_spec.rb +40 -0
- data/spec/models/volume_modify_spec.rb +46 -0
- data/spec/models/volume_spec.rb +100 -0
- data/spec/models/volume_state_spec.rb +34 -0
- data/spec/models/writecache_resource_spec.rb +34 -0
- data/spec/models/writecache_volume_spec.rb +64 -0
- data/spec/spec_helper.rb +111 -0
- metadata +344 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Linstor REST API
|
|
3
|
+
|
|
4
|
+
#Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.13
|
|
7
|
+
Contact: rene.peinthor@linbit.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.3.1
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for LinstorClient::VolumeModify
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe LinstorClient::VolumeModify do
|
|
21
|
+
let(:instance) { LinstorClient::VolumeModify.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of VolumeModify' do
|
|
24
|
+
it 'should create an instance of VolumeModify' do
|
|
25
|
+
expect(instance).to be_instance_of(LinstorClient::VolumeModify)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
describe 'test attribute "override_props"' do
|
|
29
|
+
it 'should work' do
|
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
describe 'test attribute "delete_props"' do
|
|
35
|
+
it 'should work' do
|
|
36
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
describe 'test attribute "delete_namespaces"' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Linstor REST API
|
|
3
|
+
|
|
4
|
+
#Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.13
|
|
7
|
+
Contact: rene.peinthor@linbit.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.3.1
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for LinstorClient::Volume
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe LinstorClient::Volume do
|
|
21
|
+
let(:instance) { LinstorClient::Volume.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of Volume' do
|
|
24
|
+
it 'should create an instance of Volume' do
|
|
25
|
+
expect(instance).to be_instance_of(LinstorClient::Volume)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
describe 'test attribute "volume_number"' do
|
|
29
|
+
it 'should work' do
|
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
describe 'test attribute "storage_pool_name"' do
|
|
35
|
+
it 'should work' do
|
|
36
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
describe 'test attribute "provider_kind"' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe 'test attribute "device_path"' do
|
|
47
|
+
it 'should work' do
|
|
48
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
describe 'test attribute "allocated_size_kib"' do
|
|
53
|
+
it 'should work' do
|
|
54
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
describe 'test attribute "usable_size_kib"' do
|
|
59
|
+
it 'should work' do
|
|
60
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
describe 'test attribute "props"' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
describe 'test attribute "flags"' do
|
|
71
|
+
it 'should work' do
|
|
72
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
describe 'test attribute "state"' do
|
|
77
|
+
it 'should work' do
|
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
describe 'test attribute "layer_data_list"' do
|
|
83
|
+
it 'should work' do
|
|
84
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
describe 'test attribute "uuid"' do
|
|
89
|
+
it 'should work' do
|
|
90
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
describe 'test attribute "reports"' do
|
|
95
|
+
it 'should work' do
|
|
96
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Linstor REST API
|
|
3
|
+
|
|
4
|
+
#Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.13
|
|
7
|
+
Contact: rene.peinthor@linbit.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.3.1
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for LinstorClient::VolumeState
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe LinstorClient::VolumeState do
|
|
21
|
+
let(:instance) { LinstorClient::VolumeState.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of VolumeState' do
|
|
24
|
+
it 'should create an instance of VolumeState' do
|
|
25
|
+
expect(instance).to be_instance_of(LinstorClient::VolumeState)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
describe 'test attribute "disk_state"' do
|
|
29
|
+
it 'should work' do
|
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Linstor REST API
|
|
3
|
+
|
|
4
|
+
#Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.13
|
|
7
|
+
Contact: rene.peinthor@linbit.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.3.1
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for LinstorClient::WritecacheResource
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe LinstorClient::WritecacheResource do
|
|
21
|
+
let(:instance) { LinstorClient::WritecacheResource.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of WritecacheResource' do
|
|
24
|
+
it 'should create an instance of WritecacheResource' do
|
|
25
|
+
expect(instance).to be_instance_of(LinstorClient::WritecacheResource)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
describe 'test attribute "writecache_volumes"' do
|
|
29
|
+
it 'should work' do
|
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Linstor REST API
|
|
3
|
+
|
|
4
|
+
#Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.13
|
|
7
|
+
Contact: rene.peinthor@linbit.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.3.1
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for LinstorClient::WritecacheVolume
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe LinstorClient::WritecacheVolume do
|
|
21
|
+
let(:instance) { LinstorClient::WritecacheVolume.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of WritecacheVolume' do
|
|
24
|
+
it 'should create an instance of WritecacheVolume' do
|
|
25
|
+
expect(instance).to be_instance_of(LinstorClient::WritecacheVolume)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
describe 'test attribute "volume_number"' do
|
|
29
|
+
it 'should work' do
|
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
describe 'test attribute "device_path"' do
|
|
35
|
+
it 'should work' do
|
|
36
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
describe 'test attribute "device_path_cache"' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe 'test attribute "allocated_size_kib"' do
|
|
47
|
+
it 'should work' do
|
|
48
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
describe 'test attribute "usable_size_kib"' do
|
|
53
|
+
it 'should work' do
|
|
54
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
describe 'test attribute "disk_state"' do
|
|
59
|
+
it 'should work' do
|
|
60
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Linstor REST API
|
|
3
|
+
|
|
4
|
+
#Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.13
|
|
7
|
+
Contact: rene.peinthor@linbit.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.3.1
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
# load the gem
|
|
14
|
+
require 'ruby-linstor-client'
|
|
15
|
+
|
|
16
|
+
# The following was generated by the `rspec --init` command. Conventionally, all
|
|
17
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
|
18
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
|
19
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
|
20
|
+
# files.
|
|
21
|
+
#
|
|
22
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
|
23
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
|
24
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
|
25
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
|
26
|
+
# a separate helper file that requires the additional dependencies and performs
|
|
27
|
+
# the additional setup, and require it from the spec files that actually need
|
|
28
|
+
# it.
|
|
29
|
+
#
|
|
30
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
|
31
|
+
# users commonly want.
|
|
32
|
+
#
|
|
33
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
|
34
|
+
RSpec.configure do |config|
|
|
35
|
+
# rspec-expectations config goes here. You can use an alternate
|
|
36
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
|
37
|
+
# assertions if you prefer.
|
|
38
|
+
config.expect_with :rspec do |expectations|
|
|
39
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
|
40
|
+
# and `failure_message` of custom matchers include text for helper methods
|
|
41
|
+
# defined using `chain`, e.g.:
|
|
42
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
|
43
|
+
# # => "be bigger than 2 and smaller than 4"
|
|
44
|
+
# ...rather than:
|
|
45
|
+
# # => "be bigger than 2"
|
|
46
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
|
50
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
|
51
|
+
config.mock_with :rspec do |mocks|
|
|
52
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
|
53
|
+
# a real object. This is generally recommended, and will default to
|
|
54
|
+
# `true` in RSpec 4.
|
|
55
|
+
mocks.verify_partial_doubles = true
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# The settings below are suggested to provide a good initial experience
|
|
59
|
+
# with RSpec, but feel free to customize to your heart's content.
|
|
60
|
+
=begin
|
|
61
|
+
# These two settings work together to allow you to limit a spec run
|
|
62
|
+
# to individual examples or groups you care about by tagging them with
|
|
63
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
|
64
|
+
# get run.
|
|
65
|
+
config.filter_run :focus
|
|
66
|
+
config.run_all_when_everything_filtered = true
|
|
67
|
+
|
|
68
|
+
# Allows RSpec to persist some state between runs in order to support
|
|
69
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
|
70
|
+
# you configure your source control system to ignore this file.
|
|
71
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
|
72
|
+
|
|
73
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
|
74
|
+
# recommended. For more details, see:
|
|
75
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
|
76
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
|
77
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
|
78
|
+
config.disable_monkey_patching!
|
|
79
|
+
|
|
80
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
|
81
|
+
# be too noisy due to issues in dependencies.
|
|
82
|
+
config.warnings = true
|
|
83
|
+
|
|
84
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
|
85
|
+
# file, and it's useful to allow more verbose output when running an
|
|
86
|
+
# individual spec file.
|
|
87
|
+
if config.files_to_run.one?
|
|
88
|
+
# Use the documentation formatter for detailed output,
|
|
89
|
+
# unless a formatter has already been configured
|
|
90
|
+
# (e.g. via a command-line flag).
|
|
91
|
+
config.default_formatter = 'doc'
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Print the 10 slowest examples and example groups at the
|
|
95
|
+
# end of the spec run, to help surface which specs are running
|
|
96
|
+
# particularly slow.
|
|
97
|
+
config.profile_examples = 10
|
|
98
|
+
|
|
99
|
+
# Run specs in random order to surface order dependencies. If you find an
|
|
100
|
+
# order dependency and want to debug it, you can fix the order by providing
|
|
101
|
+
# the seed, which is printed after each run.
|
|
102
|
+
# --seed 1234
|
|
103
|
+
config.order = :random
|
|
104
|
+
|
|
105
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
|
106
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
|
107
|
+
# test failures related to randomization by passing the same `--seed` value
|
|
108
|
+
# as the one that triggered the failure.
|
|
109
|
+
Kernel.srand config.seed
|
|
110
|
+
=end
|
|
111
|
+
end
|