cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From syed <...@git.apache.org>
Subject [GitHub] cloudstack pull request: Notify listeners when a host has been add...
Date Mon, 09 May 2016 14:44:59 GMT
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.
---

Mime
View raw message