Skip to content

Commit

Permalink
Merge pull request #160 from juliancheal/bz-1509275-azure_power_options
Browse files Browse the repository at this point in the history
Pass resource group as a string to power operation methods
  • Loading branch information
Bronagh Sorota authored Nov 6, 2017
2 parents 09f5782 + 738caf1 commit dbb5d39
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module ManageIQ::Providers::Azure::CloudManager::Vm::Operations::Power
end

def raw_suspend
provider_service.stop(name, resource_group)
provider_service.stop(name, resource_group.name)
update_attributes!(:raw_power_state => "VM stopping")
end

Expand All @@ -20,22 +20,22 @@ def validate_pause
end

def raw_start
provider_service.start(name, resource_group)
provider_service.start(name, resource_group.name)
update_attributes!(:raw_power_state => "VM starting")
end

def raw_stop
provider_service.deallocate(name, resource_group)
provider_service.deallocate(name, resource_group.name)
update_attributes!(:raw_power_state => "VM deallocating")
end

def raw_restart
provider_service.restart(name, resource_group)
provider_service.restart(name, resource_group.name)
update_attributes!(:raw_power_state => "VM starting")
end

def reboot_guest
provider_service.restart(name, resource_group)
provider_service.restart(name, resource_group.name)
update_attributes!(:raw_power_state => "VM starting")
end
end

0 comments on commit dbb5d39

Please sign in to comment.