Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4FEB117FD8 for ; Tue, 11 Aug 2015 04:30:00 +0000 (UTC) Received: (qmail 59125 invoked by uid 500); 11 Aug 2015 04:30:00 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 59067 invoked by uid 500); 11 Aug 2015 04:29: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 59055 invoked by uid 99); 11 Aug 2015 04:29: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; Tue, 11 Aug 2015 04:29:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2F76DE113B; Tue, 11 Aug 2015 04:29:59 +0000 (UTC) From: anshul1886 To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request: Made the adding new keyboard language sup... Content-Type: text/plain Message-Id: <20150811042959.2F76DE113B@git1-us-west.apache.org> Date: Tue, 11 Aug 2015 04:29:59 +0000 (UTC) Github user anshul1886 commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/669#discussion_r36710950 --- Diff: plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java --- @@ -595,6 +597,25 @@ private PlugNicAnswer execute(PlugNicCommand cmd) { } } + private CopyFileInVmAnswer execute(CopyFileInVmCommand cmd) { + File keyFile = getSystemVMKeyFile(); + try { + File file = new File(cmd.getSrc()); + if(file.exists()) { + if(file.isDirectory()) { + for (File f : FileUtils.listFiles(new File(cmd.getSrc()), TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE)) { + SshHelper.scpTo(cmd.getVmIp(), 3922, "root", keyFile, null, cmd.getDest(), f.getCanonicalPath(), null); + } + } else { + SshHelper.scpTo(cmd.getVmIp(), 3922, "root", keyFile, null, cmd.getDest(), file.getCanonicalPath(), null); + } + } + } catch (Exception e) { + s_logger.error("Fail to copy file " + cmd.getSrc() + " in VM " + cmd.getVmIp(), e); + return new CopyFileInVmAnswer(cmd, e); + } + return new CopyFileInVmAnswer(cmd); --- End diff -- That line cannot through exception. --- 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. ---