fog-kubevirt 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fog/compute/kubevirt.rb +2 -4
- data/lib/fog/compute/kubevirt/models/livevm.rb +3 -1
- data/lib/fog/compute/kubevirt/models/livevms.rb +2 -2
- data/lib/fog/compute/kubevirt/models/nodes.rb +2 -2
- data/lib/fog/compute/kubevirt/models/offlinevms.rb +2 -2
- data/lib/fog/compute/kubevirt/models/templates.rb +2 -2
- data/lib/fog/compute/kubevirt/requests/list_livevms.rb +1 -1
- data/lib/fog/compute/kubevirt/requests/list_nodes.rb +1 -1
- data/lib/fog/compute/kubevirt/requests/list_offlinevms.rb +1 -1
- data/lib/fog/compute/kubevirt/requests/list_templates.rb +1 -1
- data/lib/fog/kubevirt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a44f9af0dbc054c9c1ad536e20916c4c90bbee0
|
4
|
+
data.tar.gz: 622eead4dcc53570f189f73c819bf3fbb63789c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02dd72c399e6c1bdc096794b16241f7b55c8e8db0383335236a8a19a1af04208ed96cb00dae2548c31da832bf5cf55367ad2697f02b7f4b5d7cd80435031d95b
|
7
|
+
data.tar.gz: 94d3d0630a5c5da539689027e897cd7f57ea456ca2bb4a6b26b99f780de8a233c6bf0e155d3a1d5292fea5e4b7dfbdf281570704d18947443054730df234591e
|
data/lib/fog/compute/kubevirt.rb
CHANGED
@@ -41,13 +41,11 @@ module Fog
|
|
41
41
|
module Shared
|
42
42
|
|
43
43
|
class EntityCollection < DelegateClass(Array)
|
44
|
-
attr_reader :kind, :resource_version
|
44
|
+
attr_reader :kind, :resource_version
|
45
45
|
|
46
|
-
def initialize(kind, resource_version,
|
46
|
+
def initialize(kind, resource_version, entities)
|
47
47
|
@kind = kind
|
48
48
|
@resource_version = resource_version
|
49
|
-
@uid = uid
|
50
|
-
@type = type
|
51
49
|
super(entities)
|
52
50
|
end
|
53
51
|
end
|
@@ -15,6 +15,7 @@ module Fog
|
|
15
15
|
attribute :volumes, :aliases => 'spec_volumes'
|
16
16
|
attribute :ip_address, :aliases => 'status_interfaces_ip'
|
17
17
|
attribute :node_name, :aliases => 'status_node_name'
|
18
|
+
attribute :status, :aliases => 'status_phase'
|
18
19
|
|
19
20
|
def self.parse(object)
|
20
21
|
metadata = object[:metadata]
|
@@ -34,7 +35,8 @@ module Fog
|
|
34
35
|
:disks => domain[:devices][:disks],
|
35
36
|
:volumes => spec[:volumes],
|
36
37
|
:ip_address => status.dig(:interfaces, 0, :ipAddress),
|
37
|
-
:node_name => status[:nodeName]
|
38
|
+
:node_name => status[:nodeName],
|
39
|
+
:status => status[:phase]
|
38
40
|
}
|
39
41
|
end
|
40
42
|
end
|
@@ -5,14 +5,14 @@ module Fog
|
|
5
5
|
module Compute
|
6
6
|
class Kubevirt
|
7
7
|
class Livevms < Fog::Collection
|
8
|
-
attr_reader :kind, :
|
8
|
+
attr_reader :kind, :resource_version
|
9
9
|
|
10
10
|
model Fog::Compute::Kubevirt::Livevm
|
11
11
|
|
12
12
|
def all(filters = {})
|
13
13
|
vms = service.list_livevms(filters)
|
14
14
|
kind = vms.kind
|
15
|
-
|
15
|
+
resource_version = vms.resource_version
|
16
16
|
load vms
|
17
17
|
end
|
18
18
|
|
@@ -5,14 +5,14 @@ module Fog
|
|
5
5
|
module Compute
|
6
6
|
class Kubevirt
|
7
7
|
class Nodes < Fog::Collection
|
8
|
-
attr_reader :kind, :
|
8
|
+
attr_reader :kind, :resource_version
|
9
9
|
|
10
10
|
model Fog::Compute::Kubevirt::Node
|
11
11
|
|
12
12
|
def all(filters = {})
|
13
13
|
nodes = service.list_nodes(filters)
|
14
14
|
kind = nodes.kind
|
15
|
-
|
15
|
+
resource_version = nodes.resource_version
|
16
16
|
load nodes
|
17
17
|
end
|
18
18
|
|
@@ -5,14 +5,14 @@ module Fog
|
|
5
5
|
module Compute
|
6
6
|
class Kubevirt
|
7
7
|
class Offlinevms < Fog::Collection
|
8
|
-
attr_reader :kind, :
|
8
|
+
attr_reader :kind, :resource_version
|
9
9
|
|
10
10
|
model Fog::Compute::Kubevirt::Offlinevm
|
11
11
|
|
12
12
|
def all(filters = {})
|
13
13
|
ovms = service.list_offlinevms(filters)
|
14
14
|
kind = ovms.kind
|
15
|
-
|
15
|
+
resource_version = ovms.resource_version
|
16
16
|
load ovms
|
17
17
|
end
|
18
18
|
|
@@ -5,14 +5,14 @@ module Fog
|
|
5
5
|
module Compute
|
6
6
|
class Kubevirt
|
7
7
|
class Templates < Fog::Collection
|
8
|
-
attr_reader :kind, :
|
8
|
+
attr_reader :kind, :resource_version
|
9
9
|
|
10
10
|
model Fog::Compute::Kubevirt::Template
|
11
11
|
|
12
12
|
def all(filters = {})
|
13
13
|
temps = service.list_templates(filters)
|
14
14
|
kind = temps.kind
|
15
|
-
|
15
|
+
resource_version = temps.resource_version
|
16
16
|
load temps
|
17
17
|
end
|
18
18
|
|
@@ -7,7 +7,7 @@ module Fog
|
|
7
7
|
entities = vms.map do |kubevirt_obj|
|
8
8
|
Livevm.parse object_to_hash(kubevirt_obj)
|
9
9
|
end
|
10
|
-
EntityCollection.new(vms.kind, vms.resourceVersion,
|
10
|
+
EntityCollection.new(vms.kind, vms.resourceVersion, entities)
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
@@ -5,7 +5,7 @@ module Fog
|
|
5
5
|
def list_nodes(_filters = {})
|
6
6
|
nodes = kube_client.get_nodes
|
7
7
|
entities = nodes.map { |kubevirt_obj| Node.parse object_to_hash(kubevirt_obj) }
|
8
|
-
EntityCollection.new(nodes.kind, nodes.resourceVersion,
|
8
|
+
EntityCollection.new(nodes.kind, nodes.resourceVersion, entities)
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
@@ -9,7 +9,7 @@ module Fog
|
|
9
9
|
entities = ovms.map do |kubevirt_obj|
|
10
10
|
Offlinevm.parse object_to_hash(kubevirt_obj)
|
11
11
|
end
|
12
|
-
EntityCollection.new(ovms.kind, ovms.resourceVersion,
|
12
|
+
EntityCollection.new(ovms.kind, ovms.resourceVersion, entities)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
@@ -9,7 +9,7 @@ module Fog
|
|
9
9
|
entities = temps.map do |kubevirt_obj|
|
10
10
|
Template.parse object_to_hash(kubevirt_obj)
|
11
11
|
end
|
12
|
-
EntityCollection.new(temps.kind, temps.resourceVersion,
|
12
|
+
EntityCollection.new(temps.kind, temps.resourceVersion, entities)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
data/lib/fog/kubevirt/version.rb
CHANGED
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: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Kliczewski
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-05-
|
14
|
+
date: 2018-05-27 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|