deltacloud-client 0.0.9.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
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
- DeltaCloud.new( API_NAME, API_PASSWORD, API_URL ) do |client|
27
- realms = client.realms
28
- realms.should_not be_empty
29
- realms.each do |realm|
30
- realm.uri.should_not be_nil
31
- realm.uri.should be_a(String)
32
- realm.id.should_not be_nil
33
- realm.id.should be_a(String)
34
- realm.name.should_not be_nil
35
- realm.name.should be_a(String)
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
@@ -33,6 +33,7 @@ API_PORT = api_port
33
33
  API_PATH = '/api'
34
34
 
35
35
  API_URL = "http://#{API_HOST}:#{API_PORT}#{API_PATH}"
36
+ API_URL_REDIRECT = "http://#{API_HOST}:#{API_PORT}"
36
37
  API_NAME = 'mockuser'
37
38
  API_PASSWORD = 'mockpassword'
38
39
 
@@ -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
- client = DeltaCloud.new( API_NAME, API_PASSWORD, API_URL )
28
- client.connect do |client|
29
- storage_snapshots = client.storage_snapshots
30
- storage_snapshots.should_not be_nil
31
- storage_snapshots.should_not be_empty
32
- ids = storage_snapshots.collect{|e| e.id}
33
- ids.size.should eql( 2 )
34
- ids.should include( 'snap2' )
35
- ids.should include( 'snap3' )
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
- client = DeltaCloud.new( API_NAME, API_PASSWORD, API_URL )
28
- client.connect do |client|
29
- storage_volumes = client.storage_volumes
30
- storage_volumes.should_not be_nil
31
- storage_volumes.should_not be_empty
32
- ids = storage_volumes.collect{|e| e.id}
33
- ids.size.should eql( 2 )
34
- ids.should include( 'vol2' )
35
- ids.should include( 'vol3' )
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: 123
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 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-06 00:00:00 +02:00
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/instances_spec.rb
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/instances_spec.rb
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