You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ms...@apache.org on 2015/03/10 16:53:30 UTC
airavata git commit: generated thrift files
Repository: airavata
Updated Branches:
refs/heads/master 8d3b1374a -> 7883eb971
generated thrift files
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/7883eb97
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/7883eb97
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/7883eb97
Branch: refs/heads/master
Commit: 7883eb971f8c468698a15bd7c7317c14530efaa7
Parents: 8d3b137
Author: msmemon <sh...@gmail.com>
Authored: Tue Mar 10 16:52:24 2015 +0100
Committer: msmemon <sh...@gmail.com>
Committed: Tue Mar 10 16:52:24 2015 +0100
----------------------------------------------------------------------
.../lib/airavata/computeResourceModel_types.cpp | 203 ++++++++++-------
.../lib/airavata/computeResourceModel_types.h | 38 +++-
.../Model/AppCatalog/ComputeResource/Types.php | 49 ++++
.../computeresource/UnicoreJobSubmission.java | 222 ++++++++++++++++++-
.../computeResourceModel.thrift | 26 ++-
5 files changed, 441 insertions(+), 97 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/7883eb97/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
index d54c519..4d52172 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
@@ -137,6 +137,16 @@ const char* _kDataMovementProtocolNames[] = {
};
const std::map<int, const char*> _DataMovementProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kDataMovementProtocolValues, _kDataMovementProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+int _kAuthenticationModeValues[] = {
+ AuthenticationMode::SERVER_ISSUED,
+ AuthenticationMode::MYPROXY_ISSUED
+};
+const char* _kAuthenticationModeNames[] = {
+ "SERVER_ISSUED",
+ "MYPROXY_ISSUED"
+};
+const std::map<int, const char*> _AuthenticationMode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kAuthenticationModeValues, _kAuthenticationModeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
int _kProviderNameValues[] = {
ProviderName::EC2,
ProviderName::AWSEC2,
@@ -1180,8 +1190,8 @@ void swap(GlobusJobSubmission &a, GlobusJobSubmission &b) {
swap(a.__isset, b.__isset);
}
-const char* UnicoreJobSubmission::ascii_fingerprint = "D9F4CFE2F293A8B1052FD3031DD2C847";
-const uint8_t UnicoreJobSubmission::binary_fingerprint[16] = {0xD9,0xF4,0xCF,0xE2,0xF2,0x93,0xA8,0xB1,0x05,0x2F,0xD3,0x03,0x1D,0xD2,0xC8,0x47};
+const char* UnicoreJobSubmission::ascii_fingerprint = "06B870319715692996F28828C4AF836C";
+const uint8_t UnicoreJobSubmission::binary_fingerprint[16] = {0x06,0xB8,0x70,0x31,0x97,0x15,0x69,0x29,0x96,0xF2,0x88,0x28,0xC4,0xAF,0x83,0x6C};
uint32_t UnicoreJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -1197,6 +1207,7 @@ uint32_t UnicoreJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot
bool isset_jobSubmissionInterfaceId = false;
bool isset_securityProtocol = false;
bool isset_unicoreEndPointURL = false;
+ bool isset_authenticationMode = false;
while (true)
{
@@ -1232,6 +1243,24 @@ uint32_t UnicoreJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot
xfer += iprot->skip(ftype);
}
break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast29;
+ xfer += iprot->readI32(ecast29);
+ this->authenticationMode = (AuthenticationMode::type)ecast29;
+ isset_authenticationMode = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->userDN);
+ this->__isset.userDN = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -1247,6 +1276,8 @@ uint32_t UnicoreJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_unicoreEndPointURL)
throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_authenticationMode)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
@@ -1266,6 +1297,15 @@ uint32_t UnicoreJobSubmission::write(::apache::thrift::protocol::TProtocol* opro
xfer += oprot->writeString(this->unicoreEndPointURL);
xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("authenticationMode", ::apache::thrift::protocol::T_I32, 4);
+ xfer += oprot->writeI32((int32_t)this->authenticationMode);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.userDN) {
+ xfer += oprot->writeFieldBegin("userDN", ::apache::thrift::protocol::T_STRING, 5);
+ xfer += oprot->writeString(this->userDN);
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -1276,6 +1316,9 @@ void swap(UnicoreJobSubmission &a, UnicoreJobSubmission &b) {
swap(a.jobSubmissionInterfaceId, b.jobSubmissionInterfaceId);
swap(a.securityProtocol, b.securityProtocol);
swap(a.unicoreEndPointURL, b.unicoreEndPointURL);
+ swap(a.authenticationMode, b.authenticationMode);
+ swap(a.userDN, b.userDN);
+ swap(a.__isset, b.__isset);
}
const char* CloudJobSubmission::ascii_fingerprint = "F98AE2E6E51F2426504F2566EB71B5CC";
@@ -1317,9 +1360,9 @@ uint32_t CloudJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast29;
- xfer += iprot->readI32(ecast29);
- this->securityProtocol = (SecurityProtocol::type)ecast29;
+ int32_t ecast30;
+ xfer += iprot->readI32(ecast30);
+ this->securityProtocol = (SecurityProtocol::type)ecast30;
isset_securityProtocol = true;
} else {
xfer += iprot->skip(ftype);
@@ -1343,9 +1386,9 @@ uint32_t CloudJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast30;
- xfer += iprot->readI32(ecast30);
- this->providerName = (ProviderName::type)ecast30;
+ int32_t ecast31;
+ xfer += iprot->readI32(ecast31);
+ this->providerName = (ProviderName::type)ecast31;
isset_providerName = true;
} else {
xfer += iprot->skip(ftype);
@@ -1462,9 +1505,9 @@ uint32_t JobSubmissionInterface::read(::apache::thrift::protocol::TProtocol* ipr
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast31;
- xfer += iprot->readI32(ecast31);
- this->jobSubmissionProtocol = (JobSubmissionProtocol::type)ecast31;
+ int32_t ecast32;
+ xfer += iprot->readI32(ecast32);
+ this->jobSubmissionProtocol = (JobSubmissionProtocol::type)ecast32;
isset_jobSubmissionProtocol = true;
} else {
xfer += iprot->skip(ftype);
@@ -1560,9 +1603,9 @@ uint32_t DataMovementInterface::read(::apache::thrift::protocol::TProtocol* ipro
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast32;
- xfer += iprot->readI32(ecast32);
- this->dataMovementProtocol = (DataMovementProtocol::type)ecast32;
+ int32_t ecast33;
+ xfer += iprot->readI32(ecast33);
+ this->dataMovementProtocol = (DataMovementProtocol::type)ecast33;
isset_dataMovementProtocol = true;
} else {
xfer += iprot->skip(ftype);
@@ -1667,14 +1710,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->hostAliases.clear();
- uint32_t _size33;
- ::apache::thrift::protocol::TType _etype36;
- xfer += iprot->readListBegin(_etype36, _size33);
- this->hostAliases.resize(_size33);
- uint32_t _i37;
- for (_i37 = 0; _i37 < _size33; ++_i37)
+ uint32_t _size34;
+ ::apache::thrift::protocol::TType _etype37;
+ xfer += iprot->readListBegin(_etype37, _size34);
+ this->hostAliases.resize(_size34);
+ uint32_t _i38;
+ for (_i38 = 0; _i38 < _size34; ++_i38)
{
- xfer += iprot->readString(this->hostAliases[_i37]);
+ xfer += iprot->readString(this->hostAliases[_i38]);
}
xfer += iprot->readListEnd();
}
@@ -1687,14 +1730,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->ipAddresses.clear();
- uint32_t _size38;
- ::apache::thrift::protocol::TType _etype41;
- xfer += iprot->readListBegin(_etype41, _size38);
- this->ipAddresses.resize(_size38);
- uint32_t _i42;
- for (_i42 = 0; _i42 < _size38; ++_i42)
+ uint32_t _size39;
+ ::apache::thrift::protocol::TType _etype42;
+ xfer += iprot->readListBegin(_etype42, _size39);
+ this->ipAddresses.resize(_size39);
+ uint32_t _i43;
+ for (_i43 = 0; _i43 < _size39; ++_i43)
{
- xfer += iprot->readString(this->ipAddresses[_i42]);
+ xfer += iprot->readString(this->ipAddresses[_i43]);
}
xfer += iprot->readListEnd();
}
@@ -1715,14 +1758,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->batchQueues.clear();
- uint32_t _size43;
- ::apache::thrift::protocol::TType _etype46;
- xfer += iprot->readListBegin(_etype46, _size43);
- this->batchQueues.resize(_size43);
- uint32_t _i47;
- for (_i47 = 0; _i47 < _size43; ++_i47)
+ uint32_t _size44;
+ ::apache::thrift::protocol::TType _etype47;
+ xfer += iprot->readListBegin(_etype47, _size44);
+ this->batchQueues.resize(_size44);
+ uint32_t _i48;
+ for (_i48 = 0; _i48 < _size44; ++_i48)
{
- xfer += this->batchQueues[_i47].read(iprot);
+ xfer += this->batchQueues[_i48].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -1735,19 +1778,19 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->fileSystems.clear();
- uint32_t _size48;
- ::apache::thrift::protocol::TType _ktype49;
- ::apache::thrift::protocol::TType _vtype50;
- xfer += iprot->readMapBegin(_ktype49, _vtype50, _size48);
- uint32_t _i52;
- for (_i52 = 0; _i52 < _size48; ++_i52)
+ uint32_t _size49;
+ ::apache::thrift::protocol::TType _ktype50;
+ ::apache::thrift::protocol::TType _vtype51;
+ xfer += iprot->readMapBegin(_ktype50, _vtype51, _size49);
+ uint32_t _i53;
+ for (_i53 = 0; _i53 < _size49; ++_i53)
{
- FileSystems::type _key53;
- int32_t ecast55;
- xfer += iprot->readI32(ecast55);
- _key53 = (FileSystems::type)ecast55;
- std::string& _val54 = this->fileSystems[_key53];
- xfer += iprot->readString(_val54);
+ FileSystems::type _key54;
+ int32_t ecast56;
+ xfer += iprot->readI32(ecast56);
+ _key54 = (FileSystems::type)ecast56;
+ std::string& _val55 = this->fileSystems[_key54];
+ xfer += iprot->readString(_val55);
}
xfer += iprot->readMapEnd();
}
@@ -1760,14 +1803,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->jobSubmissionInterfaces.clear();
- uint32_t _size56;
- ::apache::thrift::protocol::TType _etype59;
- xfer += iprot->readListBegin(_etype59, _size56);
- this->jobSubmissionInterfaces.resize(_size56);
- uint32_t _i60;
- for (_i60 = 0; _i60 < _size56; ++_i60)
+ uint32_t _size57;
+ ::apache::thrift::protocol::TType _etype60;
+ xfer += iprot->readListBegin(_etype60, _size57);
+ this->jobSubmissionInterfaces.resize(_size57);
+ uint32_t _i61;
+ for (_i61 = 0; _i61 < _size57; ++_i61)
{
- xfer += this->jobSubmissionInterfaces[_i60].read(iprot);
+ xfer += this->jobSubmissionInterfaces[_i61].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -1780,14 +1823,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->dataMovementInterfaces.clear();
- uint32_t _size61;
- ::apache::thrift::protocol::TType _etype64;
- xfer += iprot->readListBegin(_etype64, _size61);
- this->dataMovementInterfaces.resize(_size61);
- uint32_t _i65;
- for (_i65 = 0; _i65 < _size61; ++_i65)
+ uint32_t _size62;
+ ::apache::thrift::protocol::TType _etype65;
+ xfer += iprot->readListBegin(_etype65, _size62);
+ this->dataMovementInterfaces.resize(_size62);
+ uint32_t _i66;
+ for (_i66 = 0; _i66 < _size62; ++_i66)
{
- xfer += this->dataMovementInterfaces[_i65].read(iprot);
+ xfer += this->dataMovementInterfaces[_i66].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -1836,10 +1879,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("hostAliases", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->hostAliases.size()));
- std::vector<std::string> ::const_iterator _iter66;
- for (_iter66 = this->hostAliases.begin(); _iter66 != this->hostAliases.end(); ++_iter66)
+ std::vector<std::string> ::const_iterator _iter67;
+ for (_iter67 = this->hostAliases.begin(); _iter67 != this->hostAliases.end(); ++_iter67)
{
- xfer += oprot->writeString((*_iter66));
+ xfer += oprot->writeString((*_iter67));
}
xfer += oprot->writeListEnd();
}
@@ -1849,10 +1892,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("ipAddresses", ::apache::thrift::protocol::T_LIST, 4);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->ipAddresses.size()));
- std::vector<std::string> ::const_iterator _iter67;
- for (_iter67 = this->ipAddresses.begin(); _iter67 != this->ipAddresses.end(); ++_iter67)
+ std::vector<std::string> ::const_iterator _iter68;
+ for (_iter68 = this->ipAddresses.begin(); _iter68 != this->ipAddresses.end(); ++_iter68)
{
- xfer += oprot->writeString((*_iter67));
+ xfer += oprot->writeString((*_iter68));
}
xfer += oprot->writeListEnd();
}
@@ -1867,10 +1910,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("batchQueues", ::apache::thrift::protocol::T_LIST, 6);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->batchQueues.size()));
- std::vector<BatchQueue> ::const_iterator _iter68;
- for (_iter68 = this->batchQueues.begin(); _iter68 != this->batchQueues.end(); ++_iter68)
+ std::vector<BatchQueue> ::const_iterator _iter69;
+ for (_iter69 = this->batchQueues.begin(); _iter69 != this->batchQueues.end(); ++_iter69)
{
- xfer += (*_iter68).write(oprot);
+ xfer += (*_iter69).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -1880,11 +1923,11 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("fileSystems", ::apache::thrift::protocol::T_MAP, 7);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->fileSystems.size()));
- std::map<FileSystems::type, std::string> ::const_iterator _iter69;
- for (_iter69 = this->fileSystems.begin(); _iter69 != this->fileSystems.end(); ++_iter69)
+ std::map<FileSystems::type, std::string> ::const_iterator _iter70;
+ for (_iter70 = this->fileSystems.begin(); _iter70 != this->fileSystems.end(); ++_iter70)
{
- xfer += oprot->writeI32((int32_t)_iter69->first);
- xfer += oprot->writeString(_iter69->second);
+ xfer += oprot->writeI32((int32_t)_iter70->first);
+ xfer += oprot->writeString(_iter70->second);
}
xfer += oprot->writeMapEnd();
}
@@ -1894,10 +1937,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("jobSubmissionInterfaces", ::apache::thrift::protocol::T_LIST, 8);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->jobSubmissionInterfaces.size()));
- std::vector<JobSubmissionInterface> ::const_iterator _iter70;
- for (_iter70 = this->jobSubmissionInterfaces.begin(); _iter70 != this->jobSubmissionInterfaces.end(); ++_iter70)
+ std::vector<JobSubmissionInterface> ::const_iterator _iter71;
+ for (_iter71 = this->jobSubmissionInterfaces.begin(); _iter71 != this->jobSubmissionInterfaces.end(); ++_iter71)
{
- xfer += (*_iter70).write(oprot);
+ xfer += (*_iter71).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -1907,10 +1950,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("dataMovementInterfaces", ::apache::thrift::protocol::T_LIST, 9);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->dataMovementInterfaces.size()));
- std::vector<DataMovementInterface> ::const_iterator _iter71;
- for (_iter71 = this->dataMovementInterfaces.begin(); _iter71 != this->dataMovementInterfaces.end(); ++_iter71)
+ std::vector<DataMovementInterface> ::const_iterator _iter72;
+ for (_iter72 = this->dataMovementInterfaces.begin(); _iter72 != this->dataMovementInterfaces.end(); ++_iter72)
{
- xfer += (*_iter71).write(oprot);
+ xfer += (*_iter72).write(oprot);
}
xfer += oprot->writeListEnd();
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7883eb97/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
index 76037b2..b1b70d5 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
@@ -117,6 +117,15 @@ struct DataMovementProtocol {
extern const std::map<int, const char*> _DataMovementProtocol_VALUES_TO_NAMES;
+struct AuthenticationMode {
+ enum type {
+ SERVER_ISSUED = 0,
+ MYPROXY_ISSUED = 1
+ };
+};
+
+extern const std::map<int, const char*> _AuthenticationMode_VALUES_TO_NAMES;
+
struct ProviderName {
enum type {
EC2 = 0,
@@ -720,14 +729,18 @@ class GlobusJobSubmission {
void swap(GlobusJobSubmission &a, GlobusJobSubmission &b);
+typedef struct _UnicoreJobSubmission__isset {
+ _UnicoreJobSubmission__isset() : userDN(false) {}
+ bool userDN;
+} _UnicoreJobSubmission__isset;
class UnicoreJobSubmission {
public:
- static const char* ascii_fingerprint; // = "D9F4CFE2F293A8B1052FD3031DD2C847";
- static const uint8_t binary_fingerprint[16]; // = {0xD9,0xF4,0xCF,0xE2,0xF2,0x93,0xA8,0xB1,0x05,0x2F,0xD3,0x03,0x1D,0xD2,0xC8,0x47};
+ static const char* ascii_fingerprint; // = "06B870319715692996F28828C4AF836C";
+ static const uint8_t binary_fingerprint[16]; // = {0x06,0xB8,0x70,0x31,0x97,0x15,0x69,0x29,0x96,0xF2,0x88,0x28,0xC4,0xAF,0x83,0x6C};
- UnicoreJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), unicoreEndPointURL() {
+ UnicoreJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), unicoreEndPointURL(), authenticationMode((AuthenticationMode::type)0), userDN() {
}
virtual ~UnicoreJobSubmission() throw() {}
@@ -735,6 +748,10 @@ class UnicoreJobSubmission {
std::string jobSubmissionInterfaceId;
SecurityProtocol::type securityProtocol;
std::string unicoreEndPointURL;
+ AuthenticationMode::type authenticationMode;
+ std::string userDN;
+
+ _UnicoreJobSubmission__isset __isset;
void __set_jobSubmissionInterfaceId(const std::string& val) {
jobSubmissionInterfaceId = val;
@@ -748,6 +765,15 @@ class UnicoreJobSubmission {
unicoreEndPointURL = val;
}
+ void __set_authenticationMode(const AuthenticationMode::type val) {
+ authenticationMode = val;
+ }
+
+ void __set_userDN(const std::string& val) {
+ userDN = val;
+ __isset.userDN = true;
+ }
+
bool operator == (const UnicoreJobSubmission & rhs) const
{
if (!(jobSubmissionInterfaceId == rhs.jobSubmissionInterfaceId))
@@ -756,6 +782,12 @@ class UnicoreJobSubmission {
return false;
if (!(unicoreEndPointURL == rhs.unicoreEndPointURL))
return false;
+ if (!(authenticationMode == rhs.authenticationMode))
+ return false;
+ if (__isset.userDN != rhs.__isset.userDN)
+ return false;
+ else if (__isset.userDN && !(userDN == rhs.userDN))
+ return false;
return true;
}
bool operator != (const UnicoreJobSubmission &rhs) const {
http://git-wip-us.apache.org/repos/asf/airavata/blob/7883eb97/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
index 2280d94..9bfced0 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
@@ -120,6 +120,15 @@ final class DataMovementProtocol {
);
}
+final class AuthenticationMode {
+ const SERVER_ISSUED = 0;
+ const MYPROXY_ISSUED = 1;
+ static public $__names = array(
+ 0 => 'SERVER_ISSUED',
+ 1 => 'MYPROXY_ISSUED',
+ );
+}
+
final class ProviderName {
const EC2 = 0;
const AWSEC2 = 1;
@@ -1381,6 +1390,8 @@ class UnicoreJobSubmission {
public $jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS";
public $securityProtocol = null;
public $unicoreEndPointURL = null;
+ public $authenticationMode = null;
+ public $userDN = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -1397,6 +1408,14 @@ class UnicoreJobSubmission {
'var' => 'unicoreEndPointURL',
'type' => TType::STRING,
),
+ 4 => array(
+ 'var' => 'authenticationMode',
+ 'type' => TType::I32,
+ ),
+ 5 => array(
+ 'var' => 'userDN',
+ 'type' => TType::STRING,
+ ),
);
}
if (is_array($vals)) {
@@ -1409,6 +1428,12 @@ class UnicoreJobSubmission {
if (isset($vals['unicoreEndPointURL'])) {
$this->unicoreEndPointURL = $vals['unicoreEndPointURL'];
}
+ if (isset($vals['authenticationMode'])) {
+ $this->authenticationMode = $vals['authenticationMode'];
+ }
+ if (isset($vals['userDN'])) {
+ $this->userDN = $vals['userDN'];
+ }
}
}
@@ -1452,6 +1477,20 @@ class UnicoreJobSubmission {
$xfer += $input->skip($ftype);
}
break;
+ case 4:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->authenticationMode);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->userDN);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -1480,6 +1519,16 @@ class UnicoreJobSubmission {
$xfer += $output->writeString($this->unicoreEndPointURL);
$xfer += $output->writeFieldEnd();
}
+ if ($this->authenticationMode !== null) {
+ $xfer += $output->writeFieldBegin('authenticationMode', TType::I32, 4);
+ $xfer += $output->writeI32($this->authenticationMode);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->userDN !== null) {
+ $xfer += $output->writeFieldBegin('userDN', TType::STRING, 5);
+ $xfer += $output->writeString($this->userDN);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
http://git-wip-us.apache.org/repos/asf/airavata/blob/7883eb97/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
index 9a3ed90..d65ec86 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
@@ -54,6 +54,11 @@ import org.slf4j.LoggerFactory;
*
* unicoreEndPointURL:
* unicoreGateway End Point. The provider will query this service to fetch required service end points.
+ * authenticationMode
+ * The authenticationMode defines the way certificate is fetched.
+ * userDN
+ * This attribute captures the userDN used for launching jobs and create temporary storages. The attribute should be
+ * provided if the authentication mode is set as SERVER_ISSUED.
*/
@SuppressWarnings("all") public class UnicoreJobSubmission implements org.apache.thrift.TBase<UnicoreJobSubmission, UnicoreJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<UnicoreJobSubmission> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnicoreJobSubmission");
@@ -61,6 +66,8 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField UNICORE_END_POINT_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("unicoreEndPointURL", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField AUTHENTICATION_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("authenticationMode", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final org.apache.thrift.protocol.TField USER_DN_FIELD_DESC = new org.apache.thrift.protocol.TField("userDN", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -71,6 +78,8 @@ import org.slf4j.LoggerFactory;
private String jobSubmissionInterfaceId; // required
private SecurityProtocol securityProtocol; // required
private String unicoreEndPointURL; // required
+ private AuthenticationMode authenticationMode; // required
+ private String userDN; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -80,7 +89,13 @@ import org.slf4j.LoggerFactory;
* @see SecurityProtocol
*/
SECURITY_PROTOCOL((short)2, "securityProtocol"),
- UNICORE_END_POINT_URL((short)3, "unicoreEndPointURL");
+ UNICORE_END_POINT_URL((short)3, "unicoreEndPointURL"),
+ /**
+ *
+ * @see AuthenticationMode
+ */
+ AUTHENTICATION_MODE((short)4, "authenticationMode"),
+ USER_DN((short)5, "userDN");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -101,6 +116,10 @@ import org.slf4j.LoggerFactory;
return SECURITY_PROTOCOL;
case 3: // UNICORE_END_POINT_URL
return UNICORE_END_POINT_URL;
+ case 4: // AUTHENTICATION_MODE
+ return AUTHENTICATION_MODE;
+ case 5: // USER_DN
+ return USER_DN;
default:
return null;
}
@@ -141,6 +160,7 @@ import org.slf4j.LoggerFactory;
}
// isset id assignments
+ private _Fields optionals[] = {_Fields.USER_DN};
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);
@@ -150,6 +170,10 @@ import org.slf4j.LoggerFactory;
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SecurityProtocol.class)));
tmpMap.put(_Fields.UNICORE_END_POINT_URL, new org.apache.thrift.meta_data.FieldMetaData("unicoreEndPointURL", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.AUTHENTICATION_MODE, new org.apache.thrift.meta_data.FieldMetaData("authenticationMode", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AuthenticationMode.class)));
+ tmpMap.put(_Fields.USER_DN, new org.apache.thrift.meta_data.FieldMetaData("userDN", 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(UnicoreJobSubmission.class, metaDataMap);
}
@@ -162,12 +186,14 @@ import org.slf4j.LoggerFactory;
public UnicoreJobSubmission(
String jobSubmissionInterfaceId,
SecurityProtocol securityProtocol,
- String unicoreEndPointURL)
+ String unicoreEndPointURL,
+ AuthenticationMode authenticationMode)
{
this();
this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
this.securityProtocol = securityProtocol;
this.unicoreEndPointURL = unicoreEndPointURL;
+ this.authenticationMode = authenticationMode;
}
/**
@@ -183,6 +209,12 @@ import org.slf4j.LoggerFactory;
if (other.isSetUnicoreEndPointURL()) {
this.unicoreEndPointURL = other.unicoreEndPointURL;
}
+ if (other.isSetAuthenticationMode()) {
+ this.authenticationMode = other.authenticationMode;
+ }
+ if (other.isSetUserDN()) {
+ this.userDN = other.userDN;
+ }
}
public UnicoreJobSubmission deepCopy() {
@@ -195,6 +227,8 @@ import org.slf4j.LoggerFactory;
this.securityProtocol = null;
this.unicoreEndPointURL = null;
+ this.authenticationMode = null;
+ this.userDN = null;
}
public String getJobSubmissionInterfaceId() {
@@ -274,6 +308,60 @@ import org.slf4j.LoggerFactory;
}
}
+ /**
+ *
+ * @see AuthenticationMode
+ */
+ public AuthenticationMode getAuthenticationMode() {
+ return this.authenticationMode;
+ }
+
+ /**
+ *
+ * @see AuthenticationMode
+ */
+ public void setAuthenticationMode(AuthenticationMode authenticationMode) {
+ this.authenticationMode = authenticationMode;
+ }
+
+ public void unsetAuthenticationMode() {
+ this.authenticationMode = null;
+ }
+
+ /** Returns true if field authenticationMode is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthenticationMode() {
+ return this.authenticationMode != null;
+ }
+
+ public void setAuthenticationModeIsSet(boolean value) {
+ if (!value) {
+ this.authenticationMode = null;
+ }
+ }
+
+ public String getUserDN() {
+ return this.userDN;
+ }
+
+ public void setUserDN(String userDN) {
+ this.userDN = userDN;
+ }
+
+ public void unsetUserDN() {
+ this.userDN = null;
+ }
+
+ /** Returns true if field userDN is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserDN() {
+ return this.userDN != null;
+ }
+
+ public void setUserDNIsSet(boolean value) {
+ if (!value) {
+ this.userDN = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case JOB_SUBMISSION_INTERFACE_ID:
@@ -300,6 +388,22 @@ import org.slf4j.LoggerFactory;
}
break;
+ case AUTHENTICATION_MODE:
+ if (value == null) {
+ unsetAuthenticationMode();
+ } else {
+ setAuthenticationMode((AuthenticationMode)value);
+ }
+ break;
+
+ case USER_DN:
+ if (value == null) {
+ unsetUserDN();
+ } else {
+ setUserDN((String)value);
+ }
+ break;
+
}
}
@@ -314,6 +418,12 @@ import org.slf4j.LoggerFactory;
case UNICORE_END_POINT_URL:
return getUnicoreEndPointURL();
+ case AUTHENTICATION_MODE:
+ return getAuthenticationMode();
+
+ case USER_DN:
+ return getUserDN();
+
}
throw new IllegalStateException();
}
@@ -331,6 +441,10 @@ import org.slf4j.LoggerFactory;
return isSetSecurityProtocol();
case UNICORE_END_POINT_URL:
return isSetUnicoreEndPointURL();
+ case AUTHENTICATION_MODE:
+ return isSetAuthenticationMode();
+ case USER_DN:
+ return isSetUserDN();
}
throw new IllegalStateException();
}
@@ -375,6 +489,24 @@ import org.slf4j.LoggerFactory;
return false;
}
+ boolean this_present_authenticationMode = true && this.isSetAuthenticationMode();
+ boolean that_present_authenticationMode = true && that.isSetAuthenticationMode();
+ if (this_present_authenticationMode || that_present_authenticationMode) {
+ if (!(this_present_authenticationMode && that_present_authenticationMode))
+ return false;
+ if (!this.authenticationMode.equals(that.authenticationMode))
+ return false;
+ }
+
+ boolean this_present_userDN = true && this.isSetUserDN();
+ boolean that_present_userDN = true && that.isSetUserDN();
+ if (this_present_userDN || that_present_userDN) {
+ if (!(this_present_userDN && that_present_userDN))
+ return false;
+ if (!this.userDN.equals(that.userDN))
+ return false;
+ }
+
return true;
}
@@ -421,6 +553,26 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetAuthenticationMode()).compareTo(other.isSetAuthenticationMode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthenticationMode()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authenticationMode, other.authenticationMode);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserDN()).compareTo(other.isSetUserDN());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserDN()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userDN, other.userDN);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -464,6 +616,24 @@ import org.slf4j.LoggerFactory;
sb.append(this.unicoreEndPointURL);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("authenticationMode:");
+ if (this.authenticationMode == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authenticationMode);
+ }
+ first = false;
+ if (isSetUserDN()) {
+ if (!first) sb.append(", ");
+ sb.append("userDN:");
+ if (this.userDN == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userDN);
+ }
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -482,6 +652,10 @@ import org.slf4j.LoggerFactory;
throw new org.apache.thrift.protocol.TProtocolException("Required field 'unicoreEndPointURL' is unset! Struct:" + toString());
}
+ if (!isSetAuthenticationMode()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'authenticationMode' is unset! Struct:" + toString());
+ }
+
// check for sub-struct validity
}
@@ -543,6 +717,22 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 4: // AUTHENTICATION_MODE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.authenticationMode = AuthenticationMode.findByValue(iprot.readI32());
+ struct.setAuthenticationModeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // USER_DN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userDN = iprot.readString();
+ struct.setUserDNIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -571,6 +761,18 @@ import org.slf4j.LoggerFactory;
oprot.writeString(struct.unicoreEndPointURL);
oprot.writeFieldEnd();
}
+ if (struct.authenticationMode != null) {
+ oprot.writeFieldBegin(AUTHENTICATION_MODE_FIELD_DESC);
+ oprot.writeI32(struct.authenticationMode.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.userDN != null) {
+ if (struct.isSetUserDN()) {
+ oprot.writeFieldBegin(USER_DN_FIELD_DESC);
+ oprot.writeString(struct.userDN);
+ oprot.writeFieldEnd();
+ }
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -591,6 +793,15 @@ import org.slf4j.LoggerFactory;
oprot.writeString(struct.jobSubmissionInterfaceId);
oprot.writeI32(struct.securityProtocol.getValue());
oprot.writeString(struct.unicoreEndPointURL);
+ oprot.writeI32(struct.authenticationMode.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserDN()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetUserDN()) {
+ oprot.writeString(struct.userDN);
+ }
}
@Override
@@ -602,6 +813,13 @@ import org.slf4j.LoggerFactory;
struct.setSecurityProtocolIsSet(true);
struct.unicoreEndPointURL = iprot.readString();
struct.setUnicoreEndPointURLIsSet(true);
+ struct.authenticationMode = AuthenticationMode.findByValue(iprot.readI32());
+ struct.setAuthenticationModeIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.userDN = iprot.readString();
+ struct.setUserDNIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7883eb97/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
index 8e89908..9bf1b72 100644
--- a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
@@ -329,6 +329,20 @@ struct GlobusJobSubmission {
}
/**
+ * AuthenticationMode
+ *
+ * SERVER_ISSUED: use CA credentials to generate a certificate based on user name.
+ * server properties.
+ * MYPROXY_ISSUED: rely on GSI method implementation already provided
+ * by Airavata security libs.
+*/
+enum AuthenticationMode {
+ SERVER_ISSUED,
+ MYPROXY_ISSUED
+}
+
+
+/**
* Unicore Job Submission
*
* unicoreEndPointURL:
@@ -347,18 +361,6 @@ struct UnicoreJobSubmission {
5: optional string userDN
}
-/**
- * AuthenticationMode
- *
- * SERVER_ISSUED: use CA credentials to generate a certificate based on user name.
- * server properties.
- * MYPROXY_ISSUED: rely on GSI method implementation already provided
- * by Airavata security libs.
-*/
-enum AuthenticationMode {
- SERVER_ISSUED,
- MYPROXY_ISSUED
-}
/**