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 CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.9.0 (2014-08-08)
2
+
3
+ API changes:
4
+
5
+ - Change name of method that returns the VMs in a vApp via the API, from
6
+ `fog_vms` to `vms`.
7
+ This change is not backwards-compatible.
8
+
1
9
  ## 0.8.0 (2014-08-07)
2
10
 
3
11
  API changes:
@@ -5,29 +5,32 @@ module Vcloud
5
5
  # if functionality does not exist in Core
6
6
  class ApiInterface
7
7
 
8
- def initialize
9
- @fog_service_interface = Vcloud::Core::Fog::ServiceInterface.new
10
- @fog_model_interface = Vcloud::Core::Fog::ModelInterface.new
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
- @fog_service_interface.get_vapp_by_name_and_vdc_name(name, vdc_name)
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
- @fog_service_interface.get_vapp(id)
21
+ fog_service_interface.get_vapp(id)
19
22
  end
20
23
 
21
24
  def delete_vapp(id)
22
- @fog_service_interface.delete_vapp(id)
25
+ fog_service_interface.delete_vapp(id)
23
26
  end
24
27
 
25
28
  def delete_network(id)
26
- @fog_service_interface.delete_network(id)
29
+ fog_service_interface.delete_network(id)
27
30
  end
28
31
 
29
32
  def current_organization
30
- @fog_model_interface.current_organization
33
+ fog_model_interface.current_organization
31
34
  end
32
35
 
33
36
  end
@@ -48,7 +48,7 @@ module Vcloud
48
48
  link ? link[:href].split('/').last : raise('a vapp without parent vdc found')
49
49
  end
50
50
 
51
- def fog_vms
51
+ def vms
52
52
  vcloud_attributes[:Children][:Vm]
53
53
  end
54
54
 
@@ -1,5 +1,5 @@
1
1
  module Vcloud
2
2
  module Core
3
- VERSION = '0.8.0'
3
+ VERSION = '0.9.0'
4
4
  end
5
5
  end
@@ -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.fog_vms.map do |fog_vm|
35
- vm_id = fog_vm[:href].split('/').last
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(:fog_vms) }
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.fog_vms.count).to eq(1)
119
- expect(@vapp.fog_vms.first[:href]).to eq('/vm-123aea1e-a5e9-4dd1-a028-40db8c98d237')
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.8.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-07 00:00:00.000000000 Z
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: 2495951714182978305
282
+ hash: 140460573904569267
283
283
  requirements: []
284
284
  rubyforge_project:
285
285
  rubygems_version: 1.8.23