fog-kubevirt 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 503961b1ff1942c2afe14fb611d555cbe7f3020d
4
- data.tar.gz: 63e5dd9843c6d843394a830d2aa725cc6511b605
3
+ metadata.gz: 7a44f9af0dbc054c9c1ad536e20916c4c90bbee0
4
+ data.tar.gz: 622eead4dcc53570f189f73c819bf3fbb63789c4
5
5
  SHA512:
6
- metadata.gz: 646e2fcf922326488c8e98885624f0315ab876b9c2beed165783b4bcaeae12f8ca8ed8bfb69c98de8cb4b6a0ed6d3397d2f6e80b57a816c30baf88998ff539ec
7
- data.tar.gz: 572ac0f6197416be7f96a5c2d5054d5788ef337d809a1e84dca69ecba87ac82a4de35a49091320730622a42b363fc316d3756231a4f3789cb2fa62238ef3487e
6
+ metadata.gz: 02dd72c399e6c1bdc096794b16241f7b55c8e8db0383335236a8a19a1af04208ed96cb00dae2548c31da832bf5cf55367ad2697f02b7f4b5d7cd80435031d95b
7
+ data.tar.gz: 94d3d0630a5c5da539689027e897cd7f57ea456ca2bb4a6b26b99f780de8a233c6bf0e155d3a1d5292fea5e4b7dfbdf281570704d18947443054730df234591e
@@ -41,13 +41,11 @@ module Fog
41
41
  module Shared
42
42
 
43
43
  class EntityCollection < DelegateClass(Array)
44
- attr_reader :kind, :resource_version, :uid, :type
44
+ attr_reader :kind, :resource_version
45
45
 
46
- def initialize(kind, resource_version, uid, type, entities)
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, :resourceVersion
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
- resourceVersion = vms.resourceVersion
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, :resourceVersion
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
- resourceVersion = nodes.resourceVersion
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, :resourceVersion
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
- resourceVersion = ovms.resourceVersion
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, :resourceVersion
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
- resourceVersion = temps.resourceVersion
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, vms.metadata.uid, vms.metadata.type, entities)
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, vms.metadata.uid, vms.metadata.type, entities)
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, ovms.metadata.uid, ovms.metadata.type, entities)
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, temps.metadata.uid, temps.metadata.type, entities)
12
+ EntityCollection.new(temps.kind, temps.resourceVersion, entities)
13
13
  end
14
14
  end
15
15
 
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Kubevirt
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
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: 0.1.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-24 00:00:00.000000000 Z
14
+ date: 2018-05-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler