class ChefCLI::PolicyfileServices::RmPolicy

def run

def run
  unless policy_exists?
    ui.err("Policy '#{policy_name}' does not exist on the server")
    return false
  end
  undo_record.description = "delete-policy #{policy_name}"
  unless policy_has_no_revisions?
    gather_policy_data_for_undo
  end
  http_client.delete("/policies/#{policy_name}")
  undo_stack.push(undo_record)
  ui.err("Removed policy '#{policy_name}'.")
rescue => e
  raise DeletePolicyError.new("Failed to delete policy '#{policy_name}'", e)
end