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 23:42:28 UTC
[1/6] airavata git commit: Added allocation optional value to
computer resource preferences
Repository: airavata
Updated Branches:
refs/heads/develop 7850458fa -> f88859bf3
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/develop
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 {
[3/6] airavata git commit: Qos per queue: que1=qos1, que2=qos2,
que3=qos3
Posted by sh...@apache.org.
Qos per queue: que1=qos1,que2=qos2,que3=qos3
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/9bc25f9a
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/9bc25f9a
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/9bc25f9a
Branch: refs/heads/develop
Commit: 9bc25f9a117370dabbea4f4300f6d133feddf062
Parents: f831fed
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Aug 5 18:49:44 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Aug 5 18:49:44 2016 -0400
----------------------------------------------------------------------
.../apache/airavata/gfac/core/GFacUtils.java | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/9bc25f9a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
index 0bda74e..afbf425 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
@@ -73,6 +73,8 @@ import java.net.UnknownHostException;
import java.nio.ByteBuffer;
import java.security.SecureRandom;
import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
//import org.apache.airavata.commons.gfac.type.ActualParameter;
@@ -457,12 +459,12 @@ public class GFacUtils {
}
if (crp.getQualityOfService() != null) {
- jobDescriptor.setQoS(crp.getQualityOfService());
+ // qos per queue
+ jobDescriptor.setQoS(
+ getQoS(crp.getQualityOfService(), crp.getPreferredBatchQueue()));
}
- if (crp.getReservation() != null) {
- jobDescriptor.setReservation(crp.getReservation());
- }
+ jobDescriptor.setReservation(crp.getReservation());
// To make job name alpha numeric
jobDescriptor.setJobName("A" + String.valueOf(generateJobName()));
jobDescriptor.setWorkingDirectory(processContext.getWorkingDir());
@@ -634,6 +636,16 @@ public class GFacUtils {
return jobDescriptor;
}
+ private static String getQoS(String qualityOfService, String preferredBatchQueue) {
+ final String qos = "qos";
+ Pattern pattern = Pattern.compile(preferredBatchQueue + "=(?<" + qos + ">[^,]*)");
+ Matcher matcher = pattern.matcher(qualityOfService);
+ if (matcher.matches()) {
+ return matcher.group(qos);
+ }
+ return null;
+ }
+
private static int generateJobName() {
Random random = new Random();
int i = random.nextInt(Integer.MAX_VALUE);
[5/6] airavata git commit: Added qos, reservation registry changes
Posted by sh...@apache.org.
Added qos, reservation registry changes
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/a4716a7b
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/a4716a7b
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/a4716a7b
Branch: refs/heads/develop
Commit: a4716a7b3bdf07645370117edc0b9484d3308dab
Parents: 9bc25f9
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Aug 5 19:41:44 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Aug 5 19:41:44 2016 -0400
----------------------------------------------------------------------
.../catalog/impl/GwyResourceProfileImpl.java | 9 ++++
.../model/ComputeResourcePreference.java | 43 +++++++++++++++++++
.../ComputeHostPreferenceResource.java | 45 ++++++++++++++++++++
.../app/catalog/util/AppCatalogJPAUtils.java | 4 ++
.../util/AppCatalogThriftConversion.java | 4 ++
.../src/main/resources/appcatalog-derby.sql | 4 ++
.../src/main/resources/appcatalog-mysql.sql | 4 ++
7 files changed, 113 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4716a7b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
index da80baf..bbf300a 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
@@ -21,6 +21,7 @@
package org.apache.airavata.registry.core.app.catalog.impl;
+import org.apache.airavata.common.utils.AiravataUtils;
import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
import org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference;
@@ -81,6 +82,10 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
resource.setBatchQueue(preference.getPreferredBatchQueue());
resource.setProjectNumber(preference.getAllocationProjectNumber());
resource.setScratchLocation(preference.getScratchLocation());
+ resource.setQualityOfService(preference.getQualityOfService());
+ resource.setReservation(preference.getReservation());
+ resource.setReservationStartTime(AiravataUtils.getTime(preference.getReservationStartTime()));
+ resource.setReservationEndTime(AiravataUtils.getTime(preference.getReservationEndTime()));
resource.save();
}
}
@@ -137,6 +142,10 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
resource.setScratchLocation(preference.getScratchLocation());
resource.setResourceCSToken(preference.getResourceSpecificCredentialStoreToken());
resource.setUsageReportingGatewayId(preference.getUsageReportingGatewayId());
+ resource.setQualityOfService(preference.getQualityOfService());
+ resource.setReservation(preference.getReservation());
+ resource.setReservationStartTime(AiravataUtils.getTime(preference.getReservationStartTime()));
+ resource.setReservationEndTime(AiravataUtils.getTime(preference.getReservationEndTime()));
resource.save();
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4716a7b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java
index cdbce4e..676aa2d 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java
@@ -30,6 +30,7 @@ import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
+import java.sql.Timestamp;
@Entity
@Table(name = "COMPUTE_RESOURCE_PREFERENCE")
@@ -59,6 +60,15 @@ public class ComputeResourcePreference {
private String computeResourceCSToken;
@Column(name = "USAGE_REPORTING_GATEWAY_ID")
private String usageReportingGWId;
+ @Column(name = "QUALITY_OF_SERVICE")
+ private String qualityOfService;
+ @Column(name = "RESERVATION")
+ private String reservation;
+ @Column(name = "RESERVATION_START_TIME")
+ private Timestamp reservationStartTime;
+ @Column(name = "RESERVATION_END_TIME")
+ private Timestamp reservationEndTime;
+
@ManyToOne(cascade= CascadeType.MERGE)
@JoinColumn(name = "RESOURCE_ID")
@@ -68,6 +78,7 @@ public class ComputeResourcePreference {
@JoinColumn(name = "GATEWAY_ID")
private GatewayProfile gatewayProfile;
+
public String getGatewayId() {
return gatewayId;
}
@@ -171,4 +182,36 @@ public class ComputeResourcePreference {
public void setUsageReportingGWId(String usageReportingGWId) {
this.usageReportingGWId = usageReportingGWId;
}
+
+ public String getQualityOfService() {
+ return qualityOfService;
+ }
+
+ public void setQualityOfService(String qualityOfService) {
+ this.qualityOfService = qualityOfService;
+ }
+
+ public String getReservation() {
+ return reservation;
+ }
+
+ public void setReservation(String reservation) {
+ this.reservation = reservation;
+ }
+
+ public Timestamp getReservationStartTime() {
+ return reservationStartTime;
+ }
+
+ public void setReservationStartTime(Timestamp reservationStratTime) {
+ this.reservationStartTime = reservationStratTime;
+ }
+
+ public Timestamp getReservationEndTime() {
+ return reservationEndTime;
+ }
+
+ public void setReservationEndTime(Timestamp reservationEndTime) {
+ this.reservationEndTime = reservationEndTime;
+ }
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4716a7b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java
index 6a95f61..67dd77c 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java
@@ -35,6 +35,7 @@ import org.slf4j.LoggerFactory;
import javax.persistence.EntityManager;
import javax.persistence.Query;
+import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -53,6 +54,10 @@ public class ComputeHostPreferenceResource extends AppCatAbstractResource {
private String loginUserName;
private String resourceCSToken;
private String usageReportingGatewayId;
+ private String qualityOfService;
+ private String reservation;
+ private Timestamp reservationStartTime;
+ private Timestamp reservationEndTime;
private GatewayProfileResource gatewayProfile;
private ComputeResourceResource computeHostResource;
@@ -161,6 +166,38 @@ public class ComputeHostPreferenceResource extends AppCatAbstractResource {
this.usageReportingGatewayId = usageReportingGatewayId;
}
+ public String getQualityOfService() {
+ return qualityOfService;
+ }
+
+ public void setQualityOfService(String qualityOfService) {
+ this.qualityOfService = qualityOfService;
+ }
+
+ public String getReservation() {
+ return reservation;
+ }
+
+ public void setReservation(String reservation) {
+ this.reservation = reservation;
+ }
+
+ public Timestamp getReservationStartTime() {
+ return reservationStartTime;
+ }
+
+ public void setReservationStartTime(Timestamp reservationStartTime) {
+ this.reservationStartTime = reservationStartTime;
+ }
+
+ public Timestamp getReservationEndTime() {
+ return reservationEndTime;
+ }
+
+ public void setReservationEndTime(Timestamp reservationEndTime) {
+ this.reservationEndTime = reservationEndTime;
+ }
+
@Override
public void remove(Object identifier) throws AppCatalogException {
HashMap<String, String> ids;
@@ -394,6 +431,10 @@ public class ComputeHostPreferenceResource extends AppCatAbstractResource {
existingPreference.setLoginUserName(loginUserName);
existingPreference.setComputeResourceCSToken(resourceCSToken);
existingPreference.setUsageReportingGWId(usageReportingGatewayId);
+ existingPreference.setQualityOfService(qualityOfService);
+ existingPreference.setReservation(reservation);
+ existingPreference.setReservationStartTime(reservationStartTime);
+ existingPreference.setReservationEndTime(reservationEndTime);
em.merge(existingPreference);
} else {
ComputeResourcePreference resourcePreference = new ComputeResourcePreference();
@@ -410,6 +451,10 @@ public class ComputeHostPreferenceResource extends AppCatAbstractResource {
resourcePreference.setLoginUserName(loginUserName);
resourcePreference.setComputeResourceCSToken(resourceCSToken);
resourcePreference.setUsageReportingGWId(usageReportingGatewayId);
+ resourcePreference.setQualityOfService(qualityOfService);
+ resourcePreference.setReservation(reservation);
+ resourcePreference.setReservationStartTime(reservationStartTime);
+ resourcePreference.setReservationEndTime(reservationEndTime);
em.persist(resourcePreference);
}
em.getTransaction().commit();
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4716a7b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
index c839e50..a62259b 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
@@ -873,6 +873,10 @@ public class AppCatalogJPAUtils {
resource.setUsageReportingGatewayId(o.getUsageReportingGWId());
resource.setComputeHostResource((ComputeResourceResource) createComputeResource(o.getComputeHostResource()));
resource.setGatewayProfile((GatewayProfileResource) createGatewayProfile(o.getGatewayProfile()));
+ resource.setQualityOfService(o.getQualityOfService());
+ resource.setReservation(o.getReservation());
+ resource.setReservationStartTime(o.getReservationStartTime());
+ resource.setReservationEndTime(o.getReservationEndTime());
}
return resource;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4716a7b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
index be31d46..4d73ac6 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
@@ -832,6 +832,10 @@ public class AppCatalogThriftConversion {
preference.setLoginUserName(resource.getLoginUserName());
preference.setResourceSpecificCredentialStoreToken(resource.getResourceCSToken());
preference.setUsageReportingGatewayId(resource.getGatewayId());
+ preference.setQualityOfService(resource.getQualityOfService());
+ preference.setReservation(resource.getReservation());
+ preference.setReservationStartTime(resource.getReservationStartTime().getTime());
+ preference.setReservationEndTime(resource.getReservationEndTime().getTime());
return preference;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4716a7b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
index 61d06a2..9a23f5e 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
@@ -342,6 +342,10 @@ CREATE TABLE COMPUTE_RESOURCE_PREFERENCE
LOGIN_USERNAME VARCHAR(255),
RESOURCE_CS_TOKEN VARCHAR(255),
USAGE_REPORTING_GATEWAY_ID VARCHAR(255),
+ QUALITY_OF_SERVICE VARCHAR(255),
+ RESERVATION VARCHAR (255),
+ RESERVATION_START_TIME timestamp,
+ RESERVATION_END_TIME timestamp,
PRIMARY KEY(GATEWAY_ID,RESOURCE_ID),
FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE,
FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY_PROFILE(GATEWAY_ID) ON DELETE CASCADE
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4716a7b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
index 545ca5c..0aa91a4 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
@@ -341,6 +341,10 @@ CREATE TABLE COMPUTE_RESOURCE_PREFERENCE
LOGIN_USERNAME VARCHAR(255),
RESOURCE_CS_TOKEN VARCHAR(255),
USAGE_REPORTING_GATEWAY_ID VARCHAR(255),
+ QUALITY_OF_SERVICE VARCHAR(255),
+ RESERVATION VARCHAR (255),
+ RESERVATION_START_TIME timestamp,
+ RESERVATION_END_TIME timestamp,
PRIMARY KEY(GATEWAY_ID,RESOURCE_ID),
FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE,
FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY_PROFILE(GATEWAY_ID) ON DELETE CASCADE
[6/6] airavata git commit: Merge branch 'master' into develop
Posted by sh...@apache.org.
Merge branch 'master' into develop
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/f88859bf
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f88859bf
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f88859bf
Branch: refs/heads/develop
Commit: f88859bf3de8b3b9924dcd7d3db12931d586b268
Parents: ab6c1de a4716a7
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Aug 5 19:42:15 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Aug 5 19:42:15 2016 -0400
----------------------------------------------------------------------
.../catalog/impl/GwyResourceProfileImpl.java | 9 ++++
.../model/ComputeResourcePreference.java | 43 +++++++++++++++++++
.../ComputeHostPreferenceResource.java | 45 ++++++++++++++++++++
.../app/catalog/util/AppCatalogJPAUtils.java | 4 ++
.../util/AppCatalogThriftConversion.java | 4 ++
.../src/main/resources/appcatalog-derby.sql | 4 ++
.../src/main/resources/appcatalog-mysql.sql | 4 ++
7 files changed, 113 insertions(+)
----------------------------------------------------------------------
[4/6] airavata git commit: Merge branch 'master' into develop
Posted by sh...@apache.org.
Merge branch 'master' into develop
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/ab6c1de6
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/ab6c1de6
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/ab6c1de6
Branch: refs/heads/develop
Commit: ab6c1de672fa9f20283d90cb5ed075393d9da462
Parents: 7850458 9bc25f9
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Aug 5 18:50:30 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Aug 5 18:50:30 2016 -0400
----------------------------------------------------------------------
.../gateway_resource_profile_model_types.cpp | 88 ++++
.../gateway_resource_profile_model_types.h | 36 +-
.../Model/AppCatalog/GatewayProfile/Types.php | 92 ++++
.../model/appcatalog/gatewayprofile/ttypes.py | 54 ++-
.../ComputeResourcePreference.java | 418 ++++++++++++++++++-
.../apache/airavata/gfac/core/GFacUtils.java | 26 +-
.../airavata/gfac/core/JobDescriptor.java | 17 +-
.../gfac/core/x2012/x12/AfterAnyList.java | 2 +-
.../gfac/core/x2012/x12/AfterOKList.java | 2 +-
.../gfac/core/x2012/x12/ExportProperties.java | 4 +-
.../airavata/gfac/core/x2012/x12/InputList.java | 2 +-
.../core/x2012/x12/JobDescriptorDocument.java | 2 +-
.../gfac/core/x2012/x12/ModuleLoadCommands.java | 2 +-
.../airavata/gfac/core/x2012/x12/PbsParams.java | 62 ++-
.../gfac/core/x2012/x12/PostJobCommands.java | 2 +-
.../gfac/core/x2012/x12/PreJobCommands.java | 2 +-
.../gfac/core/x2012/x12/impl/PbsParamsImpl.java | 188 +++++++++
.../src/main/resources/PBSJobDescriptor.xsd | 2 +
.../src/main/resources/SLURMTemplate.xslt | 12 +-
.../gateway_resource_profile_model.thrift | 6 +-
20 files changed, 996 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
[2/6] airavata git commit: reservation,
and qos fields to compute resource perferences
Posted by sh...@apache.org.
reservation, and qos fields to compute resource perferences
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/f831fedf
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f831fedf
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f831fedf
Branch: refs/heads/develop
Commit: f831fedf0a71aae27ffc6fc581f37b16e28fd303
Parents: c1df055
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Aug 5 17:18:26 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Aug 5 17:52:10 2016 -0400
----------------------------------------------------------------------
.../gateway_resource_profile_model_types.cpp | 90 +++-
.../gateway_resource_profile_model_types.h | 38 +-
.../Model/AppCatalog/GatewayProfile/Types.php | 85 +++-
.../model/appcatalog/gatewayprofile/ttypes.py | 57 ++-
.../ComputeResourcePreference.java | 420 ++++++++++++++++---
.../apache/airavata/gfac/core/GFacUtils.java | 14 +-
.../airavata/gfac/core/JobDescriptor.java | 17 +-
.../gfac/core/x2012/x12/AfterAnyList.java | 2 +-
.../gfac/core/x2012/x12/AfterOKList.java | 2 +-
.../gfac/core/x2012/x12/ExportProperties.java | 4 +-
.../airavata/gfac/core/x2012/x12/InputList.java | 2 +-
.../core/x2012/x12/JobDescriptorDocument.java | 2 +-
.../gfac/core/x2012/x12/ModuleLoadCommands.java | 2 +-
.../airavata/gfac/core/x2012/x12/PbsParams.java | 62 ++-
.../gfac/core/x2012/x12/PostJobCommands.java | 2 +-
.../gfac/core/x2012/x12/PreJobCommands.java | 2 +-
.../gfac/core/x2012/x12/impl/PbsParamsImpl.java | 188 +++++++++
.../src/main/resources/PBSJobDescriptor.xsd | 2 +
.../src/main/resources/SLURMTemplate.xslt | 12 +-
.../gateway_resource_profile_model.thrift | 5 +-
20 files changed, 898 insertions(+), 110 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/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 e77751a..19dd9e8 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,9 +83,24 @@ void ComputeResourcePreference::__set_usageReportingGatewayId(const std::string&
__isset.usageReportingGatewayId = true;
}
-void ComputeResourcePreference::__set_allocations(const std::string& val) {
- this->allocations = val;
-__isset.allocations = true;
+void ComputeResourcePreference::__set_qualityOfService(const std::string& val) {
+ this->qualityOfService = val;
+__isset.qualityOfService = true;
+}
+
+void ComputeResourcePreference::__set_reservation(const std::string& val) {
+ this->reservation = val;
+__isset.reservation = true;
+}
+
+void ComputeResourcePreference::__set_reservationStartTime(const int64_t val) {
+ this->reservationStartTime = val;
+__isset.reservationStartTime = true;
+}
+
+void ComputeResourcePreference::__set_reservationEndTime(const int64_t val) {
+ this->reservationEndTime = val;
+__isset.reservationEndTime = true;
}
uint32_t ComputeResourcePreference::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -197,8 +212,32 @@ uint32_t ComputeResourcePreference::read(::apache::thrift::protocol::TProtocol*
break;
case 11:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->allocations);
- this->__isset.allocations = true;
+ xfer += iprot->readString(this->qualityOfService);
+ this->__isset.qualityOfService = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 12:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->reservation);
+ this->__isset.reservation = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 13:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->reservationStartTime);
+ this->__isset.reservationStartTime = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 14:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->reservationEndTime);
+ this->__isset.reservationEndTime = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -272,9 +311,24 @@ 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);
+ if (this->__isset.qualityOfService) {
+ xfer += oprot->writeFieldBegin("qualityOfService", ::apache::thrift::protocol::T_STRING, 11);
+ xfer += oprot->writeString(this->qualityOfService);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.reservation) {
+ xfer += oprot->writeFieldBegin("reservation", ::apache::thrift::protocol::T_STRING, 12);
+ xfer += oprot->writeString(this->reservation);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.reservationStartTime) {
+ xfer += oprot->writeFieldBegin("reservationStartTime", ::apache::thrift::protocol::T_I64, 13);
+ xfer += oprot->writeI64(this->reservationStartTime);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.reservationEndTime) {
+ xfer += oprot->writeFieldBegin("reservationEndTime", ::apache::thrift::protocol::T_I64, 14);
+ xfer += oprot->writeI64(this->reservationEndTime);
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
@@ -294,7 +348,10 @@ 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.qualityOfService, b.qualityOfService);
+ swap(a.reservation, b.reservation);
+ swap(a.reservationStartTime, b.reservationStartTime);
+ swap(a.reservationEndTime, b.reservationEndTime);
swap(a.__isset, b.__isset);
}
@@ -309,7 +366,10 @@ ComputeResourcePreference::ComputeResourcePreference(const ComputeResourcePrefer
allocationProjectNumber = other2.allocationProjectNumber;
resourceSpecificCredentialStoreToken = other2.resourceSpecificCredentialStoreToken;
usageReportingGatewayId = other2.usageReportingGatewayId;
- allocations = other2.allocations;
+ qualityOfService = other2.qualityOfService;
+ reservation = other2.reservation;
+ reservationStartTime = other2.reservationStartTime;
+ reservationEndTime = other2.reservationEndTime;
__isset = other2.__isset;
}
ComputeResourcePreference& ComputeResourcePreference::operator=(const ComputeResourcePreference& other3) {
@@ -323,7 +383,10 @@ ComputeResourcePreference& ComputeResourcePreference::operator=(const ComputeRes
allocationProjectNumber = other3.allocationProjectNumber;
resourceSpecificCredentialStoreToken = other3.resourceSpecificCredentialStoreToken;
usageReportingGatewayId = other3.usageReportingGatewayId;
- allocations = other3.allocations;
+ qualityOfService = other3.qualityOfService;
+ reservation = other3.reservation;
+ reservationStartTime = other3.reservationStartTime;
+ reservationEndTime = other3.reservationEndTime;
__isset = other3.__isset;
return *this;
}
@@ -340,7 +403,10 @@ 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 << ", " << "qualityOfService="; (__isset.qualityOfService ? (out << to_string(qualityOfService)) : (out << "<null>"));
+ out << ", " << "reservation="; (__isset.reservation ? (out << to_string(reservation)) : (out << "<null>"));
+ out << ", " << "reservationStartTime="; (__isset.reservationStartTime ? (out << to_string(reservationStartTime)) : (out << "<null>"));
+ out << ", " << "reservationEndTime="; (__isset.reservationEndTime ? (out << to_string(reservationEndTime)) : (out << "<null>"));
out << ")";
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/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 b62ada0..a8eb680 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), allocations(false) {}
+ _ComputeResourcePreference__isset() : loginUserName(false), preferredJobSubmissionProtocol(false), preferredDataMovementProtocol(false), preferredBatchQueue(false), scratchLocation(false), allocationProjectNumber(false), resourceSpecificCredentialStoreToken(false), usageReportingGatewayId(false), qualityOfService(false), reservation(false), reservationStartTime(false), reservationEndTime(false) {}
bool loginUserName :1;
bool preferredJobSubmissionProtocol :1;
bool preferredDataMovementProtocol :1;
@@ -54,7 +54,10 @@ typedef struct _ComputeResourcePreference__isset {
bool allocationProjectNumber :1;
bool resourceSpecificCredentialStoreToken :1;
bool usageReportingGatewayId :1;
- bool allocations :1;
+ bool qualityOfService :1;
+ bool reservation :1;
+ bool reservationStartTime :1;
+ bool reservationEndTime :1;
} _ComputeResourcePreference__isset;
class ComputeResourcePreference {
@@ -62,7 +65,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(), allocations() {
+ 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(), qualityOfService(), reservation(), reservationStartTime(0), reservationEndTime(0) {
}
virtual ~ComputeResourcePreference() throw();
@@ -76,7 +79,10 @@ class ComputeResourcePreference {
std::string allocationProjectNumber;
std::string resourceSpecificCredentialStoreToken;
std::string usageReportingGatewayId;
- std::string allocations;
+ std::string qualityOfService;
+ std::string reservation;
+ int64_t reservationStartTime;
+ int64_t reservationEndTime;
_ComputeResourcePreference__isset __isset;
@@ -100,7 +106,13 @@ class ComputeResourcePreference {
void __set_usageReportingGatewayId(const std::string& val);
- void __set_allocations(const std::string& val);
+ void __set_qualityOfService(const std::string& val);
+
+ void __set_reservation(const std::string& val);
+
+ void __set_reservationStartTime(const int64_t val);
+
+ void __set_reservationEndTime(const int64_t val);
bool operator == (const ComputeResourcePreference & rhs) const
{
@@ -140,9 +152,21 @@ class ComputeResourcePreference {
return false;
else if (__isset.usageReportingGatewayId && !(usageReportingGatewayId == rhs.usageReportingGatewayId))
return false;
- if (__isset.allocations != rhs.__isset.allocations)
+ if (__isset.qualityOfService != rhs.__isset.qualityOfService)
+ return false;
+ else if (__isset.qualityOfService && !(qualityOfService == rhs.qualityOfService))
+ return false;
+ if (__isset.reservation != rhs.__isset.reservation)
+ return false;
+ else if (__isset.reservation && !(reservation == rhs.reservation))
+ return false;
+ if (__isset.reservationStartTime != rhs.__isset.reservationStartTime)
+ return false;
+ else if (__isset.reservationStartTime && !(reservationStartTime == rhs.reservationStartTime))
+ return false;
+ if (__isset.reservationEndTime != rhs.__isset.reservationEndTime)
return false;
- else if (__isset.allocations && !(allocations == rhs.allocations))
+ else if (__isset.reservationEndTime && !(reservationEndTime == rhs.reservationEndTime))
return false;
return true;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/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 85a4f27..f0b329d 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
@@ -97,7 +97,19 @@ class ComputeResourcePreference {
/**
* @var string
*/
- public $allocations = null;
+ public $qualityOfService = null;
+ /**
+ * @var string
+ */
+ public $reservation = null;
+ /**
+ * @var int
+ */
+ public $reservationStartTime = null;
+ /**
+ * @var int
+ */
+ public $reservationEndTime = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -143,9 +155,21 @@ class ComputeResourcePreference {
'type' => TType::STRING,
),
11 => array(
- 'var' => 'allocations',
+ 'var' => 'qualityOfService',
'type' => TType::STRING,
),
+ 12 => array(
+ 'var' => 'reservation',
+ 'type' => TType::STRING,
+ ),
+ 13 => array(
+ 'var' => 'reservationStartTime',
+ 'type' => TType::I64,
+ ),
+ 14 => array(
+ 'var' => 'reservationEndTime',
+ 'type' => TType::I64,
+ ),
);
}
if (is_array($vals)) {
@@ -179,8 +203,17 @@ class ComputeResourcePreference {
if (isset($vals['usageReportingGatewayId'])) {
$this->usageReportingGatewayId = $vals['usageReportingGatewayId'];
}
- if (isset($vals['allocations'])) {
- $this->allocations = $vals['allocations'];
+ if (isset($vals['qualityOfService'])) {
+ $this->qualityOfService = $vals['qualityOfService'];
+ }
+ if (isset($vals['reservation'])) {
+ $this->reservation = $vals['reservation'];
+ }
+ if (isset($vals['reservationStartTime'])) {
+ $this->reservationStartTime = $vals['reservationStartTime'];
+ }
+ if (isset($vals['reservationEndTime'])) {
+ $this->reservationEndTime = $vals['reservationEndTime'];
}
}
}
@@ -276,7 +309,28 @@ class ComputeResourcePreference {
break;
case 11:
if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->allocations);
+ $xfer += $input->readString($this->qualityOfService);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 12:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->reservation);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 13:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->reservationStartTime);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 14:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->reservationEndTime);
} else {
$xfer += $input->skip($ftype);
}
@@ -344,9 +398,24 @@ 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);
+ if ($this->qualityOfService !== null) {
+ $xfer += $output->writeFieldBegin('qualityOfService', TType::STRING, 11);
+ $xfer += $output->writeString($this->qualityOfService);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->reservation !== null) {
+ $xfer += $output->writeFieldBegin('reservation', TType::STRING, 12);
+ $xfer += $output->writeString($this->reservation);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->reservationStartTime !== null) {
+ $xfer += $output->writeFieldBegin('reservationStartTime', TType::I64, 13);
+ $xfer += $output->writeI64($this->reservationStartTime);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->reservationEndTime !== null) {
+ $xfer += $output->writeFieldBegin('reservationEndTime', TType::I64, 14);
+ $xfer += $output->writeI64($this->reservationEndTime);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/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 e02cf2a..ecb93e8 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,7 +66,10 @@ class ComputeResourcePreference:
- allocationProjectNumber
- resourceSpecificCredentialStoreToken
- usageReportingGatewayId
- - allocations
+ - qualityOfService
+ - reservation
+ - reservationStartTime
+ - reservationEndTime
"""
thrift_spec = (
@@ -81,10 +84,13 @@ 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
+ (11, TType.STRING, 'qualityOfService', None, None, ), # 11
+ (12, TType.STRING, 'reservation', None, None, ), # 12
+ (13, TType.I64, 'reservationStartTime', None, None, ), # 13
+ (14, TType.I64, 'reservationEndTime', None, None, ), # 14
)
- 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,):
+ 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, qualityOfService=None, reservation=None, reservationStartTime=None, reservationEndTime=None,):
self.computeResourceId = computeResourceId
self.overridebyAiravata = overridebyAiravata
self.loginUserName = loginUserName
@@ -95,7 +101,10 @@ class ComputeResourcePreference:
self.allocationProjectNumber = allocationProjectNumber
self.resourceSpecificCredentialStoreToken = resourceSpecificCredentialStoreToken
self.usageReportingGatewayId = usageReportingGatewayId
- self.allocations = allocations
+ self.qualityOfService = qualityOfService
+ self.reservation = reservation
+ self.reservationStartTime = reservationStartTime
+ self.reservationEndTime = reservationEndTime
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:
@@ -158,7 +167,22 @@ class ComputeResourcePreference:
iprot.skip(ftype)
elif fid == 11:
if ftype == TType.STRING:
- self.allocations = iprot.readString()
+ self.qualityOfService = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 12:
+ if ftype == TType.STRING:
+ self.reservation = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 13:
+ if ftype == TType.I64:
+ self.reservationStartTime = iprot.readI64()
+ else:
+ iprot.skip(ftype)
+ elif fid == 14:
+ if ftype == TType.I64:
+ self.reservationEndTime = iprot.readI64()
else:
iprot.skip(ftype)
else:
@@ -211,9 +235,21 @@ 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)
+ if self.qualityOfService is not None:
+ oprot.writeFieldBegin('qualityOfService', TType.STRING, 11)
+ oprot.writeString(self.qualityOfService)
+ oprot.writeFieldEnd()
+ if self.reservation is not None:
+ oprot.writeFieldBegin('reservation', TType.STRING, 12)
+ oprot.writeString(self.reservation)
+ oprot.writeFieldEnd()
+ if self.reservationStartTime is not None:
+ oprot.writeFieldBegin('reservationStartTime', TType.I64, 13)
+ oprot.writeI64(self.reservationStartTime)
+ oprot.writeFieldEnd()
+ if self.reservationEndTime is not None:
+ oprot.writeFieldBegin('reservationEndTime', TType.I64, 14)
+ oprot.writeI64(self.reservationEndTime)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -238,7 +274,10 @@ 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)
+ value = (value * 31) ^ hash(self.qualityOfService)
+ value = (value * 31) ^ hash(self.reservation)
+ value = (value * 31) ^ hash(self.reservationStartTime)
+ value = (value * 31) ^ hash(self.reservationEndTime)
return value
def __repr__(self):
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/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 d92c159..b1c092b 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,7 +99,10 @@ 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 org.apache.thrift.protocol.TField QUALITY_OF_SERVICE_FIELD_DESC = new org.apache.thrift.protocol.TField("qualityOfService", org.apache.thrift.protocol.TType.STRING, (short)11);
+ private static final org.apache.thrift.protocol.TField RESERVATION_FIELD_DESC = new org.apache.thrift.protocol.TField("reservation", org.apache.thrift.protocol.TType.STRING, (short)12);
+ private static final org.apache.thrift.protocol.TField RESERVATION_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("reservationStartTime", org.apache.thrift.protocol.TType.I64, (short)13);
+ private static final org.apache.thrift.protocol.TField RESERVATION_END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("reservationEndTime", org.apache.thrift.protocol.TType.I64, (short)14);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -117,7 +120,10 @@ 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
+ private String qualityOfService; // optional
+ private String reservation; // optional
+ private long reservationStartTime; // optional
+ private long reservationEndTime; // 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 {
@@ -139,7 +145,10 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
ALLOCATION_PROJECT_NUMBER((short)8, "allocationProjectNumber"),
RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN((short)9, "resourceSpecificCredentialStoreToken"),
USAGE_REPORTING_GATEWAY_ID((short)10, "usageReportingGatewayId"),
- ALLOCATIONS((short)11, "allocations");
+ QUALITY_OF_SERVICE((short)11, "qualityOfService"),
+ RESERVATION((short)12, "reservation"),
+ RESERVATION_START_TIME((short)13, "reservationStartTime"),
+ RESERVATION_END_TIME((short)14, "reservationEndTime");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -174,8 +183,14 @@ 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;
+ case 11: // QUALITY_OF_SERVICE
+ return QUALITY_OF_SERVICE;
+ case 12: // RESERVATION
+ return RESERVATION;
+ case 13: // RESERVATION_START_TIME
+ return RESERVATION_START_TIME;
+ case 14: // RESERVATION_END_TIME
+ return RESERVATION_END_TIME;
default:
return null;
}
@@ -217,8 +232,10 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
// isset id assignments
private static final int __OVERRIDEBYAIRAVATA_ISSET_ID = 0;
+ private static final int __RESERVATIONSTARTTIME_ISSET_ID = 1;
+ private static final int __RESERVATIONENDTIME_ISSET_ID = 2;
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,_Fields.ALLOCATIONS};
+ 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.QUALITY_OF_SERVICE,_Fields.RESERVATION,_Fields.RESERVATION_START_TIME,_Fields.RESERVATION_END_TIME};
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);
@@ -242,8 +259,14 @@ 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,
+ tmpMap.put(_Fields.QUALITY_OF_SERVICE, new org.apache.thrift.meta_data.FieldMetaData("qualityOfService", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.RESERVATION, new org.apache.thrift.meta_data.FieldMetaData("reservation", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.RESERVATION_START_TIME, new org.apache.thrift.meta_data.FieldMetaData("reservationStartTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.RESERVATION_END_TIME, new org.apache.thrift.meta_data.FieldMetaData("reservationEndTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputeResourcePreference.class, metaDataMap);
}
@@ -296,9 +319,14 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
if (other.isSetUsageReportingGatewayId()) {
this.usageReportingGatewayId = other.usageReportingGatewayId;
}
- if (other.isSetAllocations()) {
- this.allocations = other.allocations;
+ if (other.isSetQualityOfService()) {
+ this.qualityOfService = other.qualityOfService;
+ }
+ if (other.isSetReservation()) {
+ this.reservation = other.reservation;
}
+ this.reservationStartTime = other.reservationStartTime;
+ this.reservationEndTime = other.reservationEndTime;
}
public ComputeResourcePreference deepCopy() {
@@ -318,7 +346,12 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
this.allocationProjectNumber = null;
this.resourceSpecificCredentialStoreToken = null;
this.usageReportingGatewayId = null;
- this.allocations = null;
+ this.qualityOfService = null;
+ this.reservation = null;
+ setReservationStartTimeIsSet(false);
+ this.reservationStartTime = 0;
+ setReservationEndTimeIsSet(false);
+ this.reservationEndTime = 0;
}
public String getComputeResourceId() {
@@ -566,29 +599,96 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
}
}
- public String getAllocations() {
- return this.allocations;
+ public String getQualityOfService() {
+ return this.qualityOfService;
}
- public void setAllocations(String allocations) {
- this.allocations = allocations;
+ public void setQualityOfService(String qualityOfService) {
+ this.qualityOfService = qualityOfService;
}
- public void unsetAllocations() {
- this.allocations = null;
+ public void unsetQualityOfService() {
+ this.qualityOfService = null;
}
- /** Returns true if field allocations is set (has been assigned a value) and false otherwise */
- public boolean isSetAllocations() {
- return this.allocations != null;
+ /** Returns true if field qualityOfService is set (has been assigned a value) and false otherwise */
+ public boolean isSetQualityOfService() {
+ return this.qualityOfService != null;
}
- public void setAllocationsIsSet(boolean value) {
+ public void setQualityOfServiceIsSet(boolean value) {
if (!value) {
- this.allocations = null;
+ this.qualityOfService = null;
}
}
+ public String getReservation() {
+ return this.reservation;
+ }
+
+ public void setReservation(String reservation) {
+ this.reservation = reservation;
+ }
+
+ public void unsetReservation() {
+ this.reservation = null;
+ }
+
+ /** Returns true if field reservation is set (has been assigned a value) and false otherwise */
+ public boolean isSetReservation() {
+ return this.reservation != null;
+ }
+
+ public void setReservationIsSet(boolean value) {
+ if (!value) {
+ this.reservation = null;
+ }
+ }
+
+ public long getReservationStartTime() {
+ return this.reservationStartTime;
+ }
+
+ public void setReservationStartTime(long reservationStartTime) {
+ this.reservationStartTime = reservationStartTime;
+ setReservationStartTimeIsSet(true);
+ }
+
+ public void unsetReservationStartTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESERVATIONSTARTTIME_ISSET_ID);
+ }
+
+ /** Returns true if field reservationStartTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetReservationStartTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __RESERVATIONSTARTTIME_ISSET_ID);
+ }
+
+ public void setReservationStartTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESERVATIONSTARTTIME_ISSET_ID, value);
+ }
+
+ public long getReservationEndTime() {
+ return this.reservationEndTime;
+ }
+
+ public void setReservationEndTime(long reservationEndTime) {
+ this.reservationEndTime = reservationEndTime;
+ setReservationEndTimeIsSet(true);
+ }
+
+ public void unsetReservationEndTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESERVATIONENDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field reservationEndTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetReservationEndTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __RESERVATIONENDTIME_ISSET_ID);
+ }
+
+ public void setReservationEndTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESERVATIONENDTIME_ISSET_ID, value);
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case COMPUTE_RESOURCE_ID:
@@ -671,11 +771,35 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
}
break;
- case ALLOCATIONS:
+ case QUALITY_OF_SERVICE:
+ if (value == null) {
+ unsetQualityOfService();
+ } else {
+ setQualityOfService((String)value);
+ }
+ break;
+
+ case RESERVATION:
+ if (value == null) {
+ unsetReservation();
+ } else {
+ setReservation((String)value);
+ }
+ break;
+
+ case RESERVATION_START_TIME:
+ if (value == null) {
+ unsetReservationStartTime();
+ } else {
+ setReservationStartTime((Long)value);
+ }
+ break;
+
+ case RESERVATION_END_TIME:
if (value == null) {
- unsetAllocations();
+ unsetReservationEndTime();
} else {
- setAllocations((String)value);
+ setReservationEndTime((Long)value);
}
break;
@@ -714,8 +838,17 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
case USAGE_REPORTING_GATEWAY_ID:
return getUsageReportingGatewayId();
- case ALLOCATIONS:
- return getAllocations();
+ case QUALITY_OF_SERVICE:
+ return getQualityOfService();
+
+ case RESERVATION:
+ return getReservation();
+
+ case RESERVATION_START_TIME:
+ return getReservationStartTime();
+
+ case RESERVATION_END_TIME:
+ return getReservationEndTime();
}
throw new IllegalStateException();
@@ -748,8 +881,14 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
return isSetResourceSpecificCredentialStoreToken();
case USAGE_REPORTING_GATEWAY_ID:
return isSetUsageReportingGatewayId();
- case ALLOCATIONS:
- return isSetAllocations();
+ case QUALITY_OF_SERVICE:
+ return isSetQualityOfService();
+ case RESERVATION:
+ return isSetReservation();
+ case RESERVATION_START_TIME:
+ return isSetReservationStartTime();
+ case RESERVATION_END_TIME:
+ return isSetReservationEndTime();
}
throw new IllegalStateException();
}
@@ -857,12 +996,39 @@ 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))
+ boolean this_present_qualityOfService = true && this.isSetQualityOfService();
+ boolean that_present_qualityOfService = true && that.isSetQualityOfService();
+ if (this_present_qualityOfService || that_present_qualityOfService) {
+ if (!(this_present_qualityOfService && that_present_qualityOfService))
+ return false;
+ if (!this.qualityOfService.equals(that.qualityOfService))
+ return false;
+ }
+
+ boolean this_present_reservation = true && this.isSetReservation();
+ boolean that_present_reservation = true && that.isSetReservation();
+ if (this_present_reservation || that_present_reservation) {
+ if (!(this_present_reservation && that_present_reservation))
+ return false;
+ if (!this.reservation.equals(that.reservation))
+ return false;
+ }
+
+ boolean this_present_reservationStartTime = true && this.isSetReservationStartTime();
+ boolean that_present_reservationStartTime = true && that.isSetReservationStartTime();
+ if (this_present_reservationStartTime || that_present_reservationStartTime) {
+ if (!(this_present_reservationStartTime && that_present_reservationStartTime))
+ return false;
+ if (this.reservationStartTime != that.reservationStartTime)
+ return false;
+ }
+
+ boolean this_present_reservationEndTime = true && this.isSetReservationEndTime();
+ boolean that_present_reservationEndTime = true && that.isSetReservationEndTime();
+ if (this_present_reservationEndTime || that_present_reservationEndTime) {
+ if (!(this_present_reservationEndTime && that_present_reservationEndTime))
return false;
- if (!this.allocations.equals(that.allocations))
+ if (this.reservationEndTime != that.reservationEndTime)
return false;
}
@@ -923,10 +1089,25 @@ 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);
+ boolean present_qualityOfService = true && (isSetQualityOfService());
+ list.add(present_qualityOfService);
+ if (present_qualityOfService)
+ list.add(qualityOfService);
+
+ boolean present_reservation = true && (isSetReservation());
+ list.add(present_reservation);
+ if (present_reservation)
+ list.add(reservation);
+
+ boolean present_reservationStartTime = true && (isSetReservationStartTime());
+ list.add(present_reservationStartTime);
+ if (present_reservationStartTime)
+ list.add(reservationStartTime);
+
+ boolean present_reservationEndTime = true && (isSetReservationEndTime());
+ list.add(present_reservationEndTime);
+ if (present_reservationEndTime)
+ list.add(reservationEndTime);
return list.hashCode();
}
@@ -1039,12 +1220,42 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAllocations()).compareTo(other.isSetAllocations());
+ lastComparison = Boolean.valueOf(isSetQualityOfService()).compareTo(other.isSetQualityOfService());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetQualityOfService()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualityOfService, other.qualityOfService);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetReservation()).compareTo(other.isSetReservation());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetReservation()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reservation, other.reservation);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetReservationStartTime()).compareTo(other.isSetReservationStartTime());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetAllocations()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allocations, other.allocations);
+ if (isSetReservationStartTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reservationStartTime, other.reservationStartTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetReservationEndTime()).compareTo(other.isSetReservationEndTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetReservationEndTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reservationEndTime, other.reservationEndTime);
if (lastComparison != 0) {
return lastComparison;
}
@@ -1160,16 +1371,38 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
}
first = false;
}
- if (isSetAllocations()) {
+ if (isSetQualityOfService()) {
+ if (!first) sb.append(", ");
+ sb.append("qualityOfService:");
+ if (this.qualityOfService == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.qualityOfService);
+ }
+ first = false;
+ }
+ if (isSetReservation()) {
if (!first) sb.append(", ");
- sb.append("allocations:");
- if (this.allocations == null) {
+ sb.append("reservation:");
+ if (this.reservation == null) {
sb.append("null");
} else {
- sb.append(this.allocations);
+ sb.append(this.reservation);
}
first = false;
}
+ if (isSetReservationStartTime()) {
+ if (!first) sb.append(", ");
+ sb.append("reservationStartTime:");
+ sb.append(this.reservationStartTime);
+ first = false;
+ }
+ if (isSetReservationEndTime()) {
+ if (!first) sb.append(", ");
+ sb.append("reservationEndTime:");
+ sb.append(this.reservationEndTime);
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -1303,10 +1536,34 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 11: // ALLOCATIONS
+ case 11: // QUALITY_OF_SERVICE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.qualityOfService = iprot.readString();
+ struct.setQualityOfServiceIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 12: // RESERVATION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.allocations = iprot.readString();
- struct.setAllocationsIsSet(true);
+ struct.reservation = iprot.readString();
+ struct.setReservationIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 13: // RESERVATION_START_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.reservationStartTime = iprot.readI64();
+ struct.setReservationStartTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 14: // RESERVATION_END_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.reservationEndTime = iprot.readI64();
+ struct.setReservationEndTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1388,13 +1645,30 @@ 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);
+ if (struct.qualityOfService != null) {
+ if (struct.isSetQualityOfService()) {
+ oprot.writeFieldBegin(QUALITY_OF_SERVICE_FIELD_DESC);
+ oprot.writeString(struct.qualityOfService);
oprot.writeFieldEnd();
}
}
+ if (struct.reservation != null) {
+ if (struct.isSetReservation()) {
+ oprot.writeFieldBegin(RESERVATION_FIELD_DESC);
+ oprot.writeString(struct.reservation);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetReservationStartTime()) {
+ oprot.writeFieldBegin(RESERVATION_START_TIME_FIELD_DESC);
+ oprot.writeI64(struct.reservationStartTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetReservationEndTime()) {
+ oprot.writeFieldBegin(RESERVATION_END_TIME_FIELD_DESC);
+ oprot.writeI64(struct.reservationEndTime);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -1439,10 +1713,19 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
if (struct.isSetUsageReportingGatewayId()) {
optionals.set(7);
}
- if (struct.isSetAllocations()) {
+ if (struct.isSetQualityOfService()) {
optionals.set(8);
}
- oprot.writeBitSet(optionals, 9);
+ if (struct.isSetReservation()) {
+ optionals.set(9);
+ }
+ if (struct.isSetReservationStartTime()) {
+ optionals.set(10);
+ }
+ if (struct.isSetReservationEndTime()) {
+ optionals.set(11);
+ }
+ oprot.writeBitSet(optionals, 12);
if (struct.isSetLoginUserName()) {
oprot.writeString(struct.loginUserName);
}
@@ -1467,8 +1750,17 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
if (struct.isSetUsageReportingGatewayId()) {
oprot.writeString(struct.usageReportingGatewayId);
}
- if (struct.isSetAllocations()) {
- oprot.writeString(struct.allocations);
+ if (struct.isSetQualityOfService()) {
+ oprot.writeString(struct.qualityOfService);
+ }
+ if (struct.isSetReservation()) {
+ oprot.writeString(struct.reservation);
+ }
+ if (struct.isSetReservationStartTime()) {
+ oprot.writeI64(struct.reservationStartTime);
+ }
+ if (struct.isSetReservationEndTime()) {
+ oprot.writeI64(struct.reservationEndTime);
}
}
@@ -1479,7 +1771,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
struct.setComputeResourceIdIsSet(true);
struct.overridebyAiravata = iprot.readBool();
struct.setOverridebyAiravataIsSet(true);
- BitSet incoming = iprot.readBitSet(9);
+ BitSet incoming = iprot.readBitSet(12);
if (incoming.get(0)) {
struct.loginUserName = iprot.readString();
struct.setLoginUserNameIsSet(true);
@@ -1513,8 +1805,20 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
struct.setUsageReportingGatewayIdIsSet(true);
}
if (incoming.get(8)) {
- struct.allocations = iprot.readString();
- struct.setAllocationsIsSet(true);
+ struct.qualityOfService = iprot.readString();
+ struct.setQualityOfServiceIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.reservation = iprot.readString();
+ struct.setReservationIsSet(true);
+ }
+ if (incoming.get(10)) {
+ struct.reservationStartTime = iprot.readI64();
+ struct.setReservationStartTimeIsSet(true);
+ }
+ if (incoming.get(11)) {
+ struct.reservationEndTime = iprot.readI64();
+ struct.setReservationEndTimeIsSet(true);
}
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
index 0915c0c..0bda74e 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
@@ -451,9 +451,17 @@ public class GFacUtils {
jobDescriptor.setExecutablePath(processContext.getApplicationDeploymentDescription().getExecutablePath());
jobDescriptor.setStandardOutFile(processContext.getStdoutLocation());
jobDescriptor.setStandardErrorFile(processContext.getStderrLocation());
- String computationalProjectAccount = getComputeResourcePreference(processContext).getAllocationProjectNumber();
- if (computationalProjectAccount != null) {
- jobDescriptor.setAcountString(computationalProjectAccount);
+ ComputeResourcePreference crp = getComputeResourcePreference(processContext);
+ if (crp.getAllocationProjectNumber() != null) {
+ jobDescriptor.setAcountString(crp.getAllocationProjectNumber());
+ }
+
+ if (crp.getQualityOfService() != null) {
+ jobDescriptor.setQoS(crp.getQualityOfService());
+ }
+
+ if (crp.getReservation() != null) {
+ jobDescriptor.setReservation(crp.getReservation());
}
// To make job name alpha numeric
jobDescriptor.setJobName("A" + String.valueOf(generateJobName()));
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobDescriptor.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobDescriptor.java
index 777681a..f1f72df 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobDescriptor.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/JobDescriptor.java
@@ -468,7 +468,22 @@ public class JobDescriptor {
public void setChassisName(String chassisName){
this.getJobDescriptorDocument().getJobDescriptor().setChassisName(chassisName);
}
-
+ public void setQoS(String qos){
+ this.getJobDescriptorDocument().getJobDescriptor().setQualityOfService(qos);
+ }
+
+ public String getQoS() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getQualityOfService();
+ }
+
+ public void setReservation(String reservation) {
+ this.getJobDescriptorDocument().getJobDescriptor().setReservation(reservation);
+ }
+
+ public String getReservation() {
+ return this.getJobDescriptorDocument().getJobDescriptor().getReservation();
+ }
+
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterAnyList.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterAnyList.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterAnyList.java
index 013c90f..8c80646 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterAnyList.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterAnyList.java
@@ -35,7 +35,7 @@ package org.apache.airavata.gfac.core.x2012.x12;
public interface AfterAnyList extends org.apache.xmlbeans.XmlObject
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
- org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(AfterAnyList.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("afteranylisteefatype");
+ org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(AfterAnyList.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sD070E302A2FC7CFEA0F2B3EB44FAE57D").resolveHandle("afteranylisteefatype");
/**
* Gets array of all "afterAny" elements
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterOKList.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterOKList.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterOKList.java
index 2bf15f5..15688c1 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterOKList.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/AfterOKList.java
@@ -35,7 +35,7 @@ package org.apache.airavata.gfac.core.x2012.x12;
public interface AfterOKList extends org.apache.xmlbeans.XmlObject
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
- org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(AfterOKList.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("afteroklistc764type");
+ org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(AfterOKList.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sD070E302A2FC7CFEA0F2B3EB44FAE57D").resolveHandle("afteroklistc764type");
/**
* Gets array of all "afterOKList" elements
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ExportProperties.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ExportProperties.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ExportProperties.java
index bee396b..8bea40c 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ExportProperties.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ExportProperties.java
@@ -35,7 +35,7 @@ package org.apache.airavata.gfac.core.x2012.x12;
public interface ExportProperties extends org.apache.xmlbeans.XmlObject
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
- org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(ExportProperties.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("exportproperties2741type");
+ org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(ExportProperties.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sD070E302A2FC7CFEA0F2B3EB44FAE57D").resolveHandle("exportproperties2741type");
/**
* Gets array of all "name" elements
@@ -85,7 +85,7 @@ public interface ExportProperties extends org.apache.xmlbeans.XmlObject
public interface Name extends org.apache.xmlbeans.XmlString
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
- org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Name.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("namee668elemtype");
+ org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Name.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sD070E302A2FC7CFEA0F2B3EB44FAE57D").resolveHandle("namee668elemtype");
/**
* Gets the "value" attribute
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/InputList.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/InputList.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/InputList.java
index 3d4cfbe..3c16f56 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/InputList.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/InputList.java
@@ -35,7 +35,7 @@ package org.apache.airavata.gfac.core.x2012.x12;
public interface InputList extends org.apache.xmlbeans.XmlObject
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
- org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(InputList.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("inputlistccd2type");
+ org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(InputList.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sD070E302A2FC7CFEA0F2B3EB44FAE57D").resolveHandle("inputlistccd2type");
/**
* Gets array of all "input" elements
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/JobDescriptorDocument.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/JobDescriptorDocument.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/JobDescriptorDocument.java
index 5df6f60..49563ae 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/JobDescriptorDocument.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/JobDescriptorDocument.java
@@ -36,7 +36,7 @@ package org.apache.airavata.gfac.core.x2012.x12;
public interface JobDescriptorDocument extends org.apache.xmlbeans.XmlObject
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
- org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(JobDescriptorDocument.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("jobdescriptor217edoctype");
+ org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(JobDescriptorDocument.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sD070E302A2FC7CFEA0F2B3EB44FAE57D").resolveHandle("jobdescriptor217edoctype");
/**
* Gets the "JobDescriptor" element
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ModuleLoadCommands.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ModuleLoadCommands.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ModuleLoadCommands.java
index 520a797..991d6ef 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ModuleLoadCommands.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/ModuleLoadCommands.java
@@ -35,7 +35,7 @@ package org.apache.airavata.gfac.core.x2012.x12;
public interface ModuleLoadCommands extends org.apache.xmlbeans.XmlObject
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
- org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(ModuleLoadCommands.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("moduleloadcommandsfe4etype");
+ org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(ModuleLoadCommands.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sD070E302A2FC7CFEA0F2B3EB44FAE57D").resolveHandle("moduleloadcommandsfe4etype");
/**
* Gets array of all "command" elements
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PbsParams.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PbsParams.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PbsParams.java
index dbba0c2..65d39f2 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PbsParams.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PbsParams.java
@@ -35,7 +35,7 @@ package org.apache.airavata.gfac.core.x2012.x12;
public interface PbsParams extends org.apache.xmlbeans.XmlObject
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
- org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(PbsParams.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("pbsparams7913type");
+ org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(PbsParams.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sD070E302A2FC7CFEA0F2B3EB44FAE57D").resolveHandle("pbsparams7913type");
/**
* Gets the "jobID" element
@@ -1363,6 +1363,66 @@ public interface PbsParams extends org.apache.xmlbeans.XmlObject
void unsetChassisName();
/**
+ * Gets the "qualityOfService" element
+ */
+ java.lang.String getQualityOfService();
+
+ /**
+ * Gets (as xml) the "qualityOfService" element
+ */
+ org.apache.xmlbeans.XmlString xgetQualityOfService();
+
+ /**
+ * True if has "qualityOfService" element
+ */
+ boolean isSetQualityOfService();
+
+ /**
+ * Sets the "qualityOfService" element
+ */
+ void setQualityOfService(java.lang.String qualityOfService);
+
+ /**
+ * Sets (as xml) the "qualityOfService" element
+ */
+ void xsetQualityOfService(org.apache.xmlbeans.XmlString qualityOfService);
+
+ /**
+ * Unsets the "qualityOfService" element
+ */
+ void unsetQualityOfService();
+
+ /**
+ * Gets the "reservation" element
+ */
+ java.lang.String getReservation();
+
+ /**
+ * Gets (as xml) the "reservation" element
+ */
+ org.apache.xmlbeans.XmlString xgetReservation();
+
+ /**
+ * True if has "reservation" element
+ */
+ boolean isSetReservation();
+
+ /**
+ * Sets the "reservation" element
+ */
+ void setReservation(java.lang.String reservation);
+
+ /**
+ * Sets (as xml) the "reservation" element
+ */
+ void xsetReservation(org.apache.xmlbeans.XmlString reservation);
+
+ /**
+ * Unsets the "reservation" element
+ */
+ void unsetReservation();
+
+ /**
* A factory class with static methods for creating instances
* of this type.
*/
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PostJobCommands.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PostJobCommands.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PostJobCommands.java
index d5a1926..512b230 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PostJobCommands.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PostJobCommands.java
@@ -35,7 +35,7 @@ package org.apache.airavata.gfac.core.x2012.x12;
public interface PostJobCommands extends org.apache.xmlbeans.XmlObject
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
- org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(PostJobCommands.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("postjobcommandsf415type");
+ org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(PostJobCommands.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sD070E302A2FC7CFEA0F2B3EB44FAE57D").resolveHandle("postjobcommandsf415type");
/**
* Gets array of all "command" elements
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PreJobCommands.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PreJobCommands.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PreJobCommands.java
index 154f925..a644cb5 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PreJobCommands.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/PreJobCommands.java
@@ -35,7 +35,7 @@ package org.apache.airavata.gfac.core.x2012.x12;
public interface PreJobCommands extends org.apache.xmlbeans.XmlObject
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
- org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(PreJobCommands.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sCF8C40CE6FDA0A41BEE004F5930560FF").resolveHandle("prejobcommands6a26type");
+ org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(PreJobCommands.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sD070E302A2FC7CFEA0F2B3EB44FAE57D").resolveHandle("prejobcommands6a26type");
/**
* Gets array of all "command" elements
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PbsParamsImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PbsParamsImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PbsParamsImpl.java
index 48d5638..cdb348b 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PbsParamsImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/x2012/x12/impl/PbsParamsImpl.java
@@ -131,6 +131,10 @@ public class PbsParamsImpl extends org.apache.xmlbeans.impl.values.XmlComplexCon
new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "callBackPort");
private static final javax.xml.namespace.QName CHASSISNAME$90 =
new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "chassisName");
+ private static final javax.xml.namespace.QName QUALITYOFSERVICE$92 =
+ new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "qualityOfService");
+ private static final javax.xml.namespace.QName RESERVATION$94 =
+ new javax.xml.namespace.QName("http://airavata.apache.org/gfac/core/2012/12", "reservation");
/**
@@ -4190,4 +4194,188 @@ public class PbsParamsImpl extends org.apache.xmlbeans.impl.values.XmlComplexCon
get_store().remove_element(CHASSISNAME$90, 0);
}
}
+
+ /**
+ * Gets the "qualityOfService" element
+ */
+ public java.lang.String getQualityOfService()
+ {
+ synchronized (monitor())
+ {
+ check_orphaned();
+ org.apache.xmlbeans.SimpleValue target = null;
+ target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(QUALITYOFSERVICE$92, 0);
+ if (target == null)
+ {
+ return null;
+ }
+ return target.getStringValue();
+ }
+ }
+
+ /**
+ * Gets (as xml) the "qualityOfService" element
+ */
+ public org.apache.xmlbeans.XmlString xgetQualityOfService()
+ {
+ synchronized (monitor())
+ {
+ check_orphaned();
+ org.apache.xmlbeans.XmlString target = null;
+ target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(QUALITYOFSERVICE$92, 0);
+ return target;
+ }
+ }
+
+ /**
+ * True if has "qualityOfService" element
+ */
+ public boolean isSetQualityOfService()
+ {
+ synchronized (monitor())
+ {
+ check_orphaned();
+ return get_store().count_elements(QUALITYOFSERVICE$92) != 0;
+ }
+ }
+
+ /**
+ * Sets the "qualityOfService" element
+ */
+ public void setQualityOfService(java.lang.String qualityOfService)
+ {
+ synchronized (monitor())
+ {
+ check_orphaned();
+ org.apache.xmlbeans.SimpleValue target = null;
+ target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(QUALITYOFSERVICE$92, 0);
+ if (target == null)
+ {
+ target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(QUALITYOFSERVICE$92);
+ }
+ target.setStringValue(qualityOfService);
+ }
+ }
+
+ /**
+ * Sets (as xml) the "qualityOfService" element
+ */
+ public void xsetQualityOfService(org.apache.xmlbeans.XmlString qualityOfService)
+ {
+ synchronized (monitor())
+ {
+ check_orphaned();
+ org.apache.xmlbeans.XmlString target = null;
+ target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(QUALITYOFSERVICE$92, 0);
+ if (target == null)
+ {
+ target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(QUALITYOFSERVICE$92);
+ }
+ target.set(qualityOfService);
+ }
+ }
+
+ /**
+ * Unsets the "qualityOfService" element
+ */
+ public void unsetQualityOfService()
+ {
+ synchronized (monitor())
+ {
+ check_orphaned();
+ get_store().remove_element(QUALITYOFSERVICE$92, 0);
+ }
+ }
+
+ /**
+ * Gets the "reservation" element
+ */
+ public java.lang.String getReservation()
+ {
+ synchronized (monitor())
+ {
+ check_orphaned();
+ org.apache.xmlbeans.SimpleValue target = null;
+ target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RESERVATION$94, 0);
+ if (target == null)
+ {
+ return null;
+ }
+ return target.getStringValue();
+ }
+ }
+
+ /**
+ * Gets (as xml) the "reservation" element
+ */
+ public org.apache.xmlbeans.XmlString xgetReservation()
+ {
+ synchronized (monitor())
+ {
+ check_orphaned();
+ org.apache.xmlbeans.XmlString target = null;
+ target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(RESERVATION$94, 0);
+ return target;
+ }
+ }
+
+ /**
+ * True if has "reservation" element
+ */
+ public boolean isSetReservation()
+ {
+ synchronized (monitor())
+ {
+ check_orphaned();
+ return get_store().count_elements(RESERVATION$94) != 0;
+ }
+ }
+
+ /**
+ * Sets the "reservation" element
+ */
+ public void setReservation(java.lang.String reservation)
+ {
+ synchronized (monitor())
+ {
+ check_orphaned();
+ org.apache.xmlbeans.SimpleValue target = null;
+ target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RESERVATION$94, 0);
+ if (target == null)
+ {
+ target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(RESERVATION$94);
+ }
+ target.setStringValue(reservation);
+ }
+ }
+
+ /**
+ * Sets (as xml) the "reservation" element
+ */
+ public void xsetReservation(org.apache.xmlbeans.XmlString reservation)
+ {
+ synchronized (monitor())
+ {
+ check_orphaned();
+ org.apache.xmlbeans.XmlString target = null;
+ target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(RESERVATION$94, 0);
+ if (target == null)
+ {
+ target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(RESERVATION$94);
+ }
+ target.set(reservation);
+ }
+ }
+
+ /**
+ * Unsets the "reservation" element
+ */
+ public void unsetReservation()
+ {
+ synchronized (monitor())
+ {
+ check_orphaned();
+ get_store().remove_element(RESERVATION$94, 0);
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-core/src/main/resources/PBSJobDescriptor.xsd
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/resources/PBSJobDescriptor.xsd b/modules/gfac/gfac-core/src/main/resources/PBSJobDescriptor.xsd
index 966dafb..e9e6882 100644
--- a/modules/gfac/gfac-core/src/main/resources/PBSJobDescriptor.xsd
+++ b/modules/gfac/gfac-core/src/main/resources/PBSJobDescriptor.xsd
@@ -60,6 +60,8 @@
<element name="callBackIp" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="callBackPort" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="chassisName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ <element name="qualityOfService" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ <element name="reservation" type="xsd:string" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/modules/gfac/gfac-impl/src/main/resources/SLURMTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/resources/SLURMTemplate.xslt b/modules/gfac/gfac-impl/src/main/resources/SLURMTemplate.xslt
index 4a62722..c82c13c 100644
--- a/modules/gfac/gfac-impl/src/main/resources/SLURMTemplate.xslt
+++ b/modules/gfac/gfac-impl/src/main/resources/SLURMTemplate.xslt
@@ -63,6 +63,16 @@
#SBATCH -e <xsl:value-of select="ns:standardErrorFile"/>
</xsl:when>
</xsl:choose>
+ <xsl:choose>
+ <xsl:when test="ns:qualityOfService">
+#SBATCH --qos=<xsl:value-of select="ns:qualityOfService"/>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="ns:reservation">
+#SBATCH --reservation=<xsl:value-of select="ns:reservation"/>
+ </xsl:when>
+ </xsl:choose>
<xsl:for-each select="ns:preJobCommands/ns:command">
<xsl:text>
</xsl:text>
<xsl:value-of select="."/><xsl:text> </xsl:text>
@@ -75,4 +85,4 @@ cd <xsl:text> </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text
</xsl:for-each>
</xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
http://git-wip-us.apache.org/repos/asf/airavata/blob/f831fedf/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 1df7df5..d1b258c 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
@@ -71,7 +71,10 @@ struct ComputeResourcePreference {
8: optional string allocationProjectNumber,
9: optional string resourceSpecificCredentialStoreToken,
10: optional string usageReportingGatewayId,
- 11: optional string allocations
+ 11: optional string qualityOfService,
+ 12: optional string reservation,
+ 13: optional i64 reservationStartTime,
+ 14: optional i64 reservationEndTime
}
struct StoragePreference {