Skip to content

Commit

Permalink
Fix unknown location for vCloud provider
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Jun 20, 2018
1 parent 1b08354 commit cbcea7e
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 @@ -141,6 +141,7 @@ def parse_vm(vm)
:ems_ref => uid,
:name => name,
:hostname => hostname,
:location => uid,
:vendor => "vmware",
:raw_power_state => status,
:snapshots => [parse_snapshot(vm)].compact,
Expand Down Expand Up @@ -193,6 +194,7 @@ def parse_image(image, is_public)
:uid_ems => uid,
:ems_ref => uid,
:name => name,
:location => uid,
:vendor => "vmware",
:raw_power_state => "never",
:publicly_available => is_public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def vms
:uid_ems => vm[:vm].id,
:name => vm[:vm].name,
:hostname => vm[:hostname],
:location => vm[:vm].id,
:vendor => 'vmware',
:raw_power_state => vm[:vm].status,
:orchestration_stack => persister.orchestration_stacks.lazy_find(vm[:vm].vapp_id),
Expand Down Expand Up @@ -98,6 +99,7 @@ def images
persister.miq_templates.find_or_build(image[:image].id).assign_attributes(
:uid_ems => image[:image].id,
:name => image[:image].name,
:location => image[:image].id,
:vendor => 'vmware',
:raw_power_state => 'never',
:publicly_available => image[:is_published]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def assert_specific_template
:vendor => 'vmware',
:power_state => 'never',
:publicly_available => false,
:location => 'unknown',
:location => 'vm-ac90bd58-3bc4-47a5-bc8c-f1c8f5c468b6',
:tools_status => nil,
:boot_time => nil,
:standby_action => nil,
Expand Down Expand Up @@ -205,7 +205,7 @@ def assert_specific_vm_powered_on
:uid_ems => 'vm-84faa107-c0b9-4a21-adc5-b17e0c5355a2',
:vendor => 'vmware',
:power_state => 'on',
:location => 'unknown',
:location => 'vm-84faa107-c0b9-4a21-adc5-b17e0c5355a2',
:tools_status => nil,
:boot_time => nil,
:standby_action => nil,
Expand Down Expand Up @@ -295,7 +295,7 @@ def assert_specific_vm_powered_off
:uid_ems => 'vm-aaf94123-cbf9-4de9-841c-41dd41ac310e',
:vendor => 'vmware',
:power_state => 'off',
:location => 'unknown',
:location => 'vm-aaf94123-cbf9-4de9-841c-41dd41ac310e',
:tools_status => nil,
:boot_time => nil,
:standby_action => nil,
Expand Down

0 comments on commit cbcea7e

Please sign in to comment.