Package com.cloud.agent.api.storage

Examples of com.cloud.agent.api.storage.DeleteVolumeCommand


                        }

                        String installPath = destroyedVolumeHostVO.getInstallPath();

                        if (installPath != null) {
                            Answer answer = _agentMgr.sendToSecStorage(secondaryStorageHost, new DeleteVolumeCommand(secondaryStorageHost.getStorageUrl(), destroyedVolumeHostVO.getInstallPath()));

                            if (answer == null || !answer.getResult()) {
                                s_logger.debug("Failed to delete " + destroyedVolumeHostVO + " due to " + ((answer == null) ? "answer is null" : answer.getDetails()));
                            } else {
                                _volumeHostDao.remove(destroyedVolumeHostVO.getId());
View Full Code Here


        //Find out if the volume is present on secondary storage
        VolumeHostVO volumeHost = _volumeHostDao.findByVolumeId(vol.getId());
        if(volumeHost != null){
          if (volumeHost.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOADED){
            HostVO ssHost = _hostDao.findById(volumeHost.getHostId());
            DeleteVolumeCommand dtCommand = new DeleteVolumeCommand(ssHost.getStorageUrl(), volumeHost.getInstallPath());           
            Answer answer = _agentMgr.sendToSecStorage(ssHost, dtCommand);
            if (answer == null || !answer.getResult()) {
              s_logger.debug("Failed to delete " + volumeHost + " due to " + ((answer == null) ? "answer is null" : answer.getDetails()));
              return;
            }
View Full Code Here

        }

        //Delete volumes which are not present on DB.
        for (Long uniqueName : volumeInfos.keySet()) {
            TemplateInfo vInfo = volumeInfos.get(uniqueName);
            DeleteVolumeCommand dtCommand = new DeleteVolumeCommand(ssHost.getStorageUrl(), vInfo.getInstallPath());
            try {
              _agentMgr.sendToSecStorage(ssHost, dtCommand, null);
            } catch (AgentUnavailableException e) {
                String err = "Failed to delete " + vInfo.getTemplateName() + " on secondary storage " + sserverId + " which isn't in the database";
                s_logger.error(err);
View Full Code Here

                        }

                        String installPath = destroyedVolumeHostVO.getInstallPath();

                        if (installPath != null) {
                            Answer answer = _agentMgr.sendToSecStorage(secondaryStorageHost, new DeleteVolumeCommand(secondaryStorageHost.getStorageUrl(), destroyedVolumeHostVO.getInstallPath()));

                            if (answer == null || !answer.getResult()) {
                                s_logger.debug("Failed to delete " + destroyedVolumeHostVO + " due to " + ((answer == null) ? "answer is null" : answer.getDetails()));
                            } else {
                                _volumeHostDao.remove(destroyedVolumeHostVO.getId());
View Full Code Here

        //Find out if the volume is present on secondary storage
        VolumeHostVO volumeHost = _volumeHostDao.findByVolumeId(vol.getId());
        if(volumeHost != null){
          if (volumeHost.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOADED){
            HostVO ssHost = _hostDao.findById(volumeHost.getHostId());
            DeleteVolumeCommand dtCommand = new DeleteVolumeCommand(ssHost.getStorageUrl(), volumeHost.getInstallPath());           
            Answer answer = _agentMgr.sendToSecStorage(ssHost, dtCommand);
            if (answer == null || !answer.getResult()) {
              s_logger.debug("Failed to delete " + volumeHost + " due to " + ((answer == null) ? "answer is null" : answer.getDetails()));
              return;
            }
View Full Code Here

        }

        //Delete volumes which are not present on DB.
        for (Long uniqueName : volumeInfos.keySet()) {
            TemplateInfo vInfo = volumeInfos.get(uniqueName);
            DeleteVolumeCommand dtCommand = new DeleteVolumeCommand(ssHost.getStorageUrl(), vInfo.getInstallPath());
            try {
              _agentMgr.sendToSecStorage(ssHost, dtCommand, null);
            } catch (AgentUnavailableException e) {
                String err = "Failed to delete " + vInfo.getTemplateName() + " on secondary storage " + sserverId + " which isn't in the database";
                s_logger.error(err);
View Full Code Here

        }

        //Delete volumes which are not present on DB.
        for (Long uniqueName : volumeInfos.keySet()) {
            TemplateInfo vInfo = volumeInfos.get(uniqueName);
            DeleteVolumeCommand dtCommand = new DeleteVolumeCommand(ssHost.getStorageUrl(), vInfo.getInstallPath());
            try {
              _agentMgr.sendToSecStorage(ssHost, dtCommand, null);
            } catch (AgentUnavailableException e) {
                String err = "Failed to delete " + vInfo.getTemplateName() + " on secondary storage " + sserverId + " which isn't in the database";
                s_logger.error(err);
View Full Code Here

        }

        //Delete volumes which are not present on DB.
        for (Long uniqueName : volumeInfos.keySet()) {
            TemplateInfo vInfo = volumeInfos.get(uniqueName);
            DeleteVolumeCommand dtCommand = new DeleteVolumeCommand(ssHost.getStorageUrl(), vInfo.getInstallPath());
            try {
              _agentMgr.sendToSecStorage(ssHost, dtCommand, null);
            } catch (AgentUnavailableException e) {
                String err = "Failed to delete " + vInfo.getTemplateName() + " on secondary storage " + sserverId + " which isn't in the database";
                s_logger.error(err);
View Full Code Here

TOP

Related Classes of com.cloud.agent.api.storage.DeleteVolumeCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.