Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C092EBEB for ; Fri, 21 Dec 2012 20:27:10 +0000 (UTC) Received: (qmail 20628 invoked by uid 500); 21 Dec 2012 20:27:10 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 20592 invoked by uid 500); 21 Dec 2012 20:27:10 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 20585 invoked by uid 99); 21 Dec 2012 20:27:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Dec 2012 20:27:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Dec 2012 20:27:08 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id EFEC523889BF; Fri, 21 Dec 2012 20:26:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1425128 - /airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/DescriptorUtil.java Date: Fri, 21 Dec 2012 20:26:46 -0000 To: commits@airavata.apache.org From: chathuri@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121221202646.EFEC523889BF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chathuri Date: Fri Dec 21 20:26:46 2012 New Revision: 1425128 URL: http://svn.apache.org/viewvc?rev=1425128&view=rev Log: fixing host descriptor not desplaying properly in XBaya Modified: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/DescriptorUtil.java Modified: airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/DescriptorUtil.java URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/DescriptorUtil.java?rev=1425128&r1=1425127&r2=1425128&view=diff ============================================================================== --- airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/DescriptorUtil.java (original) +++ airavata/trunk/modules/rest/mappings/src/main/java/org/apache/airavata/rest/mappings/utils/DescriptorUtil.java Fri Dec 21 20:26:46 2012 @@ -161,17 +161,20 @@ public class DescriptorUtil { } public static HostDescription createHostDescription (HostDescriptor hostDescriptor){ - HostDescription hostDescription = new HostDescription(); + HostDescription hostDescription = new HostDescription(HostDescriptionType.type); hostDescription.getType().setHostAddress(hostDescriptor.getHostAddress()); hostDescription.getType().setHostName(hostDescriptor.getHostname()); if (hostDescriptor.getHostType() != null && !hostDescriptor.getHostType().isEmpty()) { - if (hostDescriptor.getHostType().equals(HostTypes.GLOBUS_HOST_TYPE)) { + if (hostDescriptor.getHostType().get(0).equals(HostTypes.GLOBUS_HOST_TYPE)) { + hostDescription.getType().changeType(GlobusHostType.type); ((GlobusHostType) hostDescription.getType()).addGlobusGateKeeperEndPoint(hostDescriptor.getGlobusGateKeeperEndPoint().get(0)); ((GlobusHostType) hostDescription.getType()).addGridFTPEndPoint(hostDescriptor.getGridFTPEndPoint().get(0)); - } else if (hostDescriptor.getHostType().equals(HostTypes.GSISSH_HOST_TYPE)) { + } else if (hostDescriptor.getHostType().get(0).equals(HostTypes.GSISSH_HOST_TYPE)) { + hostDescription.getType().changeType(GsisshHostType.type); ((GsisshHostType) hostDescription).addGridFTPEndPoint(hostDescriptor.getGridFTPEndPoint().get(0)); - } else if (hostDescriptor.getHostType().equals(HostTypes.EC2_HOST_TYPE)) { + } else if (hostDescriptor.getHostType().get(0).equals(HostTypes.EC2_HOST_TYPE)) { + hostDescription.getType().changeType(Ec2HostType.type); ((Ec2HostType) hostDescription).addImageID(hostDescriptor.getImageID().get(0)); ((Ec2HostType) hostDescription).addInstanceID(hostDescriptor.getInstanceID().get(0)); }