fog-hyperv 0.0.8 → 0.0.9

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: e0d0573b3cef41610d0b6fbc09d680a35273ad86aa2fa67344e3a576a77572ff
4
- data.tar.gz: 01f53dafc9163356e4d6b6d1ffd820bc6b2566637b0943b2481fbf38a26531a2
3
+ metadata.gz: 366c601e6615f5b716341d88c28d02fe80360121f7e5570bee5e414b9a4b6e5e
4
+ data.tar.gz: 80e37578e713ff575a3044ecc5e0cd93d86a2ddbf9ff19cd18036ee40496e5fa
5
5
  SHA512:
6
- metadata.gz: fdf47eb11f71bc887e3d2597c445ddb38ac40fc7b4628cd0d24a484efd8bfe0f2dbade04b5cb10bec3a1078d778676336d0e47059373c1c7f039262db9b947be
7
- data.tar.gz: 6b8ba989fb728271572e79b645130159d17a5d2263d8f39b98ba3180ab6875c0121530d10537f1bdf79f948bc9034e653afcc2319eda1d606878f2ff277f8bcb
6
+ metadata.gz: 735d793469f62b025edd6adf35e8f57120769eaa71d36c6fea8e25e25c27515c8d9fd338e0c66e5b1645a2863175ee4356008e7438bdeadd70ec5d0be9de222a
7
+ data.tar.gz: 05356cabc6caa6eef04872f2afb1ad795f12acd1cfdc0b4662bf2910ff2864f3601e1e184b90928369e744982874239f077ac957e7de82d2c0f139d0fbc0eb4f
@@ -1,3 +1,7 @@
1
+ ## v0.0.9 2018-05-15
2
+
3
+ - Add support for Fog-Core v2.0+
4
+
1
5
  ## v0.0.8 2018-04-06
2
6
 
3
7
  - Fix issues due to a lost `to_s` call
@@ -1,8 +1,4 @@
1
- # coding: utf-8
2
-
3
- lib = File.expand_path('../lib', __FILE__)
4
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'fog/hyperv/version'
1
+ require File.join(File.expand_path('lib', __dir__), 'fog/hyperv/version')
6
2
 
7
3
  Gem::Specification.new do |spec|
8
4
  spec.name = 'fog-hyperv'
@@ -12,7 +8,7 @@ Gem::Specification.new do |spec|
12
8
 
13
9
  spec.summary = 'Module for the `fog` gem to support Microsoft Hyper-V.'
14
10
  spec.description = 'This library wraps Hyper-V in the `fog` concepts.'
15
- spec.homepage = 'https://github.com/ace13/fog-hyperv'
11
+ spec.homepage = 'https://github.com/ananace/fog-hyperv'
16
12
  spec.license = 'MIT'
17
13
 
18
14
  spec.files = `git ls-files -z`.split("\x0")
@@ -20,10 +16,10 @@ Gem::Specification.new do |spec|
20
16
 
21
17
  spec.require_paths = ['lib']
22
18
 
23
- spec.add_runtime_dependency 'fog-core', '~> 1.42'
24
- spec.add_runtime_dependency 'fog-json', '~> 1.0'
25
- spec.add_runtime_dependency 'winrm', '~> 2.2'
19
+ spec.add_runtime_dependency 'fog-core', '>= 1.42', '< 3.0'
20
+ spec.add_runtime_dependency 'fog-json', '~> 1'
21
+ spec.add_runtime_dependency 'winrm', '~> 2'
26
22
 
27
- spec.add_development_dependency 'rake', '~> 10.0'
28
- spec.add_development_dependency 'minitest', '~> 5.0'
23
+ spec.add_development_dependency 'minitest'
24
+ spec.add_development_dependency 'rake'
29
25
  end
@@ -8,19 +8,19 @@ module Fog
8
8
  attribute :domain, type: :string
9
9
  attribute :name, type: :string
10
10
 
11
- def initialize(attrs = {})
12
- super
11
+ # def initialize(attrs = {})
12
+ # super
13
13
 
14
- @collections = {}
15
- self.class.ensure_collections!
16
- end
14
+ # @collections = {}
15
+ # self.class.ensure_collections!
16
+ # end
17
17
 
18
18
  def nodes
19
- @nodes ||= [service.get_cluster_node(cluster: name, _return_fields: [:description, :name, :node_name])].flatten
19
+ attributes[:nodes] ||= id.nil? ? [] : [service.get_cluster_node(cluster: name, _return_fields: [:description, :name, :node_name])].flatten
20
20
  end
21
21
 
22
22
  def hosts
23
- @hosts ||= nodes.map { |n| service.hosts.get(n[:name]) }
23
+ attributes[:hosts] ||= id.nil? ? [] : nodes.map { |n| service.hosts.get(n[:name]) }
24
24
  end
25
25
 
26
26
  def reload
@@ -34,30 +34,30 @@ module Fog
34
34
  _json_depth: 1
35
35
  )
36
36
 
37
- @nodes = nil
38
- @hosts = nil
37
+ attributes[:nodes] = nil
38
+ attributes[:hosts] = nil
39
39
 
40
40
  merge_attributes(data.attributes)
41
41
  self
42
42
  end
43
43
 
44
- def self.ensure_collections!
45
- return if @collections
46
- @collections = true
44
+ # def self.ensure_collections!
45
+ # return if @collections
46
+ # @collections = true
47
47
 
48
- Fog::Compute::Hyperv.collections.each do |coll|
49
- # Don't recurse on hosts
50
- next if coll == :hosts
48
+ # Fog::Compute::Hyperv.collections.each do |coll|
49
+ # # Don't recurse on hosts
50
+ # next if coll == :hosts
51
51
 
52
- coll_name = coll.to_s.split('_').map(&:capitalize).join
53
- klass = Fog::Compute::Hyperv.const_get(coll_name)
54
- next if klass.requires?(:vm)
52
+ # coll_name = coll.to_s.split('_').map(&:capitalize).join
53
+ # klass = Fog::Compute::Hyperv.const_get(coll_name)
54
+ # next if klass.requires?(:vm)
55
55
 
56
- define_method coll do
57
- @collections[coll] ||= service.send(coll, cluster: self)
58
- end
59
- end
60
- end
56
+ # define_method coll do
57
+ # @collections[coll] ||= service.send(coll, cluster: self)
58
+ # end
59
+ # end
60
+ # end
61
61
  end
62
62
  end
63
63
  end
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Hyperv
3
- VERSION = '0.0.8'.freeze
3
+ VERSION = '0.0.9'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,85 +1,91 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-hyperv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Olofsson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-06 00:00:00.000000000 Z
11
+ date: 2018-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.42'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '3.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '1.42'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '3.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: fog-json
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: '1.0'
39
+ version: '1'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: '1.0'
46
+ version: '1'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: winrm
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '2.2'
53
+ version: '2'
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '2.2'
60
+ version: '2'
55
61
  - !ruby/object:Gem::Dependency
56
- name: rake
62
+ name: minitest
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
- - - "~>"
65
+ - - ">="
60
66
  - !ruby/object:Gem::Version
61
- version: '10.0'
67
+ version: '0'
62
68
  type: :development
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
- - - "~>"
72
+ - - ">="
67
73
  - !ruby/object:Gem::Version
68
- version: '10.0'
74
+ version: '0'
69
75
  - !ruby/object:Gem::Dependency
70
- name: minitest
76
+ name: rake
71
77
  requirement: !ruby/object:Gem::Requirement
72
78
  requirements:
73
- - - "~>"
79
+ - - ">="
74
80
  - !ruby/object:Gem::Version
75
- version: '5.0'
81
+ version: '0'
76
82
  type: :development
77
83
  prerelease: false
78
84
  version_requirements: !ruby/object:Gem::Requirement
79
85
  requirements:
80
- - - "~>"
86
+ - - ">="
81
87
  - !ruby/object:Gem::Version
82
- version: '5.0'
88
+ version: '0'
83
89
  description: This library wraps Hyper-V in the `fog` concepts.
84
90
  email:
85
91
  - alexander.olofsson@liu.se
@@ -175,7 +181,7 @@ files:
175
181
  - lib/fog/model.rb
176
182
  - test/fog/hyperv_test.rb
177
183
  - test/test_helper.rb
178
- homepage: https://github.com/ace13/fog-hyperv
184
+ homepage: https://github.com/ananace/fog-hyperv
179
185
  licenses:
180
186
  - MIT
181
187
  metadata: {}