vcloud-core 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,12 +19,12 @@ describe Vcloud::Core::QueryRunner do
19
19
  allow(@mock_fog_interface).to receive(:get_execute_query).and_return(
20
20
  {:Link => [
21
21
  {:rel => 'down',
22
- :href => 'query?type=alice&format=records'},
23
- {:rel => 'down',
24
- :href => 'query?type=bob&format=records'},
25
- {:rel => 'down',
26
- :href => 'query?type=charlie&format=records'},
27
- ]})
22
+ :href => 'query?type=alice&format=records'},
23
+ {:rel => 'down',
24
+ :href => 'query?type=bob&format=records'},
25
+ {:rel => 'down',
26
+ :href => 'query?type=charlie&format=records'},
27
+ ]})
28
28
  expect(@query_runner.available_query_types).to eq(['alice', 'bob', 'charlie'])
29
29
  end
30
30
 
@@ -32,12 +32,12 @@ describe Vcloud::Core::QueryRunner do
32
32
  allow(@mock_fog_interface).to receive(:get_execute_query).and_return(
33
33
  {:Link => [
34
34
  {:rel => 'down',
35
- :href => 'query?type=alice&format=references'},
36
- {:rel => 'down',
37
- :href => 'query?type=bob&format=idrecords'},
38
- {:rel => 'down',
39
- :href => 'query?type=charlie&format=records'},
40
- ]})
35
+ :href => 'query?type=alice&format=references'},
36
+ {:rel => 'down',
37
+ :href => 'query?type=bob&format=idrecords'},
38
+ {:rel => 'down',
39
+ :href => 'query?type=charlie&format=records'},
40
+ ]})
41
41
  expect(@query_runner.available_query_types).to eq(['charlie'])
42
42
  end
43
43
 
@@ -58,8 +58,8 @@ describe Vcloud::Core::QueryRunner do
58
58
  it 'return no results when fog results do not include a "Record" or a "Reference"' do
59
59
  allow(@mock_fog_interface).to receive(:get_execute_query).and_return(
60
60
  {
61
- :WibbleBlob => {:field1 => 'Stuff 1'}
62
- }
61
+ :WibbleBlob => {:field1 => 'Stuff 1'}
62
+ }
63
63
  )
64
64
  expect(@query_runner.run().size).to eq(0)
65
65
  end
@@ -68,8 +68,8 @@ describe Vcloud::Core::QueryRunner do
68
68
  fields = {:field1 => 'Stuff 1'}
69
69
  allow(@mock_fog_interface).to receive(:get_execute_query).and_return(
70
70
  {
71
- :WibbleRecord => [fields]
72
- }
71
+ :WibbleRecord => [fields]
72
+ }
73
73
  )
74
74
  result = @query_runner.run()
75
75
  expect(result.size).to eq(1)
@@ -80,8 +80,8 @@ describe Vcloud::Core::QueryRunner do
80
80
  fields = {:field1 => 'Stuff 1'}
81
81
  allow(@mock_fog_interface).to receive(:get_execute_query).and_return(
82
82
  {
83
- :WibbleReference => [fields]
84
- }
83
+ :WibbleReference => [fields]
84
+ }
85
85
  )
86
86
  result = @query_runner.run()
87
87
  expect(result.size).to eq(1)
@@ -92,8 +92,8 @@ describe Vcloud::Core::QueryRunner do
92
92
  fields = {:field1 => 'Stuff 1'}
93
93
  allow(@mock_fog_interface).to receive(:get_execute_query).and_return(
94
94
  {
95
- :WibbleRecord => fields
96
- }
95
+ :WibbleRecord => fields
96
+ }
97
97
  )
98
98
  result = @query_runner.run()
99
99
  expect(result.size).to eq(1)
@@ -105,8 +105,8 @@ describe Vcloud::Core::QueryRunner do
105
105
  more_fields = {:field1 => 'More Stuff 1'}
106
106
  allow(@mock_fog_interface).to receive(:get_execute_query).and_return(
107
107
  {
108
- :WibbleRecord => [fields, more_fields]
109
- }
108
+ :WibbleRecord => [fields, more_fields]
109
+ }
110
110
  )
111
111
  result = @query_runner.run()
112
112
  expect(result.size).to eq(2)
@@ -119,9 +119,9 @@ describe Vcloud::Core::QueryRunner do
119
119
  fields2 = {:field1 => 'Stuff 2'}
120
120
  allow(@mock_fog_interface).to receive(:get_execute_query).and_return(
121
121
  {
122
- :WibbleRecord => [fields1],
123
- :WobbleRecord => [fields2]
124
- }
122
+ :WibbleRecord => [fields1],
123
+ :WobbleRecord => [fields2]
124
+ }
125
125
  )
126
126
  result = @query_runner.run()
127
127
  expect(result.size).to eq(1)
@@ -131,9 +131,9 @@ describe Vcloud::Core::QueryRunner do
131
131
  it 'should raise error if lastPage is not an integer' do
132
132
  allow(@mock_fog_interface).to receive(:get_execute_query).and_return(
133
133
  {
134
- :lastPage => :qwerty,
135
- :WibbleRecord => []
136
- }
134
+ :lastPage => :qwerty,
135
+ :WibbleRecord => []
136
+ }
137
137
  )
138
138
 
139
139
  expect { @query_runner.run() }.to raise_error('Invalid lastPage (qwerty) in query results')
@@ -143,9 +143,9 @@ describe Vcloud::Core::QueryRunner do
143
143
  fields = {:field1 => 'Stuff 1'}
144
144
  allow(@mock_fog_interface).to receive(:get_execute_query).and_return(
145
145
  {
146
- :lastPage => 2,
147
- :WibbleRecord => [fields]
148
- }
146
+ :lastPage => 2,
147
+ :WibbleRecord => [fields]
148
+ }
149
149
  )
150
150
  result = @query_runner.run()
151
151
  expect(result.size).to eq(2)
@@ -52,7 +52,7 @@ describe Vcloud::Core::Query do
52
52
  [
53
53
  {:field1 => "Stuff 1", :field2 => "Stuff 2"},
54
54
  {:field1 => "More Stuff 1", :field2 => "More Stuff 2"}
55
- ]
55
+ ]
56
56
  }
57
57
  end
58
58
 
@@ -1,209 +1,205 @@
1
1
  require 'spec_helper'
2
2
 
3
- module Vcloud
4
- module Core
5
- describe Vapp do
6
- before(:each) do
7
- @vapp_id = 'vapp-12345678-1234-1234-1234-000000111111'
8
- @mock_fog_interface = StubFogInterface.new
9
- allow(Vcloud::Core::Fog::ServiceInterface).to receive(:new).and_return(@mock_fog_interface)
10
- end
3
+ describe Vcloud::Core::Vapp do
4
+ before(:each) do
5
+ @vapp_id = 'vapp-12345678-1234-1234-1234-000000111111'
6
+ @mock_fog_interface = StubFogInterface.new
7
+ allow(Vcloud::Core::Fog::ServiceInterface).to receive(:new).and_return(@mock_fog_interface)
8
+ end
11
9
 
12
- context "Class public interface" do
13
- it { expect(Vapp).to respond_to(:instantiate) }
14
- it { expect(Vapp).to respond_to(:get_by_name) }
15
- it { expect(Vapp).to respond_to(:get_metadata) }
16
- end
10
+ context "Class public interface" do
11
+ it { expect(Vcloud::Core::Vapp).to respond_to(:instantiate) }
12
+ it { expect(Vcloud::Core::Vapp).to respond_to(:get_by_name) }
13
+ it { expect(Vcloud::Core::Vapp).to respond_to(:get_metadata) }
14
+ end
17
15
 
18
- context "Instance public interface" do
19
- subject { Vapp.new(@vapp_id) }
20
- it { should respond_to(:id) }
21
- it { should respond_to(:vcloud_attributes) }
22
- it { should respond_to(:name) }
23
- it { should respond_to(:href) }
24
- it { should respond_to(:vdc_id) }
25
- it { should respond_to(:vms) }
26
- it { should respond_to(:networks) }
27
- it { should respond_to(:power_on) }
28
- end
16
+ context "Instance public interface" do
17
+ subject { Vcloud::Core::Vapp.new(@vapp_id) }
18
+ it { should respond_to(:id) }
19
+ it { should respond_to(:vcloud_attributes) }
20
+ it { should respond_to(:name) }
21
+ it { should respond_to(:href) }
22
+ it { should respond_to(:vdc_id) }
23
+ it { should respond_to(:vms) }
24
+ it { should respond_to(:networks) }
25
+ it { should respond_to(:power_on) }
26
+ end
27
+
28
+ context "#initialize" do
29
+
30
+ it "should be constructable from just an id reference" do
31
+ obj = Vcloud::Core::Vapp.new(@vapp_id)
32
+ expect(obj.class).to be(Vcloud::Core::Vapp)
33
+ end
29
34
 
30
- context "#initialize" do
35
+ it "should store the id specified" do
36
+ obj = Vcloud::Core::Vapp.new(@vapp_id)
37
+ expect(obj.id).to eq(@vapp_id)
38
+ end
39
+
40
+ it "should raise error if id is not in correct format" do
41
+ bogus_id = '12314124-ede5-4d07-bad5-000000111111'
42
+ expect{ Vcloud::Core::Vapp.new(bogus_id) }.to raise_error("vapp id : #{bogus_id} is not in correct format" )
43
+ end
44
+
45
+ end
31
46
 
32
- it "should be constructable from just an id reference" do
33
- obj = Vapp.new(@vapp_id)
34
- expect(obj.class).to be(Vcloud::Core::Vapp)
35
- end
47
+ context "#get_by_name" do
48
+
49
+ it "should return a Vcloud::Core::Vapp object if name exists" do
50
+ q_results = [
51
+ { :name => 'vapp-test-1', :href => @vapp_id }
52
+ ]
53
+ mock_query = double(:query)
54
+ expect(Vcloud::Core::QueryRunner).to receive(:new).and_return(mock_query)
55
+ expect(mock_query).to receive(:run).with('vApp', :filter => "name==vapp-test-1").and_return(q_results)
56
+ obj = Vcloud::Core::Vapp.get_by_name('vapp-test-1')
57
+ expect(obj.class).to be(Vcloud::Core::Vapp)
58
+ end
36
59
 
37
- it "should store the id specified" do
38
- obj = Vapp.new(@vapp_id)
39
- expect(obj.id).to eq(@vapp_id)
40
- end
60
+ it "should raise an error if no vApp with that name exists" do
61
+ q_results = [ ]
62
+ mock_query = double(:query_runner)
63
+ expect(Vcloud::Core::QueryRunner).to receive(:new).and_return(mock_query)
64
+ expect(mock_query).to receive(:run).with('vApp', :filter => "name==vapp-test-1").and_return(q_results)
65
+ expect{ Vcloud::Core::Vapp.get_by_name('vapp-test-1') }.to raise_exception(RuntimeError)
66
+ end
41
67
 
42
- it "should raise error if id is not in correct format" do
43
- bogus_id = '12314124-ede5-4d07-bad5-000000111111'
44
- expect{ Vapp.new(bogus_id) }.to raise_error("vapp id : #{bogus_id} is not in correct format" )
45
- end
68
+ it "should raise an error if multiple vApps with that name exists (NB: prescribes unique vApp names!)" do
69
+ q_results = [
70
+ { :name => 'vapp-test-1', :href => @vapp_id },
71
+ { :name => 'vapp-test-1', :href => '/bogus' },
72
+ ]
73
+ mock_query = double(:query)
74
+ expect(Vcloud::Core::QueryRunner).to receive(:new).and_return(mock_query)
75
+ expect(mock_query).to receive(:run).with('vApp', :filter => "name==vapp-test-1").and_return(q_results)
76
+ expect{ Vcloud::Core::Vapp.get_by_name('vapp-test-1') }.to raise_exception(RuntimeError)
77
+ end
78
+
79
+ end
46
80
 
81
+ context "attributes" do
82
+ before(:each) {
83
+ @stub_attrs = {
84
+ :name => 'Webserver vapp-1',
85
+ :href => "https://api.vcd.portal.skyscapecloud.com/api/vApp/#{@vapp_id}",
86
+ :Link => [{
87
+ :rel => 'up',
88
+ :type => 'application/vnd.vmware.vcloud.vdc+xml',
89
+ :href => 'https://api.vcloud-director.example.com/api/vdc/074aea1e-a5e9-4dd1-a028-40db8c98d237'
90
+ }],
91
+ :Children => {:Vm => [{:href => '/vm-123aea1e-a5e9-4dd1-a028-40db8c98d237'}]}
92
+ }
93
+ allow_any_instance_of(StubFogInterface).to receive(:get_vapp).and_return(@stub_attrs)
94
+ @vapp = Vcloud::Core::Vapp.new(@vapp_id)
95
+ }
96
+ it { expect(@vapp.name).to eq('Webserver vapp-1') }
97
+
98
+ context "id" do
99
+ it "should extract id correctly" do
100
+ expect(@vapp.id).to eq(@vapp_id)
47
101
  end
102
+ end
48
103
 
49
- context "#get_by_name" do
50
-
51
- it "should return a Vapp object if name exists" do
52
- q_results = [
53
- { :name => 'vapp-test-1', :href => @vapp_id }
54
- ]
55
- mock_query = double(:query)
56
- expect(Vcloud::Core::QueryRunner).to receive(:new).and_return(mock_query)
57
- expect(mock_query).to receive(:run).with('vApp', :filter => "name==vapp-test-1").and_return(q_results)
58
- obj = Vapp.get_by_name('vapp-test-1')
59
- expect(obj.class).to be(Vcloud::Core::Vapp)
60
- end
61
-
62
- it "should raise an error if no vApp with that name exists" do
63
- q_results = [ ]
64
- mock_query = double(:query_runner)
65
- expect(Vcloud::Core::QueryRunner).to receive(:new).and_return(mock_query)
66
- expect(mock_query).to receive(:run).with('vApp', :filter => "name==vapp-test-1").and_return(q_results)
67
- expect{ Vapp.get_by_name('vapp-test-1') }.to raise_exception(RuntimeError)
68
- end
69
-
70
- it "should raise an error if multiple vApps with that name exists (NB: prescribes unique vApp names!)" do
71
- q_results = [
72
- { :name => 'vapp-test-1', :href => @vapp_id },
73
- { :name => 'vapp-test-1', :href => '/bogus' },
74
- ]
75
- mock_query = double(:query)
76
- expect(Vcloud::Core::QueryRunner).to receive(:new).and_return(mock_query)
77
- expect(mock_query).to receive(:run).with('vApp', :filter => "name==vapp-test-1").and_return(q_results)
78
- expect{ Vapp.get_by_name('vapp-test-1') }.to raise_exception(RuntimeError)
79
- end
104
+ context "vapp should have parent vdc" do
105
+ it "should load parent vdc id from fog attributes" do
106
+ expect(@vapp.vdc_id).to eq('074aea1e-a5e9-4dd1-a028-40db8c98d237')
107
+ end
80
108
 
109
+ it "should raise error if vapp without parent vdc found" do
110
+ @stub_attrs[:Link] = []
111
+ expect { @vapp.vdc_id }.to raise_error('a vapp without parent vdc found')
81
112
  end
113
+ end
114
+
115
+ it "should return vms" do
116
+ expect(@vapp.vms.count).to eq(1)
117
+ expect(@vapp.vms.first[:href]).to eq('/vm-123aea1e-a5e9-4dd1-a028-40db8c98d237')
118
+ end
119
+ end
82
120
 
83
- context "attributes" do
84
- before(:each) {
85
- @stub_attrs = {
86
- :name => 'Webserver vapp-1',
87
- :href => "https://api.vcd.portal.skyscapecloud.com/api/vApp/#{@vapp_id}",
88
- :Link => [{
89
- :rel => 'up',
90
- :type => 'application/vnd.vmware.vcloud.vdc+xml',
91
- :href => 'https://api.vcloud-director.example.com/api/vdc/074aea1e-a5e9-4dd1-a028-40db8c98d237'
92
- }],
93
- :Children => {:Vm => [{:href => '/vm-123aea1e-a5e9-4dd1-a028-40db8c98d237'}]}
94
- }
95
- allow_any_instance_of(StubFogInterface).to receive(:get_vapp).and_return(@stub_attrs)
96
- @vapp = Vapp.new(@vapp_id)
121
+ context "power on" do
122
+ context "successful power on" do
123
+ before(:each) do
124
+ @fog_vapp_body = {
125
+ :name => "Webserver vapp-1",
126
+ :href => "https://api.vcloud-director.example.com/api/vApp/vapp-63d3be58-2d5c-477d-8410-267e7c3c4a02",
127
+ :Link => [{
128
+ :rel => "up",
129
+ :type => "application/vnd.vmware.vcloud.vdc+xml",
130
+ :href => "https://api.vcloud-director.example.com/api/vdc/074aea1e-a5e9-4dd1-a028-40db8c98d237"
131
+ }]
97
132
  }
98
- it { expect(@vapp.name).to eq('Webserver vapp-1') }
99
-
100
- context "id" do
101
- it "should extract id correctly" do
102
- expect(@vapp.id).to eq(@vapp_id)
103
- end
104
- end
105
-
106
- context "vapp should have parent vdc" do
107
- it "should load parent vdc id from fog attributes" do
108
- expect(@vapp.vdc_id).to eq('074aea1e-a5e9-4dd1-a028-40db8c98d237')
109
- end
110
-
111
- it "should raise error if vapp without parent vdc found" do
112
- @stub_attrs[:Link] = []
113
- expect { @vapp.vdc_id }.to raise_error('a vapp without parent vdc found')
114
- end
115
- end
116
-
117
- it "should return vms" do
118
- expect(@vapp.vms.count).to eq(1)
119
- expect(@vapp.vms.first[:href]).to eq('/vm-123aea1e-a5e9-4dd1-a028-40db8c98d237')
120
- end
121
133
  end
122
134
 
123
- context "power on" do
124
- context "successful power on" do
125
- before(:each) do
126
- @fog_vapp_body = {
127
- :name => "Webserver vapp-1",
128
- :href => "https://api.vcloud-director.example.com/api/vApp/vapp-63d3be58-2d5c-477d-8410-267e7c3c4a02",
129
- :Link => [{
130
- :rel => "up",
131
- :type => "application/vnd.vmware.vcloud.vdc+xml",
132
- :href => "https://api.vcloud-director.example.com/api/vdc/074aea1e-a5e9-4dd1-a028-40db8c98d237"
133
- }]
134
- }
135
- end
136
-
137
- it "should power on a vapp that is not powered on" do
138
- vapp = Vapp.new(@vapp_id)
139
- expect(@mock_fog_interface).to receive(:get_vapp).twice().and_return(
140
- {:status => Vcloud::Core::Vapp::STATUS::POWERED_OFF},
141
- {:status => Vcloud::Core::Vapp::STATUS::RUNNING}
142
- )
143
- expect(@mock_fog_interface).to receive(:power_on_vapp).with(vapp.id)
144
- state = vapp.power_on
145
- expect(state).to be_true
146
- end
147
-
148
- it "should not power on a vapp that is already powered on, but should return true" do
149
- vapp = Vapp.new(@vapp_id)
150
- expect(@mock_fog_interface).to receive(:get_vapp).and_return(
151
- {:status => Vcloud::Core::Vapp::STATUS::RUNNING}
152
- )
153
- expect(@mock_fog_interface).not_to receive(:power_on_vapp)
154
- state = vapp.power_on
155
- expect(state).to be_true
156
- end
157
- end
135
+ it "should power on a vapp that is not powered on" do
136
+ vapp = Vcloud::Core::Vapp.new(@vapp_id)
137
+ expect(@mock_fog_interface).to receive(:get_vapp).twice().and_return(
138
+ {:status => Vcloud::Core::Vapp::STATUS::POWERED_OFF},
139
+ {:status => Vcloud::Core::Vapp::STATUS::RUNNING}
140
+ )
141
+ expect(@mock_fog_interface).to receive(:power_on_vapp).with(vapp.id)
142
+ state = vapp.power_on
143
+ expect(state).to be_true
144
+ end
158
145
 
146
+ it "should not power on a vapp that is already powered on, but should return true" do
147
+ vapp = Vcloud::Core::Vapp.new(@vapp_id)
148
+ expect(@mock_fog_interface).to receive(:get_vapp).and_return(
149
+ {:status => Vcloud::Core::Vapp::STATUS::RUNNING}
150
+ )
151
+ expect(@mock_fog_interface).not_to receive(:power_on_vapp)
152
+ state = vapp.power_on
153
+ expect(state).to be_true
159
154
  end
155
+ end
160
156
 
161
- context "#get_by_name_and_vdc_name" do
157
+ end
162
158
 
163
- it "should return nil if fog returns nil" do
164
- allow_any_instance_of(StubFogInterface).to receive(:get_vapp_by_name_and_vdc_name)
165
- .with('vapp_name', 'vdc_name').and_return(nil)
166
- expect(Vapp.get_by_name_and_vdc_name('vapp_name', 'vdc_name')).to be_nil
167
- end
159
+ context "#get_by_name_and_vdc_name" do
168
160
 
169
- it "should return vapp instance if found" do
170
- vcloud_attr_vapp = { :href => "/#{@vapp_id}" }
171
- allow_any_instance_of(StubFogInterface).to receive(:get_vapp_by_name_and_vdc_name)
172
- .with('vapp_name', 'vdc_name').and_return(vcloud_attr_vapp)
173
- expect(Vapp.get_by_name_and_vdc_name('vapp_name', 'vdc_name').class).to eq(Core::Vapp)
174
- end
161
+ it "should return nil if fog returns nil" do
162
+ allow_any_instance_of(StubFogInterface).to receive(:get_vapp_by_name_and_vdc_name)
163
+ .with('vapp_name', 'vdc_name').and_return(nil)
164
+ expect(Vcloud::Core::Vapp.get_by_name_and_vdc_name('vapp_name', 'vdc_name')).to be_nil
165
+ end
175
166
 
176
- end
167
+ it "should return vapp instance if found" do
168
+ vcloud_attr_vapp = { :href => "/#{@vapp_id}" }
169
+ allow_any_instance_of(StubFogInterface).to receive(:get_vapp_by_name_and_vdc_name)
170
+ .with('vapp_name', 'vdc_name').and_return(vcloud_attr_vapp)
171
+ expect(Vcloud::Core::Vapp.get_by_name_and_vdc_name('vapp_name', 'vdc_name').class).to eq(Vcloud::Core::Vapp)
172
+ end
177
173
 
178
- context "#get_by_child_vm_id" do
179
-
180
- it "should raise an ArgumentError if an invalid VM id is supplied" do
181
- vm_id = 'vapp-12341234-1234-1234-1234-123412341234'
182
- expect {Vapp.get_by_child_vm_id(vm_id)}.to raise_error(ArgumentError)
183
- end
184
-
185
- it "should return a vApp object if we supply an existing VM id" do
186
- vm_id = "vm-12341234-1234-1234-1234-123412340001"
187
- vapp_id = "vapp-12341234-1234-1234-1234-123412349999"
188
- expect(@mock_fog_interface).to receive(:get_vapp).with(vm_id).and_return({
189
- :Link => [
190
- { :rel => 'down',
191
- :type => "application/vnd.vmware.vcloud.metadata+xml",
192
- :href => "/api/vApp/#{vm_id}/metadata"
193
- },
194
- { :rel => 'up',
195
- :type => "application/vnd.vmware.vcloud.vApp+xml",
196
- :href => "/api/vApp/#{vapp_id}"
197
- }
198
- ]
199
- })
200
- obj = Vapp.get_by_child_vm_id(vm_id)
201
- expect(obj.id).to eq(vapp_id)
202
- end
174
+ end
203
175
 
204
- end
176
+ context "#get_by_child_vm_id" do
205
177
 
178
+ it "should raise an ArgumentError if an invalid VM id is supplied" do
179
+ vm_id = 'vapp-12341234-1234-1234-1234-123412341234'
180
+ expect {Vcloud::Core::Vapp.get_by_child_vm_id(vm_id)}.to raise_error(ArgumentError)
206
181
  end
182
+
183
+ it "should return a vApp object if we supply an existing VM id" do
184
+ vm_id = "vm-12341234-1234-1234-1234-123412340001"
185
+ vapp_id = "vapp-12341234-1234-1234-1234-123412349999"
186
+ expect(@mock_fog_interface).to receive(:get_vapp).with(vm_id).and_return({
187
+ :Link => [
188
+ { :rel => 'down',
189
+ :type => "application/vnd.vmware.vcloud.metadata+xml",
190
+ :href => "/api/vApp/#{vm_id}/metadata"
191
+ },
192
+ { :rel => 'up',
193
+ :type => "application/vnd.vmware.vcloud.vApp+xml",
194
+ :href => "/api/vApp/#{vapp_id}"
195
+ }
196
+ ]
197
+ })
198
+ obj = Vcloud::Core::Vapp.get_by_child_vm_id(vm_id)
199
+ expect(obj.id).to eq(vapp_id)
200
+ end
201
+
207
202
  end
203
+
208
204
  end
209
205