Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 91136200ABF for ; Tue, 3 May 2016 09:30:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8F6871609F3; Tue, 3 May 2016 09:30:18 +0200 (CEST) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D7E2B1609F2 for ; Tue, 3 May 2016 09:30:17 +0200 (CEST) Received: (qmail 83355 invoked by uid 500); 3 May 2016 07:30:16 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 83343 invoked by uid 99); 3 May 2016 07:30:16 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2016 07:30:16 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 51272DFDCF; Tue, 3 May 2016 07:30:16 +0000 (UTC) From: rhtyd To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request: CLOUDSTACK-9299: Out-of-band Management f... Content-Type: text/plain Message-Id: <20160503073016.51272DFDCF@git1-us-west.apache.org> Date: Tue, 3 May 2016 07:30:16 +0000 (UTC) archived-at: Tue, 03 May 2016 07:30:18 -0000 Github user rhtyd commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1502#discussion_r61846300 --- Diff: server/src/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementBackgroundTask.java --- @@ -0,0 +1,45 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.cloudstack.outofbandmanagement; + +import com.cloud.host.Host; + +public class OutOfBandManagementBackgroundTask implements Runnable { + final private OutOfBandManagementService service; + final private Host host; + final private OutOfBandManagement.PowerOperation powerOperation; + + public OutOfBandManagementBackgroundTask(OutOfBandManagementService service, Host host, OutOfBandManagement.PowerOperation powerOperation) { + this.service = service; + this.host = host; + this.powerOperation = powerOperation; + } + + @Override + public String toString() { + return String.format("[OOBM Task] Power operation:%s on Host:%d(%s)", powerOperation, host.getId(), host.getName()); + } + + @Override + public void run() { + try { + service.executeOutOfBandManagementPowerOperation(host, powerOperation, null); + } catch (Exception ignored) { --- End diff -- fixed --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---