chef-sugar-rackspace 0.3.0 → 0.4.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10e191a88187bd742a097dd79b98912ba8a95f26
|
4
|
+
data.tar.gz: 4a0b42ce178942286361892bad73971cdafebe88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b9a92d86a8ea7d5563030f0fb986f1dc40f47085744785ab222dcfcae40ca07bee94095c01851c78368b934e25d5c4688845c1e95e17221c1b321b9f89d60bf
|
7
|
+
data.tar.gz: cbf43a8519a1ec0cba564a88518eedec9b182c35c58b602c9b9999619778b1bacfc837ca9381583c008d7aafe89e5b2e6b74238c5f65ce9ffdb74f54ad0b4d4d
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
chef-sugar-rackspace CHANGELOG
|
2
2
|
==============================
|
3
3
|
|
4
|
+
0.4.0
|
5
|
+
-----
|
6
|
+
- [jarosser06] - Added rackconnect_v2? and rackconnect_v3? based on the rackconnect ohai plugin
|
7
|
+
- [jarosser06] - Syntax cleanup on rackconnected?
|
8
|
+
|
4
9
|
0.3.0
|
5
10
|
-----
|
6
11
|
- [martinb3] - Bumped chefspec pinning to newer
|
@@ -5,13 +5,20 @@ class Chef
|
|
5
5
|
module Rackconnect
|
6
6
|
extend self
|
7
7
|
|
8
|
+
def rackconnect_v2?(node)
|
9
|
+
return node['rackspace']['rackconnect']['version'] == 2
|
10
|
+
end
|
11
|
+
|
12
|
+
def rackconnect_v3?(node)
|
13
|
+
return node['rackspace']['rackconnect']['version'] == 3
|
14
|
+
end
|
15
|
+
|
8
16
|
def rackconnected?(node)
|
9
|
-
return
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
17
|
+
return true if
|
18
|
+
node['rackspace'] &&
|
19
|
+
node['rackspace']['rackconnect'] &&
|
20
|
+
node['rackspace']['rackconnect']['enabled']
|
21
|
+
false
|
15
22
|
end
|
16
23
|
end
|
17
24
|
|
@@ -19,6 +26,14 @@ class Chef
|
|
19
26
|
def rackconnected?
|
20
27
|
Chef::Sugar::Rackconnect.rackconnected?(node)
|
21
28
|
end
|
29
|
+
|
30
|
+
def rackconnect_v2?
|
31
|
+
Chef::Sugar::Rackconnect.rackconnect_v2?(node)
|
32
|
+
end
|
33
|
+
|
34
|
+
def rackconnect_v3?
|
35
|
+
Chef::Sugar::Rackconnect.rackconnect_v3?(node)
|
36
|
+
end
|
22
37
|
end
|
23
38
|
end
|
24
39
|
end
|
@@ -38,4 +38,38 @@ describe Chef::Sugar::Rackconnect do
|
|
38
38
|
expect(described_class.rackconnected?(node)).to eq(false)
|
39
39
|
end
|
40
40
|
end
|
41
|
+
|
42
|
+
context 'when rackconnect v3' do
|
43
|
+
before do
|
44
|
+
node['rackspace'] = {
|
45
|
+
'rackconnect' => {
|
46
|
+
'enabled' => true,
|
47
|
+
'version' => 3
|
48
|
+
}
|
49
|
+
}
|
50
|
+
end
|
51
|
+
it '#rackconnect_v3? returns true' do
|
52
|
+
expect(described_class.rackconnect_v3?(node)).to eq(true)
|
53
|
+
end
|
54
|
+
it '#rackconnect_v2? returns false' do
|
55
|
+
expect(described_class.rackconnect_v2?(node)).to eq(false)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
context 'when rackconnect v2' do
|
60
|
+
before do
|
61
|
+
node['rackspace'] = {
|
62
|
+
'rackconnect' => {
|
63
|
+
'enabled' => true,
|
64
|
+
'version' => 2
|
65
|
+
}
|
66
|
+
}
|
67
|
+
end
|
68
|
+
it '#rackconnect_v3? returns false' do
|
69
|
+
expect(described_class.rackconnect_v3?(node)).to eq(false)
|
70
|
+
end
|
71
|
+
it '#rackconnect_v2? returns true' do
|
72
|
+
expect(described_class.rackconnect_v2?(node)).to eq(true)
|
73
|
+
end
|
74
|
+
end
|
41
75
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-sugar-rackspace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Rosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-sugar
|