You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2016/08/05 20:47:47 UTC

[5/5] airavata git commit: Added allocation optional value to computer resource preferences

Added allocation optional value to computer resource preferences


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/c1df0551
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/c1df0551
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/c1df0551

Branch: refs/heads/hotfix-for-allocation
Commit: c1df0551dae25214cf9fc12637cfb39cf177215e
Parents: a3f8d88
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Aug 5 16:47:27 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Aug 5 16:47:27 2016 -0400

----------------------------------------------------------------------
 .../gateway_resource_profile_model_types.cpp    |  22 ++++
 .../gateway_resource_profile_model_types.h      |  12 +-
 .../Model/AppCatalog/GatewayProfile/Types.php   |  23 ++++
 .../model/appcatalog/gatewayprofile/ttypes.py   |  15 ++-
 .../ComputeResourcePreference.java              | 114 ++++++++++++++++++-
 .../gateway_resource_profile_model.thrift       |   3 +-
 6 files changed, 181 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/c1df0551/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gateway_resource_profile_model_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gateway_resource_profile_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gateway_resource_profile_model_types.cpp
index e0ffb6f..e77751a 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gateway_resource_profile_model_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gateway_resource_profile_model_types.cpp
@@ -83,6 +83,11 @@ void ComputeResourcePreference::__set_usageReportingGatewayId(const std::string&
 __isset.usageReportingGatewayId = true;
 }
 
+void ComputeResourcePreference::__set_allocations(const std::string& val) {
+  this->allocations = val;
+__isset.allocations = true;
+}
+
 uint32_t ComputeResourcePreference::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -190,6 +195,14 @@ uint32_t ComputeResourcePreference::read(::apache::thrift::protocol::TProtocol*
           xfer += iprot->skip(ftype);
         }
         break;
+      case 11:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->allocations);
+          this->__isset.allocations = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -259,6 +272,11 @@ uint32_t ComputeResourcePreference::write(::apache::thrift::protocol::TProtocol*
     xfer += oprot->writeString(this->usageReportingGatewayId);
     xfer += oprot->writeFieldEnd();
   }
+  if (this->__isset.allocations) {
+    xfer += oprot->writeFieldBegin("allocations", ::apache::thrift::protocol::T_STRING, 11);
+    xfer += oprot->writeString(this->allocations);
+    xfer += oprot->writeFieldEnd();
+  }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -276,6 +294,7 @@ void swap(ComputeResourcePreference &a, ComputeResourcePreference &b) {
   swap(a.allocationProjectNumber, b.allocationProjectNumber);
   swap(a.resourceSpecificCredentialStoreToken, b.resourceSpecificCredentialStoreToken);
   swap(a.usageReportingGatewayId, b.usageReportingGatewayId);
+  swap(a.allocations, b.allocations);
   swap(a.__isset, b.__isset);
 }
 
@@ -290,6 +309,7 @@ ComputeResourcePreference::ComputeResourcePreference(const ComputeResourcePrefer
   allocationProjectNumber = other2.allocationProjectNumber;
   resourceSpecificCredentialStoreToken = other2.resourceSpecificCredentialStoreToken;
   usageReportingGatewayId = other2.usageReportingGatewayId;
+  allocations = other2.allocations;
   __isset = other2.__isset;
 }
 ComputeResourcePreference& ComputeResourcePreference::operator=(const ComputeResourcePreference& other3) {
@@ -303,6 +323,7 @@ ComputeResourcePreference& ComputeResourcePreference::operator=(const ComputeRes
   allocationProjectNumber = other3.allocationProjectNumber;
   resourceSpecificCredentialStoreToken = other3.resourceSpecificCredentialStoreToken;
   usageReportingGatewayId = other3.usageReportingGatewayId;
+  allocations = other3.allocations;
   __isset = other3.__isset;
   return *this;
 }
@@ -319,6 +340,7 @@ void ComputeResourcePreference::printTo(std::ostream& out) const {
   out << ", " << "allocationProjectNumber="; (__isset.allocationProjectNumber ? (out << to_string(allocationProjectNumber)) : (out << "<null>"));
   out << ", " << "resourceSpecificCredentialStoreToken="; (__isset.resourceSpecificCredentialStoreToken ? (out << to_string(resourceSpecificCredentialStoreToken)) : (out << "<null>"));
   out << ", " << "usageReportingGatewayId="; (__isset.usageReportingGatewayId ? (out << to_string(usageReportingGatewayId)) : (out << "<null>"));
+  out << ", " << "allocations="; (__isset.allocations ? (out << to_string(allocations)) : (out << "<null>"));
   out << ")";
 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/c1df0551/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gateway_resource_profile_model_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gateway_resource_profile_model_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gateway_resource_profile_model_types.h
index bdd7f70..b62ada0 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gateway_resource_profile_model_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/gateway_resource_profile_model_types.h
@@ -45,7 +45,7 @@ class StoragePreference;
 class GatewayResourceProfile;
 
 typedef struct _ComputeResourcePreference__isset {
-  _ComputeResourcePreference__isset() : loginUserName(false), preferredJobSubmissionProtocol(false), preferredDataMovementProtocol(false), preferredBatchQueue(false), scratchLocation(false), allocationProjectNumber(false), resourceSpecificCredentialStoreToken(false), usageReportingGatewayId(false) {}
+  _ComputeResourcePreference__isset() : loginUserName(false), preferredJobSubmissionProtocol(false), preferredDataMovementProtocol(false), preferredBatchQueue(false), scratchLocation(false), allocationProjectNumber(false), resourceSpecificCredentialStoreToken(false), usageReportingGatewayId(false), allocations(false) {}
   bool loginUserName :1;
   bool preferredJobSubmissionProtocol :1;
   bool preferredDataMovementProtocol :1;
@@ -54,6 +54,7 @@ typedef struct _ComputeResourcePreference__isset {
   bool allocationProjectNumber :1;
   bool resourceSpecificCredentialStoreToken :1;
   bool usageReportingGatewayId :1;
+  bool allocations :1;
 } _ComputeResourcePreference__isset;
 
 class ComputeResourcePreference {
@@ -61,7 +62,7 @@ class ComputeResourcePreference {
 
   ComputeResourcePreference(const ComputeResourcePreference&);
   ComputeResourcePreference& operator=(const ComputeResourcePreference&);
-  ComputeResourcePreference() : computeResourceId(), overridebyAiravata(true), loginUserName(), preferredJobSubmissionProtocol(( ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type)0), preferredDataMovementProtocol(( ::apache::airavata::model::data::movement::DataMovementProtocol::type)0), preferredBatchQueue(), scratchLocation(), allocationProjectNumber(), resourceSpecificCredentialStoreToken(), usageReportingGatewayId() {
+  ComputeResourcePreference() : computeResourceId(), overridebyAiravata(true), loginUserName(), preferredJobSubmissionProtocol(( ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type)0), preferredDataMovementProtocol(( ::apache::airavata::model::data::movement::DataMovementProtocol::type)0), preferredBatchQueue(), scratchLocation(), allocationProjectNumber(), resourceSpecificCredentialStoreToken(), usageReportingGatewayId(), allocations() {
   }
 
   virtual ~ComputeResourcePreference() throw();
@@ -75,6 +76,7 @@ class ComputeResourcePreference {
   std::string allocationProjectNumber;
   std::string resourceSpecificCredentialStoreToken;
   std::string usageReportingGatewayId;
+  std::string allocations;
 
   _ComputeResourcePreference__isset __isset;
 
@@ -98,6 +100,8 @@ class ComputeResourcePreference {
 
   void __set_usageReportingGatewayId(const std::string& val);
 
+  void __set_allocations(const std::string& val);
+
   bool operator == (const ComputeResourcePreference & rhs) const
   {
     if (!(computeResourceId == rhs.computeResourceId))
@@ -136,6 +140,10 @@ class ComputeResourcePreference {
       return false;
     else if (__isset.usageReportingGatewayId && !(usageReportingGatewayId == rhs.usageReportingGatewayId))
       return false;
+    if (__isset.allocations != rhs.__isset.allocations)
+      return false;
+    else if (__isset.allocations && !(allocations == rhs.allocations))
+      return false;
     return true;
   }
   bool operator != (const ComputeResourcePreference &rhs) const {

http://git-wip-us.apache.org/repos/asf/airavata/blob/c1df0551/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
index 8a56327..85a4f27 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
@@ -94,6 +94,10 @@ class ComputeResourcePreference {
    * @var string
    */
   public $usageReportingGatewayId = null;
+  /**
+   * @var string
+   */
+  public $allocations = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -138,6 +142,10 @@ class ComputeResourcePreference {
           'var' => 'usageReportingGatewayId',
           'type' => TType::STRING,
           ),
+        11 => array(
+          'var' => 'allocations',
+          'type' => TType::STRING,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -171,6 +179,9 @@ class ComputeResourcePreference {
       if (isset($vals['usageReportingGatewayId'])) {
         $this->usageReportingGatewayId = $vals['usageReportingGatewayId'];
       }
+      if (isset($vals['allocations'])) {
+        $this->allocations = $vals['allocations'];
+      }
     }
   }
 
@@ -263,6 +274,13 @@ class ComputeResourcePreference {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 11:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->allocations);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -326,6 +344,11 @@ class ComputeResourcePreference {
       $xfer += $output->writeString($this->usageReportingGatewayId);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->allocations !== null) {
+      $xfer += $output->writeFieldBegin('allocations', TType::STRING, 11);
+      $xfer += $output->writeString($this->allocations);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata/blob/c1df0551/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/gatewayprofile/ttypes.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/gatewayprofile/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/gatewayprofile/ttypes.py
index 1f80cd8..e02cf2a 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/gatewayprofile/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/gatewayprofile/ttypes.py
@@ -66,6 +66,7 @@ class ComputeResourcePreference:
    - allocationProjectNumber
    - resourceSpecificCredentialStoreToken
    - usageReportingGatewayId
+   - allocations
   """
 
   thrift_spec = (
@@ -80,9 +81,10 @@ class ComputeResourcePreference:
     (8, TType.STRING, 'allocationProjectNumber', None, None, ), # 8
     (9, TType.STRING, 'resourceSpecificCredentialStoreToken', None, None, ), # 9
     (10, TType.STRING, 'usageReportingGatewayId', None, None, ), # 10
+    (11, TType.STRING, 'allocations', None, None, ), # 11
   )
 
-  def __init__(self, computeResourceId=None, overridebyAiravata=thrift_spec[2][4], loginUserName=None, preferredJobSubmissionProtocol=None, preferredDataMovementProtocol=None, preferredBatchQueue=None, scratchLocation=None, allocationProjectNumber=None, resourceSpecificCredentialStoreToken=None, usageReportingGatewayId=None,):
+  def __init__(self, computeResourceId=None, overridebyAiravata=thrift_spec[2][4], loginUserName=None, preferredJobSubmissionProtocol=None, preferredDataMovementProtocol=None, preferredBatchQueue=None, scratchLocation=None, allocationProjectNumber=None, resourceSpecificCredentialStoreToken=None, usageReportingGatewayId=None, allocations=None,):
     self.computeResourceId = computeResourceId
     self.overridebyAiravata = overridebyAiravata
     self.loginUserName = loginUserName
@@ -93,6 +95,7 @@ class ComputeResourcePreference:
     self.allocationProjectNumber = allocationProjectNumber
     self.resourceSpecificCredentialStoreToken = resourceSpecificCredentialStoreToken
     self.usageReportingGatewayId = usageReportingGatewayId
+    self.allocations = allocations
 
   def read(self, iprot):
     if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -153,6 +156,11 @@ class ComputeResourcePreference:
           self.usageReportingGatewayId = iprot.readString()
         else:
           iprot.skip(ftype)
+      elif fid == 11:
+        if ftype == TType.STRING:
+          self.allocations = iprot.readString()
+        else:
+          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -203,6 +211,10 @@ class ComputeResourcePreference:
       oprot.writeFieldBegin('usageReportingGatewayId', TType.STRING, 10)
       oprot.writeString(self.usageReportingGatewayId)
       oprot.writeFieldEnd()
+    if self.allocations is not None:
+      oprot.writeFieldBegin('allocations', TType.STRING, 11)
+      oprot.writeString(self.allocations)
+      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 
@@ -226,6 +238,7 @@ class ComputeResourcePreference:
     value = (value * 31) ^ hash(self.allocationProjectNumber)
     value = (value * 31) ^ hash(self.resourceSpecificCredentialStoreToken)
     value = (value * 31) ^ hash(self.usageReportingGatewayId)
+    value = (value * 31) ^ hash(self.allocations)
     return value
 
   def __repr__(self):

http://git-wip-us.apache.org/repos/asf/airavata/blob/c1df0551/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
index 0f72644..d92c159 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
@@ -99,6 +99,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
   private static final org.apache.thrift.protocol.TField ALLOCATION_PROJECT_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("allocationProjectNumber", org.apache.thrift.protocol.TType.STRING, (short)8);
   private static final org.apache.thrift.protocol.TField RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceSpecificCredentialStoreToken", org.apache.thrift.protocol.TType.STRING, (short)9);
   private static final org.apache.thrift.protocol.TField USAGE_REPORTING_GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("usageReportingGatewayId", org.apache.thrift.protocol.TType.STRING, (short)10);
+  private static final org.apache.thrift.protocol.TField ALLOCATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("allocations", org.apache.thrift.protocol.TType.STRING, (short)11);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -116,6 +117,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
   private String allocationProjectNumber; // optional
   private String resourceSpecificCredentialStoreToken; // optional
   private String usageReportingGatewayId; // optional
+  private String allocations; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -136,7 +138,8 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     SCRATCH_LOCATION((short)7, "scratchLocation"),
     ALLOCATION_PROJECT_NUMBER((short)8, "allocationProjectNumber"),
     RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN((short)9, "resourceSpecificCredentialStoreToken"),
-    USAGE_REPORTING_GATEWAY_ID((short)10, "usageReportingGatewayId");
+    USAGE_REPORTING_GATEWAY_ID((short)10, "usageReportingGatewayId"),
+    ALLOCATIONS((short)11, "allocations");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -171,6 +174,8 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
           return RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN;
         case 10: // USAGE_REPORTING_GATEWAY_ID
           return USAGE_REPORTING_GATEWAY_ID;
+        case 11: // ALLOCATIONS
+          return ALLOCATIONS;
         default:
           return null;
       }
@@ -213,7 +218,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
   // isset id assignments
   private static final int __OVERRIDEBYAIRAVATA_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.PREFERRED_JOB_SUBMISSION_PROTOCOL,_Fields.PREFERRED_DATA_MOVEMENT_PROTOCOL,_Fields.PREFERRED_BATCH_QUEUE,_Fields.SCRATCH_LOCATION,_Fields.ALLOCATION_PROJECT_NUMBER,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN,_Fields.USAGE_REPORTING_GATEWAY_ID};
+  private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.PREFERRED_JOB_SUBMISSION_PROTOCOL,_Fields.PREFERRED_DATA_MOVEMENT_PROTOCOL,_Fields.PREFERRED_BATCH_QUEUE,_Fields.SCRATCH_LOCATION,_Fields.ALLOCATION_PROJECT_NUMBER,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN,_Fields.USAGE_REPORTING_GATEWAY_ID,_Fields.ALLOCATIONS};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -237,6 +242,8 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.USAGE_REPORTING_GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("usageReportingGatewayId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.ALLOCATIONS, new org.apache.thrift.meta_data.FieldMetaData("allocations", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputeResourcePreference.class, metaDataMap);
   }
@@ -289,6 +296,9 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     if (other.isSetUsageReportingGatewayId()) {
       this.usageReportingGatewayId = other.usageReportingGatewayId;
     }
+    if (other.isSetAllocations()) {
+      this.allocations = other.allocations;
+    }
   }
 
   public ComputeResourcePreference deepCopy() {
@@ -308,6 +318,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     this.allocationProjectNumber = null;
     this.resourceSpecificCredentialStoreToken = null;
     this.usageReportingGatewayId = null;
+    this.allocations = null;
   }
 
   public String getComputeResourceId() {
@@ -555,6 +566,29 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     }
   }
 
+  public String getAllocations() {
+    return this.allocations;
+  }
+
+  public void setAllocations(String allocations) {
+    this.allocations = allocations;
+  }
+
+  public void unsetAllocations() {
+    this.allocations = null;
+  }
+
+  /** Returns true if field allocations is set (has been assigned a value) and false otherwise */
+  public boolean isSetAllocations() {
+    return this.allocations != null;
+  }
+
+  public void setAllocationsIsSet(boolean value) {
+    if (!value) {
+      this.allocations = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case COMPUTE_RESOURCE_ID:
@@ -637,6 +671,14 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       }
       break;
 
+    case ALLOCATIONS:
+      if (value == null) {
+        unsetAllocations();
+      } else {
+        setAllocations((String)value);
+      }
+      break;
+
     }
   }
 
@@ -672,6 +714,9 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     case USAGE_REPORTING_GATEWAY_ID:
       return getUsageReportingGatewayId();
 
+    case ALLOCATIONS:
+      return getAllocations();
+
     }
     throw new IllegalStateException();
   }
@@ -703,6 +748,8 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       return isSetResourceSpecificCredentialStoreToken();
     case USAGE_REPORTING_GATEWAY_ID:
       return isSetUsageReportingGatewayId();
+    case ALLOCATIONS:
+      return isSetAllocations();
     }
     throw new IllegalStateException();
   }
@@ -810,6 +857,15 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         return false;
     }
 
+    boolean this_present_allocations = true && this.isSetAllocations();
+    boolean that_present_allocations = true && that.isSetAllocations();
+    if (this_present_allocations || that_present_allocations) {
+      if (!(this_present_allocations && that_present_allocations))
+        return false;
+      if (!this.allocations.equals(that.allocations))
+        return false;
+    }
+
     return true;
   }
 
@@ -867,6 +923,11 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     if (present_usageReportingGatewayId)
       list.add(usageReportingGatewayId);
 
+    boolean present_allocations = true && (isSetAllocations());
+    list.add(present_allocations);
+    if (present_allocations)
+      list.add(allocations);
+
     return list.hashCode();
   }
 
@@ -978,6 +1039,16 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetAllocations()).compareTo(other.isSetAllocations());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetAllocations()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allocations, other.allocations);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -1089,6 +1160,16 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       }
       first = false;
     }
+    if (isSetAllocations()) {
+      if (!first) sb.append(", ");
+      sb.append("allocations:");
+      if (this.allocations == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.allocations);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -1222,6 +1303,14 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 11: // ALLOCATIONS
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.allocations = iprot.readString();
+              struct.setAllocationsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -1299,6 +1388,13 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
           oprot.writeFieldEnd();
         }
       }
+      if (struct.allocations != null) {
+        if (struct.isSetAllocations()) {
+          oprot.writeFieldBegin(ALLOCATIONS_FIELD_DESC);
+          oprot.writeString(struct.allocations);
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -1343,7 +1439,10 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       if (struct.isSetUsageReportingGatewayId()) {
         optionals.set(7);
       }
-      oprot.writeBitSet(optionals, 8);
+      if (struct.isSetAllocations()) {
+        optionals.set(8);
+      }
+      oprot.writeBitSet(optionals, 9);
       if (struct.isSetLoginUserName()) {
         oprot.writeString(struct.loginUserName);
       }
@@ -1368,6 +1467,9 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       if (struct.isSetUsageReportingGatewayId()) {
         oprot.writeString(struct.usageReportingGatewayId);
       }
+      if (struct.isSetAllocations()) {
+        oprot.writeString(struct.allocations);
+      }
     }
 
     @Override
@@ -1377,7 +1479,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       struct.setComputeResourceIdIsSet(true);
       struct.overridebyAiravata = iprot.readBool();
       struct.setOverridebyAiravataIsSet(true);
-      BitSet incoming = iprot.readBitSet(8);
+      BitSet incoming = iprot.readBitSet(9);
       if (incoming.get(0)) {
         struct.loginUserName = iprot.readString();
         struct.setLoginUserNameIsSet(true);
@@ -1410,6 +1512,10 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         struct.usageReportingGatewayId = iprot.readString();
         struct.setUsageReportingGatewayIdIsSet(true);
       }
+      if (incoming.get(8)) {
+        struct.allocations = iprot.readString();
+        struct.setAllocationsIsSet(true);
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/c1df0551/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
index f8e1547..1df7df5 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
@@ -70,7 +70,8 @@ struct ComputeResourcePreference {
     7: optional string scratchLocation,
     8: optional string allocationProjectNumber,
     9: optional string resourceSpecificCredentialStoreToken,
-    10: optional string usageReportingGatewayId
+    10: optional string usageReportingGatewayId,
+    11: optional string allocations
 }
 
 struct StoragePreference {