docs: def power_off(self, si, logger, session, vcenter_data_model, vm_uuid, resource_fullname):
          """
          Power off of a vm
          :param vcenter_data_model: vcenter model
          :param si: Service Instance
          :param logger:
          :param session:
          :param vcenter_data_model: vcenter_data_model
          :param vm_uuid: the uuid of the vm
          :param resource_fullname: the full name of the deployed app resource
          :return:
          """
  
          logger.info('retrieving vm by uuid: {0}'.format(vm_uuid))
          vm = self.pv_service.find_by_uuid(si, vm_uuid)
  
          if vm.summary.runtime.powerState == 'poweredOff':
              logger.info('vm already powered off')
              task_result = 'Already powered off'
          else:
              # hard power off
              logger.info('{0} powering of vm'.format(vcenter_data_model.shutdown_method))
              if vcenter_data_model.shutdown_method.lower() != 'soft':
                  task = vm.PowerOff()
                  task_result = self.synchronous_task_waiter.wait_for_task(task=task,
                                                                           logger=logger,
                                                                           action_name='Power Off')
              else:
                  if vm.guest.toolsStatus == 'toolsNotInstalled':
                      logger.warning('VMWare Tools status on virtual machine \'{0}\' are not installed'.format(vm.name))
                      raise ValueError('Cannot power off the vm softly because VMWare Tools are not installed')
  
                  if vm.guest.toolsStatus == 'toolsNotRunning':
                      logger.warning('VMWare Tools status on virtual machine \'{0}\' are not running'.format(vm.name))
                      raise ValueError('Cannot power off the vm softly because VMWare Tools are not running')
  
                  vm.ShutdownGuest()
                  task_result = 'vm powered off'
          
          return task_result