fog-kubevirt 0.3.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -3
- data/lib/fog/bin/kubevirt.rb +2 -2
- data/lib/fog/kubevirt.rb +1 -4
- data/lib/fog/{compute/kubevirt.rb → kubevirt/compute/compute.rb} +35 -184
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/models/node.rb +3 -3
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/models/nodes.rb +4 -4
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/models/template.rb +2 -2
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/models/templates.rb +4 -4
- data/lib/fog/kubevirt/compute/models/vm.rb +71 -0
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/models/vminstance.rb +4 -13
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/models/vminstances.rb +4 -4
- data/lib/fog/kubevirt/compute/models/vms.rb +137 -0
- data/lib/fog/kubevirt/compute/models/volume.rb +9 -0
- data/lib/fog/kubevirt/compute/models/volumes.rb +12 -0
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/create_pvc.rb +2 -2
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/create_vm.rb +2 -3
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/create_vminstance.rb +2 -2
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/delete_vm.rb +3 -3
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/delete_vminstance.rb +5 -5
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/get_node.rb +2 -2
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/get_template.rb +2 -2
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/get_vm.rb +3 -3
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/get_vminstance.rb +6 -6
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/list_nodes.rb +2 -2
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/list_templates.rb +2 -2
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/list_vminstances.rb +2 -2
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/list_vms.rb +6 -6
- data/lib/fog/{compute/kubevirt → kubevirt/compute}/requests/update_vm.rb +2 -2
- data/lib/fog/kubevirt/version.rb +1 -1
- metadata +39 -133
- data/lib/fog/compute/kubevirt/models/networkattachmentdef.rb +0 -25
- data/lib/fog/compute/kubevirt/models/networkattachmentdefs.rb +0 -59
- data/lib/fog/compute/kubevirt/models/persistentvolume.rb +0 -82
- data/lib/fog/compute/kubevirt/models/persistentvolumes.rb +0 -73
- data/lib/fog/compute/kubevirt/models/pvc.rb +0 -59
- data/lib/fog/compute/kubevirt/models/pvcs.rb +0 -76
- data/lib/fog/compute/kubevirt/models/server.rb +0 -44
- data/lib/fog/compute/kubevirt/models/servers.rb +0 -32
- data/lib/fog/compute/kubevirt/models/service.rb +0 -36
- data/lib/fog/compute/kubevirt/models/services.rb +0 -83
- data/lib/fog/compute/kubevirt/models/storageclass.rb +0 -33
- data/lib/fog/compute/kubevirt/models/storageclasses.rb +0 -61
- data/lib/fog/compute/kubevirt/models/vm.rb +0 -17
- data/lib/fog/compute/kubevirt/models/vm_base.rb +0 -86
- data/lib/fog/compute/kubevirt/models/vm_data.rb +0 -162
- data/lib/fog/compute/kubevirt/models/vms.rb +0 -206
- data/lib/fog/compute/kubevirt/models/volume.rb +0 -57
- data/lib/fog/compute/kubevirt/models/volumes.rb +0 -18
- data/lib/fog/compute/kubevirt/requests/create_networkattachmentdef.rb +0 -37
- data/lib/fog/compute/kubevirt/requests/create_persistentvolume.rb +0 -19
- data/lib/fog/compute/kubevirt/requests/create_service.rb +0 -18
- data/lib/fog/compute/kubevirt/requests/create_storageclass.rb +0 -18
- data/lib/fog/compute/kubevirt/requests/delete_networkattachmentdef.rb +0 -16
- data/lib/fog/compute/kubevirt/requests/delete_persistentvolume.rb +0 -16
- data/lib/fog/compute/kubevirt/requests/delete_pvc.rb +0 -16
- data/lib/fog/compute/kubevirt/requests/delete_service.rb +0 -16
- data/lib/fog/compute/kubevirt/requests/delete_storageclass.rb +0 -16
- data/lib/fog/compute/kubevirt/requests/get_networkattachmentdef.rb +0 -19
- data/lib/fog/compute/kubevirt/requests/get_persistentvolume.rb +0 -16
- data/lib/fog/compute/kubevirt/requests/get_pvc.rb +0 -16
- data/lib/fog/compute/kubevirt/requests/get_server.rb +0 -32
- data/lib/fog/compute/kubevirt/requests/get_service.rb +0 -16
- data/lib/fog/compute/kubevirt/requests/get_storageclass.rb +0 -16
- data/lib/fog/compute/kubevirt/requests/list_networkattachmentdefs.rb +0 -21
- data/lib/fog/compute/kubevirt/requests/list_persistentvolumes.rb +0 -22
- data/lib/fog/compute/kubevirt/requests/list_pvcs.rb +0 -22
- data/lib/fog/compute/kubevirt/requests/list_servers.rb +0 -25
- data/lib/fog/compute/kubevirt/requests/list_services.rb +0 -22
- data/lib/fog/compute/kubevirt/requests/list_storageclasses.rb +0 -22
- data/lib/fog/compute/kubevirt/requests/list_volumes.rb +0 -30
- data/spec/compute_v1alpha2_spec.rb +0 -30
- data/spec/create_vm_spec.rb +0 -101
- data/spec/fixtures/kubevirt/networkattachmentdefinition/networkattachmentdefinitions_crud.yml +0 -320
- data/spec/fixtures/kubevirt/persistentvolume/persistent_volumes_crud.yml +0 -316
- data/spec/fixtures/kubevirt/pvc/pvcs_crud.yml +0 -362
- data/spec/fixtures/kubevirt/service/services_crud.yml +0 -316
- data/spec/fixtures/kubevirt/storageclass/storageclasses_crud.yml +0 -400
- data/spec/fixtures/kubevirt/vm/vm_create_multi.yml +0 -459
- data/spec/fixtures/kubevirt/vm/vm_create_single.yml +0 -362
- data/spec/network_attachment_definition_v1alpha2_spec.rb +0 -28
- data/spec/persistent_volumes_v1alpha2_spec.rb +0 -45
- data/spec/pvcs_v1alpha2_spec.rb +0 -59
- data/spec/shared_context.rb +0 -54
- data/spec/spec_helper.rb +0 -10
- data/spec/storage_classes_v1_spec.rb +0 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef12aa5c8c8f76da4468c2addf70d01f798fca2e
|
4
|
+
data.tar.gz: 59e0ce857ec78e72f2f47fce4b59b4789aee9bfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b715da932cbe7359039d796391e3fa1b149c7abafbd918d1c828bd761e026c3d5049d672fb11f0ff822c9faa86240b47e1536c7aa664c16d87df3be618be5482
|
7
|
+
data.tar.gz: f1d024c7a07089912a574cc0336475818ea71c284ff814a25bcc9edf4cf7047f0df2a114d54b82aa09af990b575a9aa73423a28defaeda70f5f24327e06b8719
|
data/README.md
CHANGED
@@ -22,14 +22,13 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
Require the gem:
|
24
24
|
```ruby
|
25
|
-
require 'fog/kubevirt'
|
25
|
+
require 'fog/kubevirt'
|
26
26
|
```
|
27
27
|
|
28
28
|
Connect to kubevirt instance:
|
29
29
|
```ruby
|
30
30
|
|
31
|
-
compute = Fog::Compute.new
|
32
|
-
:provider => "kubevirt",
|
31
|
+
compute = Fog::Kubevirt::Compute.new
|
33
32
|
:kubevirt_token => token,
|
34
33
|
:kubevirt_server => server,
|
35
34
|
:kubevirt_port => port
|
data/lib/fog/bin/kubevirt.rb
CHANGED
@@ -3,7 +3,7 @@ class Kubevirt < Fog::Bin
|
|
3
3
|
def class_for(key)
|
4
4
|
case key
|
5
5
|
when :compute
|
6
|
-
Fog::Compute
|
6
|
+
Fog::Kubevirt::Compute
|
7
7
|
else
|
8
8
|
raise ArgumentError, "Unrecognized service: #{key}"
|
9
9
|
end
|
@@ -13,7 +13,7 @@ class Kubevirt < Fog::Bin
|
|
13
13
|
@@connections ||= Hash.new do |hash, key|
|
14
14
|
hash[key] = case key
|
15
15
|
when :compute
|
16
|
-
Fog::Compute.new
|
16
|
+
Fog::Kubevirt::Compute.new
|
17
17
|
else
|
18
18
|
raise ArgumentError, "Unrecognized service: #{key.inspect}"
|
19
19
|
end
|
data/lib/fog/kubevirt.rb
CHANGED
@@ -1,75 +1,40 @@
|
|
1
1
|
require 'delegate'
|
2
|
-
require 'json'
|
3
|
-
require 'rest-client'
|
4
2
|
|
5
3
|
require "fog/core"
|
6
4
|
|
7
5
|
module Fog
|
8
|
-
module
|
9
|
-
class
|
10
|
-
|
11
|
-
|
6
|
+
module Kubevirt
|
7
|
+
class Compute < Fog::Service
|
8
|
+
requires :kubevirt_token
|
9
|
+
recognizes :kubevirt_hostname, :kubevirt_port, :kubevirt_namespace, :kubevirt_log
|
12
10
|
|
13
|
-
model_path 'fog/compute/
|
11
|
+
model_path 'fog/kubevirt/compute/models'
|
14
12
|
model :vminstance
|
15
13
|
collection :vminstances
|
16
|
-
model :networkattachmentdef
|
17
|
-
collection :networkattachmentdefs
|
18
14
|
model :node
|
19
15
|
collection :nodes
|
20
16
|
model :vm
|
21
17
|
collection :vms
|
22
|
-
model :persistentvolume
|
23
|
-
collection :persistentvolumes
|
24
|
-
model :pvc
|
25
|
-
collection :pvcs
|
26
|
-
model :server
|
27
|
-
collection :servers
|
28
|
-
model :service
|
29
|
-
collection :services
|
30
|
-
model :storageclass
|
31
|
-
collection :storageclasses
|
32
18
|
model :template
|
33
19
|
collection :templates
|
34
20
|
model :volume
|
35
21
|
collection :volumes
|
36
22
|
|
37
|
-
request_path 'fog/compute/
|
38
|
-
|
23
|
+
request_path 'fog/kubevirt/compute/requests'
|
24
|
+
|
39
25
|
request :create_vm
|
40
26
|
request :create_vminstance
|
41
|
-
request :create_persistentvolume
|
42
27
|
request :create_pvc
|
43
|
-
request :create_service
|
44
|
-
request :create_storageclass
|
45
|
-
request :delete_networkattachmentdef
|
46
|
-
request :delete_persistentvolume
|
47
|
-
request :delete_pvc
|
48
|
-
request :delete_service
|
49
|
-
request :delete_storageclass
|
50
28
|
request :delete_vminstance
|
51
29
|
request :delete_vm
|
52
30
|
request :get_vminstance
|
53
|
-
request :get_networkattachmentdef
|
54
31
|
request :get_node
|
55
|
-
request :get_persistentvolume
|
56
|
-
request :get_pvc
|
57
32
|
request :get_vm
|
58
|
-
request :get_server
|
59
|
-
request :get_service
|
60
|
-
request :get_storageclass
|
61
33
|
request :get_template
|
62
34
|
request :list_vminstances
|
63
35
|
request :list_nodes
|
64
|
-
request :list_networkattachmentdefs
|
65
36
|
request :list_vms
|
66
|
-
request :list_persistentvolumes
|
67
|
-
request :list_pvcs
|
68
|
-
request :list_servers
|
69
|
-
request :list_services
|
70
|
-
request :list_storageclasses
|
71
37
|
request :list_templates
|
72
|
-
request :list_volumes
|
73
38
|
request :update_vm
|
74
39
|
|
75
40
|
module Shared
|
@@ -85,9 +50,8 @@ module Fog
|
|
85
50
|
end
|
86
51
|
|
87
52
|
class ExceptionWrapper
|
88
|
-
def initialize(client
|
53
|
+
def initialize(client)
|
89
54
|
@client = client
|
90
|
-
@version = version
|
91
55
|
end
|
92
56
|
|
93
57
|
def method_missing(symbol, *args)
|
@@ -107,10 +71,6 @@ module Fog
|
|
107
71
|
def respond_to_missing?(method_name, include_private = false)
|
108
72
|
@client.respond_to?(symbol, include_all) || super
|
109
73
|
end
|
110
|
-
|
111
|
-
def version
|
112
|
-
@version
|
113
|
-
end
|
114
74
|
end
|
115
75
|
|
116
76
|
#
|
@@ -162,24 +122,17 @@ module Fog
|
|
162
122
|
include Shared
|
163
123
|
|
164
124
|
#
|
165
|
-
# The API group of
|
166
|
-
#
|
167
|
-
KUBEVIRT_GROUP = 'kubevirt.io'.freeze
|
168
|
-
|
169
|
-
#
|
170
|
-
# The API group of the Kubernetes core:
|
125
|
+
# The API version and group of the Kubernetes core:
|
171
126
|
#
|
172
127
|
CORE_GROUP = ''.freeze
|
128
|
+
CORE_VERSION = 'v1'.freeze
|
173
129
|
|
174
130
|
#
|
175
|
-
# The API group of
|
176
|
-
#
|
177
|
-
NETWORK_GROUP = 'k8s.cni.cncf.io'.freeze
|
178
|
-
|
179
|
-
#
|
180
|
-
# The API group of the Kubernetes network extention:
|
131
|
+
# The API version and group of KubeVirt:
|
181
132
|
#
|
182
|
-
|
133
|
+
KUBEVIRT_GROUP = 'kubevirt.io'.freeze
|
134
|
+
KUBEVIRT_VERSION = 'v1alpha2'.freeze
|
135
|
+
KUBEVIRT_VERSION_LABEL = KUBEVIRT_GROUP + '/' + KUBEVIRT_VERSION
|
183
136
|
|
184
137
|
def initialize(options={})
|
185
138
|
require 'kubeclient'
|
@@ -192,8 +145,13 @@ module Fog
|
|
192
145
|
@log ||= ::Logger.new(STDOUT)
|
193
146
|
|
194
147
|
@namespace = options[:kubevirt_namespace] || 'default'
|
148
|
+
|
149
|
+
# Prepare the TLS and authentication options that will be used for the standard Kubernetes API
|
150
|
+
# and also for the KubeVirt extension:
|
195
151
|
@opts = {
|
196
|
-
:ssl_options =>
|
152
|
+
:ssl_options => {
|
153
|
+
:verify_ssl => OpenSSL::SSL::VERIFY_NONE,
|
154
|
+
},
|
197
155
|
:auth_options => {
|
198
156
|
:bearer_token => @kubevirt_token
|
199
157
|
}
|
@@ -291,7 +249,7 @@ module Fog
|
|
291
249
|
populate_notice_attributes(vminstance, notice)
|
292
250
|
vminstance
|
293
251
|
end
|
294
|
-
watch = kubevirt_client.
|
252
|
+
watch = kubevirt_client.watch_virtual_machines(opts)
|
295
253
|
|
296
254
|
WatchWrapper.new(watch, mapper)
|
297
255
|
end
|
@@ -338,6 +296,7 @@ module Fog
|
|
338
296
|
|
339
297
|
private
|
340
298
|
|
299
|
+
|
341
300
|
#
|
342
301
|
# Populates required notice attributes
|
343
302
|
#
|
@@ -351,12 +310,18 @@ module Fog
|
|
351
310
|
end
|
352
311
|
|
353
312
|
#
|
354
|
-
# Lazily creates the a client for the given Kubernetes API path.
|
313
|
+
# Lazily creates the a client for the given Kubernetes API path and version.
|
355
314
|
#
|
356
315
|
# @param path [String] The Kubernetes API path.
|
316
|
+
# @param version [String] The Kubernetes API version.
|
357
317
|
# @return [Kubeclient::Client] The client for the given path and version.
|
358
318
|
#
|
359
|
-
def create_client(path)
|
319
|
+
def create_client(path, version)
|
320
|
+
# Return the client immediately if it has been created before:
|
321
|
+
key = path + '/' + version
|
322
|
+
client = @clients[key]
|
323
|
+
return client if client
|
324
|
+
|
360
325
|
# Create the client and save it:
|
361
326
|
url = URI::Generic.build(
|
362
327
|
:scheme => 'https',
|
@@ -364,147 +329,33 @@ module Fog
|
|
364
329
|
:port => @port,
|
365
330
|
:path => path
|
366
331
|
)
|
367
|
-
|
368
|
-
if @kubevirt_token.to_s.empty?
|
369
|
-
create_client_from_config(path)
|
370
|
-
else
|
371
|
-
create_client_from_token(url)
|
372
|
-
end
|
373
|
-
end
|
374
|
-
|
375
|
-
def create_client_from_token(url)
|
376
|
-
# Prepare the TLS and authentication options that will be used for the standard Kubernetes API
|
377
|
-
# and also for the KubeVirt extension:
|
378
|
-
@opts = {
|
379
|
-
:ssl_options => {
|
380
|
-
:verify_ssl => OpenSSL::SSL::VERIFY_NONE,
|
381
|
-
},
|
382
|
-
:auth_options => {
|
383
|
-
:bearer_token => @kubevirt_token
|
384
|
-
}
|
385
|
-
}
|
386
|
-
version = detect_version(url.to_s, @opts[:ssl_options])
|
387
|
-
key = url.path + '/' + version
|
388
|
-
|
389
|
-
client = check_client(key)
|
390
|
-
return client if client
|
391
|
-
|
392
332
|
client = Kubeclient::Client.new(
|
393
333
|
url.to_s,
|
394
334
|
version,
|
395
335
|
@opts
|
396
336
|
)
|
397
|
-
|
398
|
-
wrap_client(client, version, key)
|
399
|
-
end
|
400
|
-
|
401
|
-
def create_client_from_config(path)
|
402
|
-
config = Kubeclient::Config.read(ENV['KUBECONFIG'] || ENV['HOME']+'/.kube/config')
|
403
|
-
context = config.context
|
404
|
-
url = context.api_endpoint
|
405
|
-
version = detect_version(url + path, context.ssl_options)
|
406
|
-
key = path + '/' + version
|
407
|
-
|
408
|
-
client = check_client(key)
|
409
|
-
return client if client
|
410
|
-
|
411
|
-
client = Kubeclient::Client.new(
|
412
|
-
url + path,
|
413
|
-
version,
|
414
|
-
ssl_options: context.ssl_options,
|
415
|
-
auth_options: context.auth_options
|
416
|
-
)
|
417
|
-
|
418
|
-
wrap_client(client, version, key)
|
419
|
-
end
|
420
|
-
|
421
|
-
def check_client(key)
|
422
|
-
@clients[key]
|
423
|
-
end
|
424
|
-
|
425
|
-
def wrap_client(client, version, key)
|
426
|
-
wrapped_client = ExceptionWrapper.new(client, version)
|
337
|
+
wrapped_client = ExceptionWrapper.new(client)
|
427
338
|
@clients[key] = wrapped_client
|
428
339
|
|
340
|
+
# Return the client:
|
429
341
|
wrapped_client
|
430
342
|
end
|
431
343
|
|
432
|
-
def detect_version(url, ssl_options)
|
433
|
-
options = {
|
434
|
-
ssl_ca_file: ssl_options[:ca_file],
|
435
|
-
ssl_cert_store: ssl_options[:cert_store],
|
436
|
-
verify_ssl: ssl_options[:verify_ssl],
|
437
|
-
ssl_client_cert: ssl_options[:client_cert],
|
438
|
-
ssl_client_key: ssl_options[:client_key],
|
439
|
-
}
|
440
|
-
|
441
|
-
response = ::JSON.parse(RestClient::Resource.new(url, options).get)
|
442
|
-
|
443
|
-
# version detected based on
|
444
|
-
# https://github.com/kubernetes-incubator/apiserver-builder/blob/master/docs/concepts/aggregation.md#viewing-discovery-information
|
445
|
-
preferredVersion = response["preferredVersion"]
|
446
|
-
return preferredVersion["version"] if preferredVersion
|
447
|
-
response["versions"][0]
|
448
|
-
end
|
449
|
-
|
450
344
|
def openshift_client
|
451
|
-
create_client('/oapi')
|
345
|
+
create_client('/oapi', CORE_VERSION)
|
452
346
|
end
|
453
347
|
|
454
348
|
def kube_client
|
455
|
-
create_client('/api')
|
349
|
+
create_client('/api', CORE_VERSION)
|
456
350
|
end
|
457
351
|
|
458
352
|
def kubevirt_client
|
459
|
-
create_client('/apis/' + KUBEVIRT_GROUP)
|
460
|
-
end
|
461
|
-
|
462
|
-
def kube_net_client
|
463
|
-
create_client('/apis/' + NETWORK_GROUP)
|
464
|
-
end
|
465
|
-
|
466
|
-
def kube_storage_client
|
467
|
-
create_client('/apis/' + STORAGE_GROUP)
|
353
|
+
create_client('/apis/' + KUBEVIRT_GROUP, KUBEVIRT_VERSION)
|
468
354
|
end
|
469
355
|
|
470
356
|
def log
|
471
357
|
@log
|
472
358
|
end
|
473
|
-
|
474
|
-
#
|
475
|
-
# Prepare the TLS and authentication options that will be used for the
|
476
|
-
# standard Kubernetes API and also for the KubeVirt extension
|
477
|
-
#
|
478
|
-
# @param options [Hash] a hash with connection options
|
479
|
-
#
|
480
|
-
def obtain_ssl_options(options)
|
481
|
-
verify_ssl = options[:kubevirt_verify_ssl]
|
482
|
-
if verify_ssl == true
|
483
|
-
ca = options[:kubevirt_ca_cert] || ""
|
484
|
-
ca = IO.read(ca) if File.file?(ca)
|
485
|
-
certs = ca.split(/(?=-----BEGIN)/).reject(&:empty?).collect do |pem|
|
486
|
-
OpenSSL::X509::Certificate.new(pem)
|
487
|
-
end
|
488
|
-
|
489
|
-
cert_store = OpenSSL::X509::Store.new
|
490
|
-
certs.each do |cert|
|
491
|
-
cert_store.add_cert(cert)
|
492
|
-
end
|
493
|
-
|
494
|
-
ssl_options = {
|
495
|
-
:verify_ssl => OpenSSL::SSL::VERIFY_PEER,
|
496
|
-
:cert_store => cert_store
|
497
|
-
}
|
498
|
-
elsif verify_ssl == false || verify_ssl.to_s.empty?
|
499
|
-
ssl_options = {
|
500
|
-
:verify_ssl => OpenSSL::SSL::VERIFY_NONE
|
501
|
-
}
|
502
|
-
else
|
503
|
-
ssl_options = {
|
504
|
-
:verify_ssl => verify_ssl
|
505
|
-
}
|
506
|
-
end
|
507
|
-
end
|
508
359
|
end
|
509
360
|
|
510
361
|
class Mock
|
@@ -1,13 +1,13 @@
|
|
1
1
|
require 'fog/core/collection'
|
2
|
-
require 'fog/compute/
|
2
|
+
require 'fog/kubevirt/compute/models/node'
|
3
3
|
|
4
4
|
module Fog
|
5
|
-
module
|
6
|
-
class
|
5
|
+
module Kubevirt
|
6
|
+
class Compute
|
7
7
|
class Nodes < Fog::Collection
|
8
8
|
attr_reader :kind, :resource_version
|
9
9
|
|
10
|
-
model Fog::Compute::
|
10
|
+
model Fog::Kubevirt::Compute::Node
|
11
11
|
|
12
12
|
def all(filters = {})
|
13
13
|
nodes = service.list_nodes(filters)
|
@@ -1,13 +1,13 @@
|
|
1
1
|
require 'fog/core/collection'
|
2
|
-
require 'fog/compute/
|
2
|
+
require 'fog/kubevirt/compute/models/template'
|
3
3
|
|
4
4
|
module Fog
|
5
|
-
module
|
6
|
-
class
|
5
|
+
module Kubevirt
|
6
|
+
class Compute
|
7
7
|
class Templates < Fog::Collection
|
8
8
|
attr_reader :kind, :resource_version
|
9
9
|
|
10
|
-
model Fog::Compute::
|
10
|
+
model Fog::Kubevirt::Compute::Template
|
11
11
|
|
12
12
|
def all(filters = {})
|
13
13
|
begin
|