airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
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 GMT
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));
             }



Mime
View raw message