fog-kubevirt 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25e403e8a8bffea6ae2d48104dc39d7b98acfdc4af0b1484ab569060d6e2df45
4
- data.tar.gz: abd04bab68de9a88916e7b534050643beea7c6305b4647cc746e5cc971fb252c
3
+ metadata.gz: b3179fe8d9931ca7ea27fe0f345109c213c60d030045a4678d2951ec0fad61dd
4
+ data.tar.gz: ee83703dadbf2509eef8905117a935f1c7cbb14b3aa7f17b2334821502b3592d
5
5
  SHA512:
6
- metadata.gz: f599a11c355c7cf59272f6773976bbdeb164cdb4e4c61202805e79b595475330fcfc57eb38177e45d2b129761436b6924a8ab101d7551a838870e11830335eff
7
- data.tar.gz: 26e460f286f1e07d58b51105df89dba62ccbd39163e219938b1256e686e49ba61c15cf69562c418ed23f9a1b24bbedec2b2887940c05182d0c8bd0aee534af2a
6
+ metadata.gz: 7a6fc1a166cdc365409d1ad16aa665d8672037174aa54f66d39698defb4a03ebe8376da5553e64c55dac13129b097e1399af9825a333125601e46a4e78b4eabb
7
+ data.tar.gz: 408db587d8256e0cfa20f103bab0be5f62f5b56b8acdc2829e1a23e17f1bfaa5dd83f3eb9978975aaf398c2b6cd952675d506b8b1227185a2a60c401582c36a7
@@ -148,6 +148,11 @@ module Fog
148
148
  #
149
149
  STORAGE_GROUP = 'storage.k8s.io'.freeze
150
150
 
151
+ #
152
+ # The API group of the Openshift Templates extension:
153
+ #
154
+ TEMPLATE_GROUP = 'template.openshift.io'.freeze
155
+
151
156
  def initialize(options={})
152
157
  require 'kubeclient'
153
158
 
@@ -285,7 +290,7 @@ module Fog
285
290
  populate_notice_attributes(template, notice)
286
291
  template
287
292
  end
288
- watch = openshift_client.watch_templates(opts)
293
+ watch = openshift_template_client.watch_templates(opts)
289
294
 
290
295
  WatchWrapper.new(watch, mapper)
291
296
  end
@@ -431,8 +436,8 @@ module Fog
431
436
  version
432
437
  end
433
438
 
434
- def openshift_client
435
- create_client('/oapi')
439
+ def openshift_template_client
440
+ create_client('/apis/' + TEMPLATE_GROUP)
436
441
  end
437
442
 
438
443
  def kube_client
@@ -455,6 +460,10 @@ module Fog
455
460
  @log
456
461
  end
457
462
 
463
+ def cert_expired?(cert)
464
+ Time.now > cert.not_after
465
+ end
466
+
458
467
  #
459
468
  # Prepare the TLS and authentication options that will be used for the
460
469
  # standard Kubernetes API and also for the KubeVirt extension
@@ -472,6 +481,7 @@ module Fog
472
481
 
473
482
  cert_store = OpenSSL::X509::Store.new
474
483
  certs.each do |cert|
484
+ raise ::Fog::Kubevirt::Errors::ValidationError, "Certificate has been expired" if cert_expired?(cert)
475
485
  cert_store.add_cert(cert)
476
486
  end
477
487
 
@@ -3,7 +3,7 @@ module Fog
3
3
  class Compute
4
4
  class Real
5
5
  def get_template(name)
6
- Template.parse object_to_hash( openshift_client.get_template(name, @namespace) )
6
+ Template.parse object_to_hash( openshift_template_client.get_template(name, @namespace) )
7
7
  end
8
8
  end
9
9
 
@@ -5,7 +5,7 @@ module Fog
5
5
  class Compute
6
6
  class Real
7
7
  def list_templates(_filters = {})
8
- temps = openshift_client.get_templates(namespace: @namespace)
8
+ temps = openshift_template_client.get_templates(namespace: @namespace)
9
9
  entities = temps.map do |kubevirt_obj|
10
10
  Template.parse object_to_hash(kubevirt_obj)
11
11
  end
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Kubevirt
3
- VERSION = '1.3.4'
3
+ VERSION = '1.3.5'
4
4
  end
5
5
  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.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Kliczewski
@@ -11,11 +11,12 @@ authors:
11
11
  - Adam Grare
12
12
  - Boris Odnopozov
13
13
  - Shira Maximov
14
+ - yifatmakias
14
15
  - Wesley Beary
15
- autorequire:
16
+ autorequire:
16
17
  bindir: bin
17
18
  cert_chain: []
18
- date: 2020-05-10 00:00:00.000000000 Z
19
+ date: 2022-02-02 00:00:00.000000000 Z
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: minitest
@@ -135,9 +136,10 @@ email:
135
136
  - masayag@redhat.com
136
137
  - plribeiro3000@gmail.com
137
138
  - gilles@redhat.com
138
- - agrare@redhat.com
139
+ - adam@grare.com
139
140
  - bodnopoz@redhat.com
140
141
  - shiramaximov@gmail.com
142
+ - ymakias@redhat.com
141
143
  - geemus@gmail.com
142
144
  executables: []
143
145
  extensions: []
@@ -244,7 +246,7 @@ homepage: https://github.com/fog/fog-kubevirt
244
246
  licenses:
245
247
  - Apache-2.0
246
248
  metadata: {}
247
- post_install_message:
249
+ post_install_message:
248
250
  rdoc_options: []
249
251
  require_paths:
250
252
  - lib
@@ -259,8 +261,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
259
261
  - !ruby/object:Gem::Version
260
262
  version: '0'
261
263
  requirements: []
262
- rubygems_version: 3.0.3
263
- signing_key:
264
+ rubygems_version: 3.1.6
265
+ signing_key:
264
266
  specification_version: 4
265
267
  summary: Module for the 'fog' gem to support Kubevirt.
266
268
  test_files: