vcloud-core 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +8 -0
- data/lib/vcloud/core/api_interface.rb +11 -8
- data/lib/vcloud/core/vapp.rb +1 -1
- data/lib/vcloud/core/version.rb +1 -1
- data/spec/integration/core/vm_spec.rb +2 -2
- data/spec/vcloud/core/vapp_spec.rb +3 -3
- metadata +3 -3
data/CHANGELOG.md
CHANGED
@@ -5,29 +5,32 @@ module Vcloud
|
|
5
5
|
# if functionality does not exist in Core
|
6
6
|
class ApiInterface
|
7
7
|
|
8
|
-
def
|
9
|
-
@fog_service_interface
|
10
|
-
|
8
|
+
def fog_service_interface
|
9
|
+
@fog_service_interface ||= Vcloud::Core::Fog::ServiceInterface.new
|
10
|
+
end
|
11
|
+
|
12
|
+
def fog_model_interface
|
13
|
+
@fog_model_interface ||= Vcloud::Core::Fog::ModelInterface.new
|
11
14
|
end
|
12
15
|
|
13
16
|
def get_vapp_by_name_and_vdc_name(name, vdc_name)
|
14
|
-
|
17
|
+
fog_service_interface.get_vapp_by_name_and_vdc_name(name, vdc_name)
|
15
18
|
end
|
16
19
|
|
17
20
|
def get_vapp(id)
|
18
|
-
|
21
|
+
fog_service_interface.get_vapp(id)
|
19
22
|
end
|
20
23
|
|
21
24
|
def delete_vapp(id)
|
22
|
-
|
25
|
+
fog_service_interface.delete_vapp(id)
|
23
26
|
end
|
24
27
|
|
25
28
|
def delete_network(id)
|
26
|
-
|
29
|
+
fog_service_interface.delete_network(id)
|
27
30
|
end
|
28
31
|
|
29
32
|
def current_organization
|
30
|
-
|
33
|
+
fog_model_interface.current_organization
|
31
34
|
end
|
32
35
|
|
33
36
|
end
|
data/lib/vcloud/core/vapp.rb
CHANGED
data/lib/vcloud/core/version.rb
CHANGED
@@ -31,8 +31,8 @@ describe Vcloud::Core::Vm do
|
|
31
31
|
"vcloud-core-vm-tests"
|
32
32
|
)
|
33
33
|
@vapp = @test_case_vapps.first
|
34
|
-
vapp_vms = @vapp.
|
35
|
-
vm_id =
|
34
|
+
vapp_vms = @vapp.vms.map do |vm|
|
35
|
+
vm_id = vm[:href].split('/').last
|
36
36
|
Vcloud::Core::Vm.new(vm_id, @vapp)
|
37
37
|
end
|
38
38
|
@vm = vapp_vms.first
|
@@ -22,7 +22,7 @@ module Vcloud
|
|
22
22
|
it { should respond_to(:name) }
|
23
23
|
it { should respond_to(:href) }
|
24
24
|
it { should respond_to(:vdc_id) }
|
25
|
-
it { should respond_to(:
|
25
|
+
it { should respond_to(:vms) }
|
26
26
|
it { should respond_to(:networks) }
|
27
27
|
it { should respond_to(:power_on) }
|
28
28
|
end
|
@@ -115,8 +115,8 @@ module Vcloud
|
|
115
115
|
end
|
116
116
|
|
117
117
|
it "should return vms" do
|
118
|
-
expect(@vapp.
|
119
|
-
expect(@vapp.
|
118
|
+
expect(@vapp.vms.count).to eq(1)
|
119
|
+
expect(@vapp.vms.first[:href]).to eq('/vm-123aea1e-a5e9-4dd1-a028-40db8c98d237')
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
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.9.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-08-
|
12
|
+
date: 2014-08-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fog
|
@@ -279,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
279
279
|
version: '0'
|
280
280
|
segments:
|
281
281
|
- 0
|
282
|
-
hash:
|
282
|
+
hash: 140460573904569267
|
283
283
|
requirements: []
|
284
284
|
rubyforge_project:
|
285
285
|
rubygems_version: 1.8.23
|