foreman_kubevirt 0.1.5 → 0.1.7
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 +4 -4
- data/README.md +5 -3
- data/app/models/foreman_kubevirt/kubevirt.rb +2 -2
- data/app/validators/volume_validator.rb +7 -3
- data/lib/foreman_kubevirt/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f619df9926ad4c9ca2cf964e29f1f97123224e25bbf9b95c5dd52f2cf63e035a
|
|
4
|
+
data.tar.gz: b55f71d2315a39de2a6825082befb77d304f3dd3234633f1917097cde4ea23da
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
|
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].
|
|
4
|
-
|
|
5
|
-
|
|
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
|
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.
|
|
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-
|
|
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.
|
|
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.
|
|
54
|
+
version: 1.3.3
|
|
55
55
|
description: Provision and manage Kubevirt Virtual Machines from Foreman.
|
|
56
56
|
email:
|
|
57
57
|
- masayag@redhat.com
|