Skip to content

Commit

Permalink
corrected typo in Service Hierarchies chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter McGowan committed Sep 18, 2017
1 parent 3512bbf commit bd37ff1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions service_hierarchies/chapter.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,9 @@ begin
else
case $evm.root['vmdb_object_type']
when 'service'
$evm.log(:info, "Adding Service #{$evm.root['service'].name} to #{new_service.name}")
$evm.root['service'].new_service = new_service
$evm.log(:info, "Adding Service #{$evm.root['service'].name}
to #{new_service.name}")
$evm.root['service'].parent_service = new_service
when 'vm'
vm = $evm.root['vm']
#
Expand All @@ -244,21 +245,20 @@ begin
old_service = vm.service
vm.remove_from_service
if old_service.v_total_vms.zero?
$evm.log(:info, "Old service #{old_service.name} is now empty, removing it from VMDB")
$evm.log(:info, "Old service #{old_service.name} is now empty,
removing it from VMDB")
old_service.remove_from_vmdb
end
end
$evm.log(:info, "Adding VM #{vm.name} to #{new_service.name}")
vm.add_to_service(new_service)
#
# Set the VM's owner and group to be the same as the new service
# Set the VM's ownership to be the same as the new group
#
unless new_service.evm_owner_id.nil?
vm.owner = $evm.vmdb(:user).find_by_id(new_service.evm_owner_id)
end
unless new_service.miq_group_id.nil?
vm.group = $evm.vmdb(:miq_group).find_by_id(new_service.miq_group_id)
end
vm.owner = $evm.vmdb(:user).find_by_id(new_service.evm_owner_id)
unless new_service.evm_owner_id.nil?
vm.group = $evm.vmdb(:miq_group).find_by_id(new_service.miq_group_id)
unless new_service.miq_group_id.nil?
end
end
exit MIQ_OK
Expand Down

0 comments on commit bd37ff1

Please sign in to comment.