fog-kubevirt 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fog/kubevirt/compute/models/pvcs.rb +8 -4
- data/lib/fog/kubevirt/compute/models/servers.rb +1 -0
- data/lib/fog/kubevirt/compute/models/vm_base.rb +1 -1
- data/lib/fog/kubevirt/compute/models/vm_parser.rb +4 -2
- data/lib/fog/kubevirt/compute/models/vminstance.rb +1 -1
- data/lib/fog/kubevirt/compute/requests/create_pvc.rb +1 -1
- data/lib/fog/kubevirt/compute/requests/get_server.rb +3 -1
- data/lib/fog/kubevirt/compute/requests/get_vm.rb +13 -1
- data/lib/fog/kubevirt/compute/requests/list_servers.rb +7 -2
- data/lib/fog/kubevirt/compute/requests/list_vms.rb +7 -2
- data/lib/fog/kubevirt/version.rb +1 -1
- data/spec/create_vm_spec.rb +31 -2
- data/spec/fixtures/kubevirt/pvc/pvcs_crud.yml +33 -33
- data/spec/fixtures/kubevirt/pvc/pvcs_no_selector_crud.yml +362 -0
- data/spec/fixtures/kubevirt/vm/vm_create_multi.yml +2268 -71
- data/spec/fixtures/kubevirt/vm/vm_create_single.yml +179 -49
- data/spec/pvcs_v1alpha2_spec.rb +46 -3
- data/spec/vm_parse.rb +17 -0
- metadata +6 -2
data/spec/vm_parse.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
describe Fog::Kubevirt::Compute do
|
2
|
+
it 'parses vm' do
|
3
|
+
mock = Fog::Kubevirt::Compute::Mock.new
|
4
|
+
vm = mock.get_vm('test')
|
5
|
+
|
6
|
+
assert_nil(vm[:interfaces][0].mac_address)
|
7
|
+
assert_nil(vm[:interfaces][1].mac_address)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'parses vmi' do
|
11
|
+
mock = Fog::Kubevirt::Compute::Mock.new
|
12
|
+
vm = mock.get_vminstance('test')
|
13
|
+
|
14
|
+
assert_equal(vm[:interfaces][0].mac_address, '0e:fc:6c:c3:20:ec')
|
15
|
+
assert_equal(vm[:interfaces][1].mac_address, '4a:90:1c:2e:fe:d7')
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-kubevirt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Kliczewski
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2019-04-
|
17
|
+
date: 2019-04-12 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: minitest
|
@@ -215,6 +215,7 @@ files:
|
|
215
215
|
- spec/fixtures/kubevirt/networkattachmentdefinition/networkattachmentdefinitions_crud.yml
|
216
216
|
- spec/fixtures/kubevirt/persistentvolume/persistent_volumes_crud.yml
|
217
217
|
- spec/fixtures/kubevirt/pvc/pvcs_crud.yml
|
218
|
+
- spec/fixtures/kubevirt/pvc/pvcs_no_selector_crud.yml
|
218
219
|
- spec/fixtures/kubevirt/service/services_crud.yml
|
219
220
|
- spec/fixtures/kubevirt/storageclass/storageclasses_crud.yml
|
220
221
|
- spec/fixtures/kubevirt/vm/vm_create_multi.yml
|
@@ -225,6 +226,7 @@ files:
|
|
225
226
|
- spec/shared_context.rb
|
226
227
|
- spec/spec_helper.rb
|
227
228
|
- spec/storage_classes_v1_spec.rb
|
229
|
+
- spec/vm_parse.rb
|
228
230
|
homepage: https://github.com/pkliczewski/fog-kubevirt
|
229
231
|
licenses:
|
230
232
|
- Apache-2.0
|
@@ -255,6 +257,7 @@ test_files:
|
|
255
257
|
- spec/fixtures/kubevirt/networkattachmentdefinition/networkattachmentdefinitions_crud.yml
|
256
258
|
- spec/fixtures/kubevirt/persistentvolume/persistent_volumes_crud.yml
|
257
259
|
- spec/fixtures/kubevirt/pvc/pvcs_crud.yml
|
260
|
+
- spec/fixtures/kubevirt/pvc/pvcs_no_selector_crud.yml
|
258
261
|
- spec/fixtures/kubevirt/service/services_crud.yml
|
259
262
|
- spec/fixtures/kubevirt/storageclass/storageclasses_crud.yml
|
260
263
|
- spec/fixtures/kubevirt/vm/vm_create_multi.yml
|
@@ -265,3 +268,4 @@ test_files:
|
|
265
268
|
- spec/shared_context.rb
|
266
269
|
- spec/spec_helper.rb
|
267
270
|
- spec/storage_classes_v1_spec.rb
|
271
|
+
- spec/vm_parse.rb
|