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 DC6BA200BD4 for ; Thu, 17 Nov 2016 04:02:57 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DADDB160B13; Thu, 17 Nov 2016 03:02:57 +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 56C38160B08 for ; Thu, 17 Nov 2016 04:02:57 +0100 (CET) Received: (qmail 76056 invoked by uid 500); 17 Nov 2016 03:02:55 -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 75475 invoked by uid 99); 17 Nov 2016 03:02:55 -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; Thu, 17 Nov 2016 03:02:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D9D72F1793; Thu, 17 Nov 2016 03:02:54 +0000 (UTC) From: jburwell To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request #1545: CLOUDSTACK-8715: Add channel to Instances for... Content-Type: text/plain Message-Id: <20161117030254.D9D72F1793@git1-us-west.apache.org> Date: Thu, 17 Nov 2016 03:02:54 +0000 (UTC) archived-at: Thu, 17 Nov 2016 03:02:58 -0000 Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1545#discussion_r88377937 --- Diff: plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java --- @@ -175,6 +180,26 @@ public boolean parseDomainXML(String domXML) { interfaces.add(def); } + NodeList ports = devices.getElementsByTagName("channel"); + for (int i = 0; i < ports.getLength(); i++) { + Element channel = (Element)ports.item(i); + + String type = channel.getAttribute("type"); + String path = getAttrValue("source", "path", channel); + String name = getAttrValue("target", "name", channel); + String state = getAttrValue("target", "state", channel); + + ChannelDef def = null; + if (!StringUtils.isNotBlank(state)) { --- End diff -- Minor nit: Performing a logical not operation on the result `StringUtils.isNotBlank` seems a bit awkward. Please consider refactoring to `if (StringUtlis.isBlank(state))`. --- 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. ---