Author: lahiru
Date: Wed Oct 9 17:13:07 2013
New Revision: 1530717
URL: http://svn.apache.org/r1530717
Log:
change mapping from schema changes.
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=1530717&r1=1530716&r2=1530717&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
Wed Oct 9 17:13:07 2013
@@ -133,23 +133,26 @@ public class DescriptorUtil {
for (int i = 0; i < gridFTPEndPointArray.length ; i++){
gridFTPEndPoint.add(gridFTPEndPointArray[i]);
}
- }else if (hostDescriptionType instanceof GsisshHostType){
+ }else if (hostDescriptionType instanceof GsisshHostType) {
hostType.add(HostTypes.GSISSH_HOST_TYPE);
- } else if (hostDescriptionType instanceof SSHHostType) {
+ GlobusHostType globusHostType = (GlobusHostType)
hostDescriptionType;
+ } else if (hostDescriptionType instanceof SSHHostType) {
hostType.add(HostTypes.SSH_HOST_TYPE);
- } else if (hostDescriptionType instanceof UnicoreHostType) {
- UnicoreHostType unicoreHostType = (UnicoreHostType)
hostDescriptionType;
- hostType.add(HostTypes.UNICORE_HOST_TYPE);
- String[] unicoreGateKeeperEndPointArray =
unicoreHostType.getUnicoreBESEndPointArray();
- for (int i = 0; i < unicoreGateKeeperEndPointArray.length ; i++){
- gateKeeperEndPoint.add(unicoreGateKeeperEndPointArray[i]);
- }
-
- String[] gridFTPEndPointArray =
unicoreHostType.getGridFTPEndPointArray();
- for (int i = 0; i < gridFTPEndPointArray.length ; i++){
- gridFTPEndPoint.add(gridFTPEndPointArray[i]);
- }
- } else if (hostDescriptionType instanceof Ec2HostType) {
+ SSHHostType sshHostType = (SSHHostType) hostDescriptionType;
+ hostDescriptor.setHpcDescriptor(sshHostType.getHpcResource());
+ } else if (hostDescriptionType instanceof UnicoreHostType) {
+ UnicoreHostType unicoreHostType = (UnicoreHostType)
hostDescriptionType;
+ hostType.add(HostTypes.UNICORE_HOST_TYPE);
+ String[] unicoreGateKeeperEndPointArray =
unicoreHostType.getUnicoreBESEndPointArray();
+ for (int i = 0; i < unicoreGateKeeperEndPointArray.length; i++) {
+ gateKeeperEndPoint.add(unicoreGateKeeperEndPointArray[i]);
+ }
+
+ String[] gridFTPEndPointArray =
unicoreHostType.getGridFTPEndPointArray();
+ for (int i = 0; i < gridFTPEndPointArray.length; i++) {
+ gridFTPEndPoint.add(gridFTPEndPointArray[i]);
+ }
+ } else if (hostDescriptionType instanceof Ec2HostType) {
hostType.add(HostTypes.EC2_HOST_TYPE);
} else {
hostType.add(HostTypes.HOST_DESCRIPTION_TYPE);
@@ -190,6 +193,7 @@ public class DescriptorUtil {
}else if
(hostDescriptor.getHostType().get(0).equals(HostTypes.SSH_HOST_TYPE)) {
hostDescription.getType().changeType(SSHHostType.type);
+
((SSHHostType)hostDescription.getType()).setHpcResource(hostDescriptor.isHpcDescriptor());
} else if
(hostDescriptor.getHostType().get(0).equals(HostTypes.UNICORE_HOST_TYPE)) {
hostDescription.getType().changeType(UnicoreHostType.type);
if (!hostDescriptor.getGateKeeperEndPoint().isEmpty() &&
hostDescriptor.getGateKeeperEndPoint() != null){