vcloud-core 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +11 -0
- data/lib/vcloud/core/independent_disk.rb +7 -0
- data/lib/vcloud/core/version.rb +1 -1
- data/spec/integration/core/fog/login_spec.rb +5 -0
- data/spec/integration/core/independent_disk_spec.rb +10 -1
- data/spec/vcloud/core/independent_disk_spec.rb +11 -0
- data/vcloud-core.gemspec +1 -1
- metadata +24 -24
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
## 0.15.0 (2014-11-26)
|
2
|
+
|
3
|
+
Features:
|
4
|
+
|
5
|
+
- New method IndependentDisk#destroy to delete an independent disk.
|
6
|
+
|
7
|
+
Bugfixes:
|
8
|
+
|
9
|
+
- Upgrade to Fog version 1.25.0 to support vCloud usernames containing more than
|
10
|
+
one `@` symbol.
|
11
|
+
|
1
12
|
## 0.14.0 (2014-11-10)
|
2
13
|
|
3
14
|
API changes:
|
@@ -105,6 +105,13 @@ module Vcloud
|
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
108
|
+
# Delete the IndependentDisk entity referred to by this object.
|
109
|
+
#
|
110
|
+
# @return [Boolean] Returns true if disk was deleted. Raises an exception otherwise.
|
111
|
+
def destroy
|
112
|
+
Vcloud::Core::Fog::ServiceInterface.new.delete_disk(id)
|
113
|
+
end
|
114
|
+
|
108
115
|
# Convert an integer and units suffix (e.g. 10mb) into an integer of bytes
|
109
116
|
# Allowed suffixes are: mb, gb, mib, gib
|
110
117
|
#
|
data/lib/vcloud/core/version.rb
CHANGED
@@ -24,6 +24,11 @@ describe Vcloud::Core::Fog::Login do
|
|
24
24
|
Fog::Errors::LoadError,
|
25
25
|
/^Missing Credentials\n/
|
26
26
|
)
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should raise an exception succinctly listing the missing credentials when a token is supplied" do
|
30
|
+
pending "FIXME: Test broken by https://github.com/fog/fog-core/commit/08df3056420fa509079704e9e2ac2dd3a04b987e#diff-ff84bd2420c81ca6f03e176dbc1fbdf7L19\n" \
|
31
|
+
"Remove 'pending' once https://github.com/fog/fog-core/pull/97 is in a released version of Fog"
|
27
32
|
expect { subject.token('supersekret') }.to raise_error(
|
28
33
|
ArgumentError,
|
29
34
|
/^Missing required arguments: vcloud_director_.*$/
|
@@ -22,7 +22,7 @@ describe Vcloud::Core::IndependentDisk do
|
|
22
22
|
@test_disk_size,
|
23
23
|
@disk_name_prefix
|
24
24
|
)
|
25
|
-
@test_disk = @test_case_disks.
|
25
|
+
@test_disk = @test_case_disks.shift # we will delete this disk in the tests
|
26
26
|
end
|
27
27
|
|
28
28
|
subject(:fixture_disk) { @test_disk }
|
@@ -104,6 +104,15 @@ describe Vcloud::Core::IndependentDisk do
|
|
104
104
|
|
105
105
|
end
|
106
106
|
|
107
|
+
describe "#destroy" do
|
108
|
+
it "after deletion, access to the disk is forbidden (as the API does not distinguish " +
|
109
|
+
"not present and access-denied)" do
|
110
|
+
fixture_disk.destroy
|
111
|
+
expect(fixture_disk.id).to match(/^#{uuid_matcher}$/)
|
112
|
+
expect { fixture_disk.name }.to raise_error(Fog::Compute::VcloudDirector::Forbidden)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
107
116
|
after(:all) do
|
108
117
|
IntegrationHelper.delete_independent_disks(@test_case_disks)
|
109
118
|
end
|
@@ -235,5 +235,16 @@ describe Vcloud::Core::IndependentDisk do
|
|
235
235
|
|
236
236
|
end
|
237
237
|
|
238
|
+
context "#destroy" do
|
239
|
+
subject { Vcloud::Core::IndependentDisk.new(@disk_id) }
|
240
|
+
|
241
|
+
it "deletes the independent disk entity via Fog delete_disk method" do
|
242
|
+
expect(@mock_fog_interface).to receive(:delete_disk).
|
243
|
+
with(subject.id)
|
244
|
+
subject.destroy
|
245
|
+
end
|
246
|
+
|
247
|
+
end
|
248
|
+
|
238
249
|
end
|
239
250
|
|
data/vcloud-core.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
s.required_ruby_version = '>= 1.9.3'
|
24
24
|
|
25
|
-
s.add_runtime_dependency 'fog', '>= 1.
|
25
|
+
s.add_runtime_dependency 'fog', '>= 1.25.0'
|
26
26
|
s.add_runtime_dependency 'mustache'
|
27
27
|
s.add_runtime_dependency 'highline'
|
28
28
|
s.add_development_dependency 'gem_publisher', '1.2.0'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcloud-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-11-
|
12
|
+
date: 2014-11-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fog
|
16
|
-
requirement: &
|
16
|
+
requirement: &17329660 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.25.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *17329660
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: mustache
|
27
|
-
requirement: &
|
27
|
+
requirement: &17329280 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *17329280
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: highline
|
38
|
-
requirement: &
|
38
|
+
requirement: &17328820 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *17328820
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: gem_publisher
|
49
|
-
requirement: &
|
49
|
+
requirement: &17328320 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - =
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.2.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *17328320
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: pry
|
60
|
-
requirement: &
|
60
|
+
requirement: &17327900 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *17327900
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
|
-
requirement: &
|
71
|
+
requirement: &17327440 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *17327440
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rspec
|
82
|
-
requirement: &
|
82
|
+
requirement: &17326940 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 2.14.1
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *17326940
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rubocop
|
93
|
-
requirement: &
|
93
|
+
requirement: &17326440 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ~>
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 0.23.0
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *17326440
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: simplecov
|
104
|
-
requirement: &
|
104
|
+
requirement: &17325980 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: 0.7.1
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *17325980
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: vcloud-tools-tester
|
115
|
-
requirement: &
|
115
|
+
requirement: &17325520 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ~>
|
@@ -120,7 +120,7 @@ dependencies:
|
|
120
120
|
version: 0.2.0
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *17325520
|
124
124
|
description: Core tools for interacting with VMware vCloud Director. Includes VCloud
|
125
125
|
Query, a light wrapper round the vCloud Query API.
|
126
126
|
email:
|
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
229
|
version: '0'
|
230
230
|
segments:
|
231
231
|
- 0
|
232
|
-
hash:
|
232
|
+
hash: 760204335874509684
|
233
233
|
requirements: []
|
234
234
|
rubyforge_project:
|
235
235
|
rubygems_version: 1.8.11
|