Package com.cloud.agent.api.storage

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


                        }

                        String installPath = destroyedTemplateHostVO.getInstallPath();

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

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


            }
        }

        for (String uniqueName : templateInfos.keySet()) {
            TemplateInfo tInfo = templateInfos.get(uniqueName);
            DeleteTemplateCommand dtCommand = new DeleteTemplateCommand(ssHost.getStorageUrl(), tInfo.getInstallPath());
            try {
              _agentMgr.sendToSecStorage(ssHost, dtCommand, null);
            } catch (AgentUnavailableException e) {
                String err = "Failed to delete " + tInfo.getTemplateName() + " on secondary storage " + sserverId + " which isn't in the database";
                s_logger.error(err);
View Full Code Here

                        }

                        String installPath = destroyedTemplateHostVO.getInstallPath();

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

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

          _usageEventDao.persist(usageEvent);         
                    templateHostVO.setDestroyed(true);
          _tmpltHostDao.update(templateHostVO.getId(), templateHostVO);
                    String installPath = templateHostVO.getInstallPath();
                    if (installPath != null) {
                        Answer answer = _agentMgr.sendToSecStorage(secondaryStorageHost, new DeleteTemplateCommand(secondaryStorageHost.getStorageUrl(), installPath));

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

            }
        }

        for (String uniqueName : templateInfos.keySet()) {
            TemplateInfo tInfo = templateInfos.get(uniqueName);
            DeleteTemplateCommand dtCommand = new DeleteTemplateCommand(ssHost.getStorageUrl(), tInfo.getInstallPath());
            try {
              _agentMgr.sendToSecStorage(ssHost, dtCommand, null);
            } catch (AgentUnavailableException e) {
                String err = "Failed to delete " + tInfo.getTemplateName() + " on secondary storage " + sserverId + " which isn't in the database";
                s_logger.error(err);
View Full Code Here

            }
        }

        for (String uniqueName : templateInfos.keySet()) {
            TemplateInfo tInfo = templateInfos.get(uniqueName);
            DeleteTemplateCommand dtCommand = new DeleteTemplateCommand(ssHost.getStorageUrl(), tInfo.getInstallPath());
            try {
              _agentMgr.sendToSecStorage(ssHost, dtCommand, null);
            } catch (AgentUnavailableException e) {
                String err = "Failed to delete " + tInfo.getTemplateName() + " on secondary storage " + sserverId + " which isn't in the database";
                s_logger.error(err);
View Full Code Here

          UsageEventUtils.publishUsageEvent(eventType, account.getId(), sZoneId, templateId, null, null, null);
                    templateHostVO.setDestroyed(true);
          _tmpltHostDao.update(templateHostVO.getId(), templateHostVO);
                    String installPath = templateHostVO.getInstallPath();
                    if (installPath != null) {
                        Answer answer = _agentMgr.sendToSecStorage(secondaryStorageHost, new DeleteTemplateCommand(secondaryStorageHost.getStorageUrl(), installPath));

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

            }
        }

        for (String uniqueName : templateInfos.keySet()) {
            TemplateInfo tInfo = templateInfos.get(uniqueName);
            DeleteTemplateCommand dtCommand = new DeleteTemplateCommand(ssHost.getStorageUrl(), tInfo.getInstallPath());
            try {
              _agentMgr.sendToSecStorage(ssHost, dtCommand, null);
            } catch (AgentUnavailableException e) {
                String err = "Failed to delete " + tInfo.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.DeleteTemplateCommand

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.