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 +4 -4
- data/CHANGELOG.md +4 -0
- data/fog-hyperv.gemspec +7 -11
- data/lib/fog/hyperv/models/compute/cluster.rb +23 -23
- data/lib/fog/hyperv/version.rb +1 -1
- metadata +25 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 366c601e6615f5b716341d88c28d02fe80360121f7e5570bee5e414b9a4b6e5e
|
4
|
+
data.tar.gz: 80e37578e713ff575a3044ecc5e0cd93d86a2ddbf9ff19cd18036ee40496e5fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 735d793469f62b025edd6adf35e8f57120769eaa71d36c6fea8e25e25c27515c8d9fd338e0c66e5b1645a2863175ee4356008e7438bdeadd70ec5d0be9de222a
|
7
|
+
data.tar.gz: 05356cabc6caa6eef04872f2afb1ad795f12acd1cfdc0b4662bf2910ff2864f3601e1e184b90928369e744982874239f077ac957e7de82d2c0f139d0fbc0eb4f
|
data/CHANGELOG.md
CHANGED
data/fog-hyperv.gemspec
CHANGED
@@ -1,8 +1,4 @@
|
|
1
|
-
|
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/
|
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', '
|
24
|
-
spec.add_runtime_dependency 'fog-json', '~> 1
|
25
|
-
spec.add_runtime_dependency 'winrm', '~> 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 '
|
28
|
-
spec.add_development_dependency '
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
38
|
-
|
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
|
-
|
46
|
-
|
44
|
+
# def self.ensure_collections!
|
45
|
+
# return if @collections
|
46
|
+
# @collections = true
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
# Fog::Compute::Hyperv.collections.each do |coll|
|
49
|
+
# # Don't recurse on hosts
|
50
|
+
# next if coll == :hosts
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
|
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
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
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
|
data/lib/fog/hyperv/version.rb
CHANGED
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.
|
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-
|
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
|
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
|
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
|
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
|
60
|
+
version: '2'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
62
|
+
name: minitest
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
|
-
- - "
|
65
|
+
- - ">="
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
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: '
|
74
|
+
version: '0'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
76
|
+
name: rake
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
|
-
- - "
|
79
|
+
- - ">="
|
74
80
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
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: '
|
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/
|
184
|
+
homepage: https://github.com/ananace/fog-hyperv
|
179
185
|
licenses:
|
180
186
|
- MIT
|
181
187
|
metadata: {}
|