foreman_kubevirt 0.1.5 → 0.1.7

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: fee0a645f764e86b484cfc3655738b44336a596da85c135e381ec0ae8cf856fd
4
- data.tar.gz: b109ec03942dd9cad8832f63e276fede175d6f7899c40cd6aacac578e956fee8
3
+ metadata.gz: f619df9926ad4c9ca2cf964e29f1f97123224e25bbf9b95c5dd52f2cf63e035a
4
+ data.tar.gz: b55f71d2315a39de2a6825082befb77d304f3dd3234633f1917097cde4ea23da
5
5
  SHA512:
6
- metadata.gz: 0d4ad6baf08d620d48c3b35e687bdcb61d967ea09bd4eabdd92316f29b57ceba1afa482df5417ec86d5f4218e0ce9e2dcce00800f59bf5ca57ec2aeeb1645bba
7
- data.tar.gz: 4353bd71b0ad05b9584882ceebdc8f76667e47a025ba09d0a1d5642818bbf1b10d4325ae86c79e41a752fc7ac89c3bc538d7d97225254951df065e3ca7c95092
6
+ metadata.gz: 9ab3ad59f3606d8ced103e68e9af033fcc5bc77dd75c39e0c5a6f5b61225223177fef474f551143b7160bdbb36363b056c1b1b602c71cff23c01e6569160e34e
7
+ data.tar.gz: 8669114d8c00088129ecc3cf07fb2aa121949f672493466d6401d9cda0d7f773bb52c3e74503479717853abb3b3c88acafa440d11bac78a7e66f2b17add38667
data/README.md CHANGED
@@ -55,9 +55,11 @@ To verify that the installation was successful, go to Foreman, top bar **Adminis
55
55
 
56
56
  ## Compatibility
57
57
 
58
- | Foreman Version | Plugin Version |
59
- | --------------- | --------------:|
60
- | >= 1.21.x | ~> 0.1.x |
58
+
59
+
60
+ | Foreman Version | Plugin Version | Kubevirt API Version |
61
+ | --------------- | --------------:| -------------------- |
62
+ | >= 1.21.x | ~> 0.1.x | v1alpha3 |
61
63
 
62
64
  ## Usage
63
65
  Go to **Infrastructure > Compute Resources** and click on **New Compute Resource**.
@@ -321,7 +321,6 @@ module ForemanKubevirt
321
321
 
322
322
  def client
323
323
  return @client if @client
324
-
325
324
  @client ||= Fog::Kubevirt::Compute.new(
326
325
  :kubevirt_hostname => hostname,
327
326
  :kubevirt_port => api_port,
@@ -329,7 +328,8 @@ module ForemanKubevirt
329
328
  :kubevirt_token => token,
330
329
  :kubevirt_log => logger,
331
330
  :kubevirt_verify_ssl => ca_cert.present?,
332
- :kubevirt_ca_cert => ca_cert
331
+ :kubevirt_ca_cert => ca_cert,
332
+ :kubevirt_version => "v1alpha3"
333
333
  )
334
334
  rescue OpenSSL::X509::CertificateError
335
335
  raise_certification_failure_exception
@@ -1,8 +1,12 @@
1
1
  class VolumeValidator < ActiveModel::EachValidator
2
2
  def validate_each(record, attribute, value)
3
- value[:volumes_attributes].each do |_, attrs|
4
- if attrs["capacity"].to_s.empty? || /\A\d+G?\Z/.match(attrs["capacity"].to_s).nil?
5
- record.errors.add(attribute, _("Volume size #{attrs["capacity"]} is not valid"))
3
+ if value[:volumes_attributes].present?
4
+ value[:volumes_attributes].each do |_, attrs|
5
+ if attrs.key?("capacity") and attrs.key?("storage_class")
6
+ if attrs["capacity"].to_s.empty? || /\A\d+G?\Z/.match(attrs["capacity"].to_s).nil?
7
+ record.errors.add(attribute, _("Volume size #{attrs["capacity"]} is not valid"))
8
+ end
9
+ end
6
10
  end
7
11
  end
8
12
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanKubevirt
2
- VERSION = '0.1.5'.freeze
2
+ VERSION = '0.1.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_kubevirt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moti Asayag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-27 00:00:00.000000000 Z
11
+ date: 2019-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.3.2
47
+ version: 1.3.3
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.3.2
54
+ version: 1.3.3
55
55
  description: Provision and manage Kubevirt Virtual Machines from Foreman.
56
56
  email:
57
57
  - masayag@redhat.com