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 0DAAE2004C8 for ; Mon, 9 May 2016 16:45:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0CB601609A8; Mon, 9 May 2016 14:45:06 +0000 (UTC) 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 5575716099C for ; Mon, 9 May 2016 16:45:05 +0200 (CEST) Received: (qmail 72016 invoked by uid 500); 9 May 2016 14:44:59 -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 72000 invoked by uid 99); 9 May 2016 14:44:59 -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; Mon, 09 May 2016 14:44:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 21207DFBAB; Mon, 9 May 2016 14:44:59 +0000 (UTC) From: syed To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request: Notify listeners when a host has been add... Content-Type: text/plain Message-Id: <20160509144459.21207DFBAB@git1-us-west.apache.org> Date: Mon, 9 May 2016 14:44:59 +0000 (UTC) archived-at: Mon, 09 May 2016 14:45:06 -0000 Github user syed commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/816#discussion_r62509977 --- Diff: plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/provider/SolidFireHostListener.java --- @@ -65,22 +94,182 @@ public boolean hostConnect(long hostId, long storagePoolId) { storagePoolHostDao.persist(storagePoolHost); } - // just want to send the ModifyStoragePoolCommand for KVM - if (host.getHypervisorType() != HypervisorType.KVM) { - return true; + if (host.getHypervisorType().equals(HypervisorType.XenServer)) { + handleXenServer(host.getClusterId(), host.getId(), storagePoolId); + } + else if (host.getHypervisorType().equals(HypervisorType.KVM)) { + handleKVM(hostId, storagePoolId); + } + + return true; + } + + @Override + public boolean hostDisconnected(long hostId, long storagePoolId) { + StoragePoolHostVO storagePoolHost = storagePoolHostDao.findByPoolHost(storagePoolId, hostId); + + if (storagePoolHost != null) { + storagePoolHostDao.deleteStoragePoolHostDetails(hostId, storagePoolId); + } + + return true; + } + + @Override + public boolean hostAboutToBeRemoved(long hostId) { + HostVO host = _hostDao.findById(hostId); + + handleVMware(host, false); --- End diff -- Can this be done in `hostRemoved` ? --- 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. ---