Skip to content

Commit

Permalink
Merge pull request #500 from agrare/always_set_connection_state
Browse files Browse the repository at this point in the history
Always set vm_or_template.connection_state
  • Loading branch information
Ladas authored Nov 28, 2018
2 parents 50dedc5 + d68f2c8 commit 3e0f1c0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def parse_image(image, is_public)
:name => name,
:location => location,
:vendor => "amazon",
:connection_state => "connected",
:raw_power_state => "never",
:template => true,
:labels => labels,
Expand Down Expand Up @@ -243,6 +244,7 @@ def parse_instance(instance)
:ems_ref => uid,
:name => name,
:vendor => "amazon",
:connection_state => "connected",
:raw_power_state => status,
:boot_time => instance.launch_time,
:labels => labels,
Expand Down
8 changes: 0 additions & 8 deletions app/models/manageiq/providers/amazon/cloud_manager/vm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ def disconnect_inv
save
end

def disconnected
false
end

def disconnected?
false
end

#
# EC2 interactions
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def images(images)
:name => name,
:location => location,
:vendor => "amazon",
:connection_state => "connected",
:raw_power_state => "never",
:template => true,
:publicly_available => image['public'],
Expand Down Expand Up @@ -212,6 +213,7 @@ def instances
:uid_ems => uid,
:name => name,
:vendor => "amazon",
:connection_state => "connected",
:raw_power_state => status,
:boot_time => instance['launch_time'],
:availability_zone => persister.availability_zones.lazy_find(instance.fetch_path('placement', 'availability_zone')),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def assert_specific_template
:tools_status => nil,
:boot_time => nil,
:standby_action => nil,
:connection_state => nil,
:connection_state => "connected",
:cpu_affinity => nil,
:memory_reserve => nil,
:memory_reserve_expand => nil,
Expand Down Expand Up @@ -331,7 +331,7 @@ def assert_specific_template_2
:tools_status => nil,
:boot_time => nil,
:standby_action => nil,
:connection_state => nil,
:connection_state => "connected",
:cpu_affinity => nil,
:memory_reserve => nil,
:memory_reserve_expand => nil,
Expand Down Expand Up @@ -503,7 +503,7 @@ def assert_specific_vm_powered_on
:tools_status => nil,
:boot_time => Time.zone.parse("2017-09-07 14:42:55.000000000 +0000"),
:standby_action => nil,
:connection_state => nil,
:connection_state => "connected",
:cpu_affinity => nil,
:memory_reserve => nil,
:memory_reserve_expand => nil,
Expand Down Expand Up @@ -607,7 +607,7 @@ def assert_specific_vm_powered_off
:tools_status => nil,
:boot_time => Time.zone.parse("2018-09-03 12:10:36.000000000 +0000"),
:standby_action => nil,
:connection_state => nil,
:connection_state => "connected",
:cpu_affinity => nil,
:memory_reserve => nil,
:memory_reserve_expand => nil,
Expand Down Expand Up @@ -701,7 +701,7 @@ def assert_specific_vm_on_cloud_network
:tools_status => nil,
:boot_time => Time.zone.parse("2017-09-13 16:07:19.000000000 +0000"),
:standby_action => nil,
:connection_state => nil,
:connection_state => "connected",
:cpu_affinity => nil,
:memory_reserve => nil,
:memory_reserve_expand => nil,
Expand Down Expand Up @@ -866,7 +866,7 @@ def assert_specific_vm_on_cloud_network_public_ip
:tools_status => nil,
:boot_time => Time.zone.parse("2017-09-26 07:43:04.000000000 +0000"),
:standby_action => nil,
:connection_state => nil,
:connection_state => "connected",
:cpu_affinity => nil,
:memory_reserve => nil,
:memory_reserve_expand => nil,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def assert_specific_template
:tools_status => nil,
:boot_time => nil,
:standby_action => nil,
:connection_state => nil,
:connection_state => "connected",
:cpu_affinity => nil,
:memory_reserve => nil,
:memory_reserve_expand => nil,
Expand Down Expand Up @@ -186,7 +186,7 @@ def assert_specific_vm_powered_on
:tools_status => nil,
:boot_time => Time.zone.parse("2013-08-31T00:12:43.000"),
:standby_action => nil,
:connection_state => nil,
:connection_state => "connected",
:cpu_affinity => nil,
:memory_reserve => nil,
:memory_reserve_expand => nil,
Expand Down

0 comments on commit 3e0f1c0

Please sign in to comment.