Skip to content

Commit

Permalink
Always set vm_or_template.connection_state
Browse files Browse the repository at this point in the history
Instead of defaulting to nil always set vm_or_template.connection_state
  • Loading branch information
agrare committed Nov 16, 2018
1 parent 90b7efc commit eaa3efe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def parse_vm(vm)
:hostname => hostname,
:location => uid,
:vendor => "vmware",
:connection_state => "connected",
:raw_power_state => status,
:snapshots => [parse_snapshot(vm)].compact,
:cpu_hot_add_enabled => cpu_hot_add,
Expand Down Expand Up @@ -196,6 +197,7 @@ def parse_image(image, is_public)
:name => name,
:location => uid,
:vendor => "vmware",
:connection_state => "connected",
:raw_power_state => "never",
:publicly_available => is_public
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def vms
:hostname => vm[:hostname],
:location => vm[:vm].id,
:vendor => 'vmware',
:connection_state => "connected",
:raw_power_state => vm[:vm].status,
:orchestration_stack => persister.orchestration_stacks.lazy_find(vm[:vm].vapp_id),
:snapshots => [],
Expand Down Expand Up @@ -101,6 +102,7 @@ def images
:name => image[:image].name,
:location => image[:image].id,
:vendor => 'vmware',
:connection_state => "connected",
:raw_power_state => 'never',
:publicly_available => image[:is_published]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,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 @@ -209,7 +209,7 @@ def assert_specific_vm_powered_on
: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 @@ -299,7 +299,7 @@ def assert_specific_vm_powered_off
: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

0 comments on commit eaa3efe

Please sign in to comment.