deltacloud-client 0.0.9.8 → 0.1.0
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.
- data/lib/base_object.rb +282 -0
- data/lib/deltacloud.rb +125 -330
- data/lib/documentation.rb +50 -86
- data/lib/hwp_properties.rb +64 -0
- data/lib/instance_state.rb +29 -0
- data/lib/string.rb +53 -0
- data/specs/hardware_profiles_spec.rb +10 -8
- data/specs/images_spec.rb +15 -13
- data/specs/initialization_spec.rb +8 -6
- data/specs/instance_states_spec.rb +16 -14
- data/specs/instances_spec.rb +26 -23
- data/specs/realms_spec.rb +12 -10
- data/specs/spec_helper.rb +1 -0
- data/specs/storage_snapshot_spec.rb +11 -9
- data/specs/storage_volume_spec.rb +11 -9
- metadata +27 -24
data/specs/realms_spec.rb
CHANGED
@@ -23,16 +23,18 @@ describe "realms" do
|
|
23
23
|
it_should_behave_like "all resources"
|
24
24
|
|
25
25
|
it "should allow retrieval of all realms" do
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
26
|
+
[API_URL, API_URL_REDIRECT].each do |entry_point|
|
27
|
+
DeltaCloud.new( API_NAME, API_PASSWORD, entry_point ) do |client|
|
28
|
+
realms = client.realms
|
29
|
+
realms.should_not be_empty
|
30
|
+
realms.each do |realm|
|
31
|
+
realm.uri.should_not be_nil
|
32
|
+
realm.uri.should be_a(String)
|
33
|
+
realm.id.should_not be_nil
|
34
|
+
realm.id.should be_a(String)
|
35
|
+
realm.name.should_not be_nil
|
36
|
+
realm.name.should be_a(String)
|
37
|
+
end
|
36
38
|
end
|
37
39
|
end
|
38
40
|
end
|
data/specs/spec_helper.rb
CHANGED
@@ -24,15 +24,17 @@ describe "storage snapshot" do
|
|
24
24
|
it_should_behave_like "all resources"
|
25
25
|
|
26
26
|
it "allow retrieval of all storage volumes owned by the current user" do
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
27
|
+
[API_URL, API_URL_REDIRECT].each do |entry_point|
|
28
|
+
client = DeltaCloud.new( API_NAME, API_PASSWORD, entry_point )
|
29
|
+
client.connect do |client|
|
30
|
+
storage_snapshots = client.storage_snapshots
|
31
|
+
storage_snapshots.should_not be_nil
|
32
|
+
storage_snapshots.should_not be_empty
|
33
|
+
ids = storage_snapshots.collect{|e| e.id}
|
34
|
+
ids.size.should eql( 2 )
|
35
|
+
ids.should include( 'snap2' )
|
36
|
+
ids.should include( 'snap3' )
|
37
|
+
end
|
36
38
|
end
|
37
39
|
end
|
38
40
|
|
@@ -24,15 +24,17 @@ describe "storage volumes" do
|
|
24
24
|
it_should_behave_like "all resources"
|
25
25
|
|
26
26
|
it "allow retrieval of all storage volumes owned by the current user" do
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
27
|
+
[API_URL, API_URL_REDIRECT].each do |entry_point|
|
28
|
+
client = DeltaCloud.new( API_NAME, API_PASSWORD, entry_point )
|
29
|
+
client.connect do |client|
|
30
|
+
storage_volumes = client.storage_volumes
|
31
|
+
storage_volumes.should_not be_nil
|
32
|
+
storage_volumes.should_not be_empty
|
33
|
+
ids = storage_volumes.collect{|e| e.id}
|
34
|
+
ids.size.should eql( 2 )
|
35
|
+
ids.should include( 'vol2' )
|
36
|
+
ids.should include( 'vol3' )
|
37
|
+
end
|
36
38
|
end
|
37
39
|
end
|
38
40
|
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deltacloud-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
- 8
|
11
|
-
version: 0.0.9.8
|
10
|
+
version: 0.1.0
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- Red Hat, Inc.
|
@@ -16,7 +15,7 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-29 00:00:00 +02:00
|
20
19
|
default_executable: deltacloudc
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
@@ -77,19 +76,16 @@ extra_rdoc_files:
|
|
77
76
|
- COPYING
|
78
77
|
files:
|
79
78
|
- Rakefile
|
80
|
-
- lib/documentation.rb
|
81
79
|
- lib/plain_formatter.rb
|
80
|
+
- lib/documentation.rb
|
81
|
+
- lib/hwp_properties.rb
|
82
|
+
- lib/instance_state.rb
|
83
|
+
- lib/string.rb
|
82
84
|
- lib/deltacloud.rb
|
85
|
+
- lib/base_object.rb
|
83
86
|
- init.rb
|
84
87
|
- bin/deltacloudc
|
85
88
|
- COPYING
|
86
|
-
- specs/instance_states_spec.rb
|
87
|
-
- specs/images_spec.rb
|
88
|
-
- specs/initialization_spec.rb
|
89
|
-
- specs/storage_snapshot_spec.rb
|
90
|
-
- specs/storage_volume_spec.rb
|
91
|
-
- specs/spec_helper.rb
|
92
|
-
- specs/realms_spec.rb
|
93
89
|
- specs/fixtures/storage_volumes/vol1.yml
|
94
90
|
- specs/fixtures/storage_volumes/vol3.yml
|
95
91
|
- specs/fixtures/storage_volumes/vol2.yml
|
@@ -102,9 +98,14 @@ files:
|
|
102
98
|
- specs/fixtures/instances/inst1.yml
|
103
99
|
- specs/fixtures/instances/inst2.yml
|
104
100
|
- specs/fixtures/instances/inst0.yml
|
105
|
-
- specs/hardware_profiles_spec.rb
|
106
101
|
- specs/shared/resources.rb
|
107
|
-
- specs/
|
102
|
+
- specs/images_spec.rb
|
103
|
+
- specs/initialization_spec.rb
|
104
|
+
- specs/instance_states_spec.rb
|
105
|
+
- specs/realms_spec.rb
|
106
|
+
- specs/spec_helper.rb
|
107
|
+
- specs/storage_snapshot_spec.rb
|
108
|
+
- specs/storage_volume_spec.rb
|
108
109
|
- specs/data/storage_volumes/vol1.yml
|
109
110
|
- specs/data/storage_volumes/vol3.yml
|
110
111
|
- specs/data/storage_volumes/vol2.yml
|
@@ -117,6 +118,8 @@ files:
|
|
117
118
|
- specs/data/instances/inst1.yml
|
118
119
|
- specs/data/instances/inst2.yml
|
119
120
|
- specs/data/instances/inst0.yml
|
121
|
+
- specs/hardware_profiles_spec.rb
|
122
|
+
- specs/instances_spec.rb
|
120
123
|
has_rdoc: true
|
121
124
|
homepage: http://www.deltacloud.org
|
122
125
|
licenses: []
|
@@ -152,13 +155,6 @@ signing_key:
|
|
152
155
|
specification_version: 3
|
153
156
|
summary: Deltacloud REST Client
|
154
157
|
test_files:
|
155
|
-
- specs/instance_states_spec.rb
|
156
|
-
- specs/images_spec.rb
|
157
|
-
- specs/initialization_spec.rb
|
158
|
-
- specs/storage_snapshot_spec.rb
|
159
|
-
- specs/storage_volume_spec.rb
|
160
|
-
- specs/spec_helper.rb
|
161
|
-
- specs/realms_spec.rb
|
162
158
|
- specs/fixtures/storage_volumes/vol1.yml
|
163
159
|
- specs/fixtures/storage_volumes/vol3.yml
|
164
160
|
- specs/fixtures/storage_volumes/vol2.yml
|
@@ -171,9 +167,14 @@ test_files:
|
|
171
167
|
- specs/fixtures/instances/inst1.yml
|
172
168
|
- specs/fixtures/instances/inst2.yml
|
173
169
|
- specs/fixtures/instances/inst0.yml
|
174
|
-
- specs/hardware_profiles_spec.rb
|
175
170
|
- specs/shared/resources.rb
|
176
|
-
- specs/
|
171
|
+
- specs/images_spec.rb
|
172
|
+
- specs/initialization_spec.rb
|
173
|
+
- specs/instance_states_spec.rb
|
174
|
+
- specs/realms_spec.rb
|
175
|
+
- specs/spec_helper.rb
|
176
|
+
- specs/storage_snapshot_spec.rb
|
177
|
+
- specs/storage_volume_spec.rb
|
177
178
|
- specs/data/storage_volumes/vol1.yml
|
178
179
|
- specs/data/storage_volumes/vol3.yml
|
179
180
|
- specs/data/storage_volumes/vol2.yml
|
@@ -186,3 +187,5 @@ test_files:
|
|
186
187
|
- specs/data/instances/inst1.yml
|
187
188
|
- specs/data/instances/inst2.yml
|
188
189
|
- specs/data/instances/inst0.yml
|
190
|
+
- specs/hardware_profiles_spec.rb
|
191
|
+
- specs/instances_spec.rb
|