http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h index fad78f8..63be4f8 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h @@ -33,6 +33,7 @@ #include <thrift/cxxfunctional.h> #include "airavata_commons_types.h" +#include "data_movement_models_types.h" namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace computeresource { @@ -75,19 +76,6 @@ struct FileSystems { extern const std::map<int, const char*> _FileSystems_VALUES_TO_NAMES; -struct SecurityProtocol { - enum type { - USERNAME_PASSWORD = 0, - SSH_KEYS = 1, - GSI = 2, - KERBEROS = 3, - OAUTH = 4, - LOCAL = 5 - }; -}; - -extern const std::map<int, const char*> _SecurityProtocol_VALUES_TO_NAMES; - struct JobSubmissionProtocol { enum type { LOCAL = 0, @@ -113,27 +101,6 @@ struct MonitorMode { extern const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES; -struct DMType { - enum type { - COMPUTE_RESOURCE = 0, - STORAGE_RESOURCE = 1 - }; -}; - -extern const std::map<int, const char*> _DMType_VALUES_TO_NAMES; - -struct DataMovementProtocol { - enum type { - LOCAL = 0, - SCP = 1, - SFTP = 2, - GridFTP = 3, - UNICORE_STORAGE_SERVICE = 4 - }; -}; - -extern const std::map<int, const char*> _DataMovementProtocol_VALUES_TO_NAMES; - struct ProviderName { enum type { EC2 = 0, @@ -148,16 +115,8 @@ class ResourceJobManager; class BatchQueue; -class SCPDataMovement; - -class GridFTPDataMovement; - -class UnicoreDataMovement; - class LOCALSubmission; -class LOCALDataMovement; - class SSHJobSubmission; class GlobusJobSubmission; @@ -168,8 +127,6 @@ class CloudJobSubmission; class JobSubmissionInterface; -class DataMovementInterface; - class ComputeResourceDescription; typedef struct _ResourceJobManager__isset { @@ -333,163 +290,6 @@ class BatchQueue { void swap(BatchQueue &a, BatchQueue &b); -typedef struct _SCPDataMovement__isset { - _SCPDataMovement__isset() : alternativeSCPHostName(false), sshPort(true) {} - bool alternativeSCPHostName :1; - bool sshPort :1; -} _SCPDataMovement__isset; - -class SCPDataMovement { - public: - - static const char* ascii_fingerprint; // = "63CAE6EE336A7DBD91CCCD6E22628F4A"; - static const uint8_t binary_fingerprint[16]; // = {0x63,0xCA,0xE6,0xEE,0x33,0x6A,0x7D,0xBD,0x91,0xCC,0xCD,0x6E,0x22,0x62,0x8F,0x4A}; - - SCPDataMovement(const SCPDataMovement&); - SCPDataMovement& operator=(const SCPDataMovement&); - SCPDataMovement() : dataMovementInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), alternativeSCPHostName(), sshPort(22) { - } - - virtual ~SCPDataMovement() throw(); - std::string dataMovementInterfaceId; - SecurityProtocol::type securityProtocol; - std::string alternativeSCPHostName; - int32_t sshPort; - - _SCPDataMovement__isset __isset; - - void __set_dataMovementInterfaceId(const std::string& val); - - void __set_securityProtocol(const SecurityProtocol::type val); - - void __set_alternativeSCPHostName(const std::string& val); - - void __set_sshPort(const int32_t val); - - bool operator == (const SCPDataMovement & rhs) const - { - if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId)) - return false; - if (!(securityProtocol == rhs.securityProtocol)) - return false; - if (__isset.alternativeSCPHostName != rhs.__isset.alternativeSCPHostName) - return false; - else if (__isset.alternativeSCPHostName && !(alternativeSCPHostName == rhs.alternativeSCPHostName)) - return false; - if (__isset.sshPort != rhs.__isset.sshPort) - return false; - else if (__isset.sshPort && !(sshPort == rhs.sshPort)) - return false; - return true; - } - bool operator != (const SCPDataMovement &rhs) const { - return !(*this == rhs); - } - - bool operator < (const SCPDataMovement & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - friend std::ostream& operator<<(std::ostream& out, const SCPDataMovement& obj); -}; - -void swap(SCPDataMovement &a, SCPDataMovement &b); - - -class GridFTPDataMovement { - public: - - static const char* ascii_fingerprint; // = "790EE8B1D56A3B9B76C41DD063726E75"; - static const uint8_t binary_fingerprint[16]; // = {0x79,0x0E,0xE8,0xB1,0xD5,0x6A,0x3B,0x9B,0x76,0xC4,0x1D,0xD0,0x63,0x72,0x6E,0x75}; - - GridFTPDataMovement(const GridFTPDataMovement&); - GridFTPDataMovement& operator=(const GridFTPDataMovement&); - GridFTPDataMovement() : dataMovementInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0) { - } - - virtual ~GridFTPDataMovement() throw(); - std::string dataMovementInterfaceId; - SecurityProtocol::type securityProtocol; - std::vector<std::string> gridFTPEndPoints; - - void __set_dataMovementInterfaceId(const std::string& val); - - void __set_securityProtocol(const SecurityProtocol::type val); - - void __set_gridFTPEndPoints(const std::vector<std::string> & val); - - bool operator == (const GridFTPDataMovement & rhs) const - { - if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId)) - return false; - if (!(securityProtocol == rhs.securityProtocol)) - return false; - if (!(gridFTPEndPoints == rhs.gridFTPEndPoints)) - return false; - return true; - } - bool operator != (const GridFTPDataMovement &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GridFTPDataMovement & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - friend std::ostream& operator<<(std::ostream& out, const GridFTPDataMovement& obj); -}; - -void swap(GridFTPDataMovement &a, GridFTPDataMovement &b); - - -class UnicoreDataMovement { - 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}; - - UnicoreDataMovement(const UnicoreDataMovement&); - UnicoreDataMovement& operator=(const UnicoreDataMovement&); - UnicoreDataMovement() : dataMovementInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), unicoreEndPointURL() { - } - - virtual ~UnicoreDataMovement() throw(); - std::string dataMovementInterfaceId; - SecurityProtocol::type securityProtocol; - std::string unicoreEndPointURL; - - void __set_dataMovementInterfaceId(const std::string& val); - - void __set_securityProtocol(const SecurityProtocol::type val); - - void __set_unicoreEndPointURL(const std::string& val); - - bool operator == (const UnicoreDataMovement & rhs) const - { - if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId)) - return false; - if (!(securityProtocol == rhs.securityProtocol)) - return false; - if (!(unicoreEndPointURL == rhs.unicoreEndPointURL)) - return false; - return true; - } - bool operator != (const UnicoreDataMovement &rhs) const { - return !(*this == rhs); - } - - bool operator < (const UnicoreDataMovement & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - friend std::ostream& operator<<(std::ostream& out, const UnicoreDataMovement& obj); -}; - -void swap(UnicoreDataMovement &a, UnicoreDataMovement &b); - class LOCALSubmission { public: @@ -499,17 +299,17 @@ class LOCALSubmission { LOCALSubmission(const LOCALSubmission&); LOCALSubmission& operator=(const LOCALSubmission&); - LOCALSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0) { + LOCALSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol(( ::apache::airavata::model::data::movement::SecurityProtocol::type)0) { } virtual ~LOCALSubmission() throw(); std::string jobSubmissionInterfaceId; - SecurityProtocol::type securityProtocol; + ::apache::airavata::model::data::movement::SecurityProtocol::type securityProtocol; ResourceJobManager resourceJobManager; void __set_jobSubmissionInterfaceId(const std::string& val); - void __set_securityProtocol(const SecurityProtocol::type val); + void __set_securityProtocol(const ::apache::airavata::model::data::movement::SecurityProtocol::type val); void __set_resourceJobManager(const ResourceJobManager& val); @@ -537,43 +337,6 @@ class LOCALSubmission { void swap(LOCALSubmission &a, LOCALSubmission &b); - -class LOCALDataMovement { - public: - - static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; - static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; - - LOCALDataMovement(const LOCALDataMovement&); - LOCALDataMovement& operator=(const LOCALDataMovement&); - LOCALDataMovement() : dataMovementInterfaceId("DO_NOT_SET_AT_CLIENTS") { - } - - virtual ~LOCALDataMovement() throw(); - std::string dataMovementInterfaceId; - - void __set_dataMovementInterfaceId(const std::string& val); - - bool operator == (const LOCALDataMovement & rhs) const - { - if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId)) - return false; - return true; - } - bool operator != (const LOCALDataMovement &rhs) const { - return !(*this == rhs); - } - - bool operator < (const LOCALDataMovement & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - friend std::ostream& operator<<(std::ostream& out, const LOCALDataMovement& obj); -}; - -void swap(LOCALDataMovement &a, LOCALDataMovement &b); - typedef struct _SSHJobSubmission__isset { _SSHJobSubmission__isset() : alternativeSSHHostName(false), sshPort(true), monitorMode(false), batchQueueEmailSenders(false) {} bool alternativeSSHHostName :1; @@ -590,12 +353,12 @@ class SSHJobSubmission { SSHJobSubmission(const SSHJobSubmission&); SSHJobSubmission& operator=(const SSHJobSubmission&); - SSHJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), alternativeSSHHostName(), sshPort(22), monitorMode((MonitorMode::type)0) { + SSHJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol(( ::apache::airavata::model::data::movement::SecurityProtocol::type)0), alternativeSSHHostName(), sshPort(22), monitorMode((MonitorMode::type)0) { } virtual ~SSHJobSubmission() throw(); std::string jobSubmissionInterfaceId; - SecurityProtocol::type securityProtocol; + ::apache::airavata::model::data::movement::SecurityProtocol::type securityProtocol; ResourceJobManager resourceJobManager; std::string alternativeSSHHostName; int32_t sshPort; @@ -606,7 +369,7 @@ class SSHJobSubmission { void __set_jobSubmissionInterfaceId(const std::string& val); - void __set_securityProtocol(const SecurityProtocol::type val); + void __set_securityProtocol(const ::apache::airavata::model::data::movement::SecurityProtocol::type val); void __set_resourceJobManager(const ResourceJobManager& val); @@ -671,19 +434,19 @@ class GlobusJobSubmission { GlobusJobSubmission(const GlobusJobSubmission&); GlobusJobSubmission& operator=(const GlobusJobSubmission&); - GlobusJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0) { + GlobusJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol(( ::apache::airavata::model::data::movement::SecurityProtocol::type)0) { } virtual ~GlobusJobSubmission() throw(); std::string jobSubmissionInterfaceId; - SecurityProtocol::type securityProtocol; + ::apache::airavata::model::data::movement::SecurityProtocol::type securityProtocol; std::vector<std::string> globusGateKeeperEndPoint; _GlobusJobSubmission__isset __isset; void __set_jobSubmissionInterfaceId(const std::string& val); - void __set_securityProtocol(const SecurityProtocol::type val); + void __set_securityProtocol(const ::apache::airavata::model::data::movement::SecurityProtocol::type val); void __set_globusGateKeeperEndPoint(const std::vector<std::string> & val); @@ -722,17 +485,17 @@ class UnicoreJobSubmission { UnicoreJobSubmission(const UnicoreJobSubmission&); UnicoreJobSubmission& operator=(const UnicoreJobSubmission&); - UnicoreJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), unicoreEndPointURL() { + UnicoreJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol(( ::apache::airavata::model::data::movement::SecurityProtocol::type)0), unicoreEndPointURL() { } virtual ~UnicoreJobSubmission() throw(); std::string jobSubmissionInterfaceId; - SecurityProtocol::type securityProtocol; + ::apache::airavata::model::data::movement::SecurityProtocol::type securityProtocol; std::string unicoreEndPointURL; void __set_jobSubmissionInterfaceId(const std::string& val); - void __set_securityProtocol(const SecurityProtocol::type val); + void __set_securityProtocol(const ::apache::airavata::model::data::movement::SecurityProtocol::type val); void __set_unicoreEndPointURL(const std::string& val); @@ -769,12 +532,12 @@ class CloudJobSubmission { CloudJobSubmission(const CloudJobSubmission&); CloudJobSubmission& operator=(const CloudJobSubmission&); - CloudJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), nodeId(), executableType(), providerName((ProviderName::type)0), userAccountName() { + CloudJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol(( ::apache::airavata::model::data::movement::SecurityProtocol::type)0), nodeId(), executableType(), providerName((ProviderName::type)0), userAccountName() { } virtual ~CloudJobSubmission() throw(); std::string jobSubmissionInterfaceId; - SecurityProtocol::type securityProtocol; + ::apache::airavata::model::data::movement::SecurityProtocol::type securityProtocol; std::string nodeId; std::string executableType; ProviderName::type providerName; @@ -782,7 +545,7 @@ class CloudJobSubmission { void __set_jobSubmissionInterfaceId(const std::string& val); - void __set_securityProtocol(const SecurityProtocol::type val); + void __set_securityProtocol(const ::apache::airavata::model::data::movement::SecurityProtocol::type val); void __set_nodeId(const std::string& val); @@ -869,53 +632,6 @@ class JobSubmissionInterface { void swap(JobSubmissionInterface &a, JobSubmissionInterface &b); - -class DataMovementInterface { - public: - - static const char* ascii_fingerprint; // = "A0A4DD7B8243FB842E64EAC6E5DA6C7B"; - static const uint8_t binary_fingerprint[16]; // = {0xA0,0xA4,0xDD,0x7B,0x82,0x43,0xFB,0x84,0x2E,0x64,0xEA,0xC6,0xE5,0xDA,0x6C,0x7B}; - - DataMovementInterface(const DataMovementInterface&); - DataMovementInterface& operator=(const DataMovementInterface&); - DataMovementInterface() : dataMovementInterfaceId(), dataMovementProtocol((DataMovementProtocol::type)0), priorityOrder(0) { - } - - virtual ~DataMovementInterface() throw(); - std::string dataMovementInterfaceId; - DataMovementProtocol::type dataMovementProtocol; - int32_t priorityOrder; - - void __set_dataMovementInterfaceId(const std::string& val); - - void __set_dataMovementProtocol(const DataMovementProtocol::type val); - - void __set_priorityOrder(const int32_t val); - - bool operator == (const DataMovementInterface & rhs) const - { - if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId)) - return false; - if (!(dataMovementProtocol == rhs.dataMovementProtocol)) - return false; - if (!(priorityOrder == rhs.priorityOrder)) - return false; - return true; - } - bool operator != (const DataMovementInterface &rhs) const { - return !(*this == rhs); - } - - bool operator < (const DataMovementInterface & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - friend std::ostream& operator<<(std::ostream& out, const DataMovementInterface& obj); -}; - -void swap(DataMovementInterface &a, DataMovementInterface &b); - typedef struct _ComputeResourceDescription__isset { _ComputeResourceDescription__isset() : hostAliases(false), ipAddresses(false), resourceDescription(false), enabled(false), batchQueues(false), fileSystems(false), jobSubmissionInterfaces(false), dataMovementInterfaces(false), maxMemoryPerNode(false) {} bool hostAliases :1; @@ -950,7 +666,7 @@ class ComputeResourceDescription { std::vector<BatchQueue> batchQueues; std::map<FileSystems::type, std::string> fileSystems; std::vector<JobSubmissionInterface> jobSubmissionInterfaces; - std::vector<DataMovementInterface> dataMovementInterfaces; + std::vector< ::apache::airavata::model::data::movement::DataMovementInterface> dataMovementInterfaces; int32_t maxMemoryPerNode; _ComputeResourceDescription__isset __isset; @@ -973,7 +689,7 @@ class ComputeResourceDescription { void __set_jobSubmissionInterfaces(const std::vector<JobSubmissionInterface> & val); - void __set_dataMovementInterfaces(const std::vector<DataMovementInterface> & val); + void __set_dataMovementInterfaces(const std::vector< ::apache::airavata::model::data::movement::DataMovementInterface> & val); void __set_maxMemoryPerNode(const int32_t val);
http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_constants.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_constants.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_constants.cpp new file mode 100644 index 0000000..c564340 --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_constants.cpp @@ -0,0 +1,34 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data_movement_models_constants.h" + +namespace apache { namespace airavata { namespace model { namespace data { namespace movement { + +const data_movement_modelsConstants g_data_movement_models_constants; + +data_movement_modelsConstants::data_movement_modelsConstants() { +} + +}}}}} // namespace + http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_constants.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_constants.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_constants.h new file mode 100644 index 0000000..e0402ca --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_constants.h @@ -0,0 +1,41 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef data_movement_models_CONSTANTS_H +#define data_movement_models_CONSTANTS_H + +#include "data_movement_models_types.h" + +namespace apache { namespace airavata { namespace model { namespace data { namespace movement { + +class data_movement_modelsConstants { + public: + data_movement_modelsConstants(); + +}; + +extern const data_movement_modelsConstants g_data_movement_models_constants; + +}}}}} // namespace + +#endif http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_types.cpp new file mode 100644 index 0000000..8e438f1 --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_types.cpp @@ -0,0 +1,763 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "data_movement_models_types.h" + +#include <algorithm> +#include <ostream> + +#include <thrift/TToString.h> + +namespace apache { namespace airavata { namespace model { namespace data { namespace movement { + +int _kDMTypeValues[] = { + DMType::COMPUTE_RESOURCE, + DMType::STORAGE_RESOURCE +}; +const char* _kDMTypeNames[] = { + "COMPUTE_RESOURCE", + "STORAGE_RESOURCE" +}; +const std::map<int, const char*> _DMType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kDMTypeValues, _kDMTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kSecurityProtocolValues[] = { + SecurityProtocol::USERNAME_PASSWORD, + SecurityProtocol::SSH_KEYS, + SecurityProtocol::GSI, + SecurityProtocol::KERBEROS, + SecurityProtocol::OAUTH, + SecurityProtocol::LOCAL +}; +const char* _kSecurityProtocolNames[] = { + "USERNAME_PASSWORD", + "SSH_KEYS", + "GSI", + "KERBEROS", + "OAUTH", + "LOCAL" +}; +const std::map<int, const char*> _SecurityProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kSecurityProtocolValues, _kSecurityProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kDataMovementProtocolValues[] = { + DataMovementProtocol::LOCAL, + DataMovementProtocol::SCP, + DataMovementProtocol::SFTP, + DataMovementProtocol::GridFTP, + DataMovementProtocol::UNICORE_STORAGE_SERVICE +}; +const char* _kDataMovementProtocolNames[] = { + "LOCAL", + "SCP", + "SFTP", + "GridFTP", + "UNICORE_STORAGE_SERVICE" +}; +const std::map<int, const char*> _DataMovementProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kDataMovementProtocolValues, _kDataMovementProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + + +SCPDataMovement::~SCPDataMovement() throw() { +} + + +void SCPDataMovement::__set_dataMovementInterfaceId(const std::string& val) { + this->dataMovementInterfaceId = val; +} + +void SCPDataMovement::__set_securityProtocol(const SecurityProtocol::type val) { + this->securityProtocol = val; +} + +void SCPDataMovement::__set_alternativeSCPHostName(const std::string& val) { + this->alternativeSCPHostName = val; +__isset.alternativeSCPHostName = true; +} + +void SCPDataMovement::__set_sshPort(const int32_t val) { + this->sshPort = val; +__isset.sshPort = true; +} + +const char* SCPDataMovement::ascii_fingerprint = "63CAE6EE336A7DBD91CCCD6E22628F4A"; +const uint8_t SCPDataMovement::binary_fingerprint[16] = {0x63,0xCA,0xE6,0xEE,0x33,0x6A,0x7D,0xBD,0x91,0xCC,0xCD,0x6E,0x22,0x62,0x8F,0x4A}; + +uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dataMovementInterfaceId = false; + bool isset_securityProtocol = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dataMovementInterfaceId); + isset_dataMovementInterfaceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast0; + xfer += iprot->readI32(ecast0); + this->securityProtocol = (SecurityProtocol::type)ecast0; + isset_securityProtocol = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->alternativeSCPHostName); + this->__isset.alternativeSCPHostName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->sshPort); + this->__isset.sshPort = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dataMovementInterfaceId) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_securityProtocol) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t SCPDataMovement::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + oprot->incrementRecursionDepth(); + xfer += oprot->writeStructBegin("SCPDataMovement"); + + xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dataMovementInterfaceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("securityProtocol", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->securityProtocol); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.alternativeSCPHostName) { + xfer += oprot->writeFieldBegin("alternativeSCPHostName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->alternativeSCPHostName); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.sshPort) { + xfer += oprot->writeFieldBegin("sshPort", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32(this->sshPort); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + oprot->decrementRecursionDepth(); + return xfer; +} + +void swap(SCPDataMovement &a, SCPDataMovement &b) { + using ::std::swap; + swap(a.dataMovementInterfaceId, b.dataMovementInterfaceId); + swap(a.securityProtocol, b.securityProtocol); + swap(a.alternativeSCPHostName, b.alternativeSCPHostName); + swap(a.sshPort, b.sshPort); + swap(a.__isset, b.__isset); +} + +SCPDataMovement::SCPDataMovement(const SCPDataMovement& other1) { + dataMovementInterfaceId = other1.dataMovementInterfaceId; + securityProtocol = other1.securityProtocol; + alternativeSCPHostName = other1.alternativeSCPHostName; + sshPort = other1.sshPort; + __isset = other1.__isset; +} +SCPDataMovement& SCPDataMovement::operator=(const SCPDataMovement& other2) { + dataMovementInterfaceId = other2.dataMovementInterfaceId; + securityProtocol = other2.securityProtocol; + alternativeSCPHostName = other2.alternativeSCPHostName; + sshPort = other2.sshPort; + __isset = other2.__isset; + return *this; +} +std::ostream& operator<<(std::ostream& out, const SCPDataMovement& obj) { + using apache::thrift::to_string; + out << "SCPDataMovement("; + out << "dataMovementInterfaceId=" << to_string(obj.dataMovementInterfaceId); + out << ", " << "securityProtocol=" << to_string(obj.securityProtocol); + out << ", " << "alternativeSCPHostName="; (obj.__isset.alternativeSCPHostName ? (out << to_string(obj.alternativeSCPHostName)) : (out << "<null>")); + out << ", " << "sshPort="; (obj.__isset.sshPort ? (out << to_string(obj.sshPort)) : (out << "<null>")); + out << ")"; + return out; +} + + +GridFTPDataMovement::~GridFTPDataMovement() throw() { +} + + +void GridFTPDataMovement::__set_dataMovementInterfaceId(const std::string& val) { + this->dataMovementInterfaceId = val; +} + +void GridFTPDataMovement::__set_securityProtocol(const SecurityProtocol::type val) { + this->securityProtocol = val; +} + +void GridFTPDataMovement::__set_gridFTPEndPoints(const std::vector<std::string> & val) { + this->gridFTPEndPoints = val; +} + +const char* GridFTPDataMovement::ascii_fingerprint = "790EE8B1D56A3B9B76C41DD063726E75"; +const uint8_t GridFTPDataMovement::binary_fingerprint[16] = {0x79,0x0E,0xE8,0xB1,0xD5,0x6A,0x3B,0x9B,0x76,0xC4,0x1D,0xD0,0x63,0x72,0x6E,0x75}; + +uint32_t GridFTPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dataMovementInterfaceId = false; + bool isset_securityProtocol = false; + bool isset_gridFTPEndPoints = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dataMovementInterfaceId); + isset_dataMovementInterfaceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast3; + xfer += iprot->readI32(ecast3); + this->securityProtocol = (SecurityProtocol::type)ecast3; + isset_securityProtocol = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->gridFTPEndPoints.clear(); + uint32_t _size4; + ::apache::thrift::protocol::TType _etype7; + xfer += iprot->readListBegin(_etype7, _size4); + this->gridFTPEndPoints.resize(_size4); + uint32_t _i8; + for (_i8 = 0; _i8 < _size4; ++_i8) + { + xfer += iprot->readString(this->gridFTPEndPoints[_i8]); + } + xfer += iprot->readListEnd(); + } + isset_gridFTPEndPoints = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dataMovementInterfaceId) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_securityProtocol) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_gridFTPEndPoints) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GridFTPDataMovement::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + oprot->incrementRecursionDepth(); + xfer += oprot->writeStructBegin("GridFTPDataMovement"); + + xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dataMovementInterfaceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("securityProtocol", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->securityProtocol); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("gridFTPEndPoints", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->gridFTPEndPoints.size())); + std::vector<std::string> ::const_iterator _iter9; + for (_iter9 = this->gridFTPEndPoints.begin(); _iter9 != this->gridFTPEndPoints.end(); ++_iter9) + { + xfer += oprot->writeString((*_iter9)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + oprot->decrementRecursionDepth(); + return xfer; +} + +void swap(GridFTPDataMovement &a, GridFTPDataMovement &b) { + using ::std::swap; + swap(a.dataMovementInterfaceId, b.dataMovementInterfaceId); + swap(a.securityProtocol, b.securityProtocol); + swap(a.gridFTPEndPoints, b.gridFTPEndPoints); +} + +GridFTPDataMovement::GridFTPDataMovement(const GridFTPDataMovement& other10) { + dataMovementInterfaceId = other10.dataMovementInterfaceId; + securityProtocol = other10.securityProtocol; + gridFTPEndPoints = other10.gridFTPEndPoints; +} +GridFTPDataMovement& GridFTPDataMovement::operator=(const GridFTPDataMovement& other11) { + dataMovementInterfaceId = other11.dataMovementInterfaceId; + securityProtocol = other11.securityProtocol; + gridFTPEndPoints = other11.gridFTPEndPoints; + return *this; +} +std::ostream& operator<<(std::ostream& out, const GridFTPDataMovement& obj) { + using apache::thrift::to_string; + out << "GridFTPDataMovement("; + out << "dataMovementInterfaceId=" << to_string(obj.dataMovementInterfaceId); + out << ", " << "securityProtocol=" << to_string(obj.securityProtocol); + out << ", " << "gridFTPEndPoints=" << to_string(obj.gridFTPEndPoints); + out << ")"; + return out; +} + + +UnicoreDataMovement::~UnicoreDataMovement() throw() { +} + + +void UnicoreDataMovement::__set_dataMovementInterfaceId(const std::string& val) { + this->dataMovementInterfaceId = val; +} + +void UnicoreDataMovement::__set_securityProtocol(const SecurityProtocol::type val) { + this->securityProtocol = val; +} + +void UnicoreDataMovement::__set_unicoreEndPointURL(const std::string& val) { + this->unicoreEndPointURL = val; +} + +const char* UnicoreDataMovement::ascii_fingerprint = "D9F4CFE2F293A8B1052FD3031DD2C847"; +const uint8_t UnicoreDataMovement::binary_fingerprint[16] = {0xD9,0xF4,0xCF,0xE2,0xF2,0x93,0xA8,0xB1,0x05,0x2F,0xD3,0x03,0x1D,0xD2,0xC8,0x47}; + +uint32_t UnicoreDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dataMovementInterfaceId = false; + bool isset_securityProtocol = false; + bool isset_unicoreEndPointURL = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dataMovementInterfaceId); + isset_dataMovementInterfaceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast12; + xfer += iprot->readI32(ecast12); + this->securityProtocol = (SecurityProtocol::type)ecast12; + isset_securityProtocol = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->unicoreEndPointURL); + isset_unicoreEndPointURL = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dataMovementInterfaceId) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_securityProtocol) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_unicoreEndPointURL) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t UnicoreDataMovement::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + oprot->incrementRecursionDepth(); + xfer += oprot->writeStructBegin("UnicoreDataMovement"); + + xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dataMovementInterfaceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("securityProtocol", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->securityProtocol); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("unicoreEndPointURL", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->unicoreEndPointURL); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + oprot->decrementRecursionDepth(); + return xfer; +} + +void swap(UnicoreDataMovement &a, UnicoreDataMovement &b) { + using ::std::swap; + swap(a.dataMovementInterfaceId, b.dataMovementInterfaceId); + swap(a.securityProtocol, b.securityProtocol); + swap(a.unicoreEndPointURL, b.unicoreEndPointURL); +} + +UnicoreDataMovement::UnicoreDataMovement(const UnicoreDataMovement& other13) { + dataMovementInterfaceId = other13.dataMovementInterfaceId; + securityProtocol = other13.securityProtocol; + unicoreEndPointURL = other13.unicoreEndPointURL; +} +UnicoreDataMovement& UnicoreDataMovement::operator=(const UnicoreDataMovement& other14) { + dataMovementInterfaceId = other14.dataMovementInterfaceId; + securityProtocol = other14.securityProtocol; + unicoreEndPointURL = other14.unicoreEndPointURL; + return *this; +} +std::ostream& operator<<(std::ostream& out, const UnicoreDataMovement& obj) { + using apache::thrift::to_string; + out << "UnicoreDataMovement("; + out << "dataMovementInterfaceId=" << to_string(obj.dataMovementInterfaceId); + out << ", " << "securityProtocol=" << to_string(obj.securityProtocol); + out << ", " << "unicoreEndPointURL=" << to_string(obj.unicoreEndPointURL); + out << ")"; + return out; +} + + +LOCALDataMovement::~LOCALDataMovement() throw() { +} + + +void LOCALDataMovement::__set_dataMovementInterfaceId(const std::string& val) { + this->dataMovementInterfaceId = val; +} + +const char* LOCALDataMovement::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; +const uint8_t LOCALDataMovement::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + +uint32_t LOCALDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dataMovementInterfaceId = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dataMovementInterfaceId); + isset_dataMovementInterfaceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dataMovementInterfaceId) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t LOCALDataMovement::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + oprot->incrementRecursionDepth(); + xfer += oprot->writeStructBegin("LOCALDataMovement"); + + xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dataMovementInterfaceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + oprot->decrementRecursionDepth(); + return xfer; +} + +void swap(LOCALDataMovement &a, LOCALDataMovement &b) { + using ::std::swap; + swap(a.dataMovementInterfaceId, b.dataMovementInterfaceId); +} + +LOCALDataMovement::LOCALDataMovement(const LOCALDataMovement& other15) { + dataMovementInterfaceId = other15.dataMovementInterfaceId; +} +LOCALDataMovement& LOCALDataMovement::operator=(const LOCALDataMovement& other16) { + dataMovementInterfaceId = other16.dataMovementInterfaceId; + return *this; +} +std::ostream& operator<<(std::ostream& out, const LOCALDataMovement& obj) { + using apache::thrift::to_string; + out << "LOCALDataMovement("; + out << "dataMovementInterfaceId=" << to_string(obj.dataMovementInterfaceId); + out << ")"; + return out; +} + + +DataMovementInterface::~DataMovementInterface() throw() { +} + + +void DataMovementInterface::__set_dataMovementInterfaceId(const std::string& val) { + this->dataMovementInterfaceId = val; +} + +void DataMovementInterface::__set_dataMovementProtocol(const DataMovementProtocol::type val) { + this->dataMovementProtocol = val; +} + +void DataMovementInterface::__set_priorityOrder(const int32_t val) { + this->priorityOrder = val; +} + +const char* DataMovementInterface::ascii_fingerprint = "A0A4DD7B8243FB842E64EAC6E5DA6C7B"; +const uint8_t DataMovementInterface::binary_fingerprint[16] = {0xA0,0xA4,0xDD,0x7B,0x82,0x43,0xFB,0x84,0x2E,0x64,0xEA,0xC6,0xE5,0xDA,0x6C,0x7B}; + +uint32_t DataMovementInterface::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dataMovementInterfaceId = false; + bool isset_dataMovementProtocol = false; + bool isset_priorityOrder = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dataMovementInterfaceId); + isset_dataMovementInterfaceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast17; + xfer += iprot->readI32(ecast17); + this->dataMovementProtocol = (DataMovementProtocol::type)ecast17; + isset_dataMovementProtocol = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->priorityOrder); + isset_priorityOrder = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dataMovementInterfaceId) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_dataMovementProtocol) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_priorityOrder) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t DataMovementInterface::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + oprot->incrementRecursionDepth(); + xfer += oprot->writeStructBegin("DataMovementInterface"); + + xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dataMovementInterfaceId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dataMovementProtocol", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->dataMovementProtocol); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("priorityOrder", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->priorityOrder); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + oprot->decrementRecursionDepth(); + return xfer; +} + +void swap(DataMovementInterface &a, DataMovementInterface &b) { + using ::std::swap; + swap(a.dataMovementInterfaceId, b.dataMovementInterfaceId); + swap(a.dataMovementProtocol, b.dataMovementProtocol); + swap(a.priorityOrder, b.priorityOrder); +} + +DataMovementInterface::DataMovementInterface(const DataMovementInterface& other18) { + dataMovementInterfaceId = other18.dataMovementInterfaceId; + dataMovementProtocol = other18.dataMovementProtocol; + priorityOrder = other18.priorityOrder; +} +DataMovementInterface& DataMovementInterface::operator=(const DataMovementInterface& other19) { + dataMovementInterfaceId = other19.dataMovementInterfaceId; + dataMovementProtocol = other19.dataMovementProtocol; + priorityOrder = other19.priorityOrder; + return *this; +} +std::ostream& operator<<(std::ostream& out, const DataMovementInterface& obj) { + using apache::thrift::to_string; + out << "DataMovementInterface("; + out << "dataMovementInterfaceId=" << to_string(obj.dataMovementInterfaceId); + out << ", " << "dataMovementProtocol=" << to_string(obj.dataMovementProtocol); + out << ", " << "priorityOrder=" << to_string(obj.priorityOrder); + out << ")"; + return out; +} + +}}}}} // namespace http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_types.h new file mode 100644 index 0000000..dd43410 --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/data_movement_models_types.h @@ -0,0 +1,327 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef data_movement_models_TYPES_H +#define data_movement_models_TYPES_H + +#include <iosfwd> + +#include <thrift/Thrift.h> +#include <thrift/TApplicationException.h> +#include <thrift/protocol/TProtocol.h> +#include <thrift/transport/TTransport.h> + +#include <thrift/cxxfunctional.h> +#include "airavata_commons_types.h" + + +namespace apache { namespace airavata { namespace model { namespace data { namespace movement { + +struct DMType { + enum type { + COMPUTE_RESOURCE = 0, + STORAGE_RESOURCE = 1 + }; +}; + +extern const std::map<int, const char*> _DMType_VALUES_TO_NAMES; + +struct SecurityProtocol { + enum type { + USERNAME_PASSWORD = 0, + SSH_KEYS = 1, + GSI = 2, + KERBEROS = 3, + OAUTH = 4, + LOCAL = 5 + }; +}; + +extern const std::map<int, const char*> _SecurityProtocol_VALUES_TO_NAMES; + +struct DataMovementProtocol { + enum type { + LOCAL = 0, + SCP = 1, + SFTP = 2, + GridFTP = 3, + UNICORE_STORAGE_SERVICE = 4 + }; +}; + +extern const std::map<int, const char*> _DataMovementProtocol_VALUES_TO_NAMES; + +class SCPDataMovement; + +class GridFTPDataMovement; + +class UnicoreDataMovement; + +class LOCALDataMovement; + +class DataMovementInterface; + +typedef struct _SCPDataMovement__isset { + _SCPDataMovement__isset() : alternativeSCPHostName(false), sshPort(true) {} + bool alternativeSCPHostName :1; + bool sshPort :1; +} _SCPDataMovement__isset; + +class SCPDataMovement { + public: + + static const char* ascii_fingerprint; // = "63CAE6EE336A7DBD91CCCD6E22628F4A"; + static const uint8_t binary_fingerprint[16]; // = {0x63,0xCA,0xE6,0xEE,0x33,0x6A,0x7D,0xBD,0x91,0xCC,0xCD,0x6E,0x22,0x62,0x8F,0x4A}; + + SCPDataMovement(const SCPDataMovement&); + SCPDataMovement& operator=(const SCPDataMovement&); + SCPDataMovement() : dataMovementInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), alternativeSCPHostName(), sshPort(22) { + } + + virtual ~SCPDataMovement() throw(); + std::string dataMovementInterfaceId; + SecurityProtocol::type securityProtocol; + std::string alternativeSCPHostName; + int32_t sshPort; + + _SCPDataMovement__isset __isset; + + void __set_dataMovementInterfaceId(const std::string& val); + + void __set_securityProtocol(const SecurityProtocol::type val); + + void __set_alternativeSCPHostName(const std::string& val); + + void __set_sshPort(const int32_t val); + + bool operator == (const SCPDataMovement & rhs) const + { + if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId)) + return false; + if (!(securityProtocol == rhs.securityProtocol)) + return false; + if (__isset.alternativeSCPHostName != rhs.__isset.alternativeSCPHostName) + return false; + else if (__isset.alternativeSCPHostName && !(alternativeSCPHostName == rhs.alternativeSCPHostName)) + return false; + if (__isset.sshPort != rhs.__isset.sshPort) + return false; + else if (__isset.sshPort && !(sshPort == rhs.sshPort)) + return false; + return true; + } + bool operator != (const SCPDataMovement &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SCPDataMovement & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + friend std::ostream& operator<<(std::ostream& out, const SCPDataMovement& obj); +}; + +void swap(SCPDataMovement &a, SCPDataMovement &b); + + +class GridFTPDataMovement { + public: + + static const char* ascii_fingerprint; // = "790EE8B1D56A3B9B76C41DD063726E75"; + static const uint8_t binary_fingerprint[16]; // = {0x79,0x0E,0xE8,0xB1,0xD5,0x6A,0x3B,0x9B,0x76,0xC4,0x1D,0xD0,0x63,0x72,0x6E,0x75}; + + GridFTPDataMovement(const GridFTPDataMovement&); + GridFTPDataMovement& operator=(const GridFTPDataMovement&); + GridFTPDataMovement() : dataMovementInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0) { + } + + virtual ~GridFTPDataMovement() throw(); + std::string dataMovementInterfaceId; + SecurityProtocol::type securityProtocol; + std::vector<std::string> gridFTPEndPoints; + + void __set_dataMovementInterfaceId(const std::string& val); + + void __set_securityProtocol(const SecurityProtocol::type val); + + void __set_gridFTPEndPoints(const std::vector<std::string> & val); + + bool operator == (const GridFTPDataMovement & rhs) const + { + if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId)) + return false; + if (!(securityProtocol == rhs.securityProtocol)) + return false; + if (!(gridFTPEndPoints == rhs.gridFTPEndPoints)) + return false; + return true; + } + bool operator != (const GridFTPDataMovement &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GridFTPDataMovement & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + friend std::ostream& operator<<(std::ostream& out, const GridFTPDataMovement& obj); +}; + +void swap(GridFTPDataMovement &a, GridFTPDataMovement &b); + + +class UnicoreDataMovement { + 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}; + + UnicoreDataMovement(const UnicoreDataMovement&); + UnicoreDataMovement& operator=(const UnicoreDataMovement&); + UnicoreDataMovement() : dataMovementInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), unicoreEndPointURL() { + } + + virtual ~UnicoreDataMovement() throw(); + std::string dataMovementInterfaceId; + SecurityProtocol::type securityProtocol; + std::string unicoreEndPointURL; + + void __set_dataMovementInterfaceId(const std::string& val); + + void __set_securityProtocol(const SecurityProtocol::type val); + + void __set_unicoreEndPointURL(const std::string& val); + + bool operator == (const UnicoreDataMovement & rhs) const + { + if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId)) + return false; + if (!(securityProtocol == rhs.securityProtocol)) + return false; + if (!(unicoreEndPointURL == rhs.unicoreEndPointURL)) + return false; + return true; + } + bool operator != (const UnicoreDataMovement &rhs) const { + return !(*this == rhs); + } + + bool operator < (const UnicoreDataMovement & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + friend std::ostream& operator<<(std::ostream& out, const UnicoreDataMovement& obj); +}; + +void swap(UnicoreDataMovement &a, UnicoreDataMovement &b); + + +class LOCALDataMovement { + public: + + static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + LOCALDataMovement(const LOCALDataMovement&); + LOCALDataMovement& operator=(const LOCALDataMovement&); + LOCALDataMovement() : dataMovementInterfaceId("DO_NOT_SET_AT_CLIENTS") { + } + + virtual ~LOCALDataMovement() throw(); + std::string dataMovementInterfaceId; + + void __set_dataMovementInterfaceId(const std::string& val); + + bool operator == (const LOCALDataMovement & rhs) const + { + if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId)) + return false; + return true; + } + bool operator != (const LOCALDataMovement &rhs) const { + return !(*this == rhs); + } + + bool operator < (const LOCALDataMovement & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + friend std::ostream& operator<<(std::ostream& out, const LOCALDataMovement& obj); +}; + +void swap(LOCALDataMovement &a, LOCALDataMovement &b); + + +class DataMovementInterface { + public: + + static const char* ascii_fingerprint; // = "A0A4DD7B8243FB842E64EAC6E5DA6C7B"; + static const uint8_t binary_fingerprint[16]; // = {0xA0,0xA4,0xDD,0x7B,0x82,0x43,0xFB,0x84,0x2E,0x64,0xEA,0xC6,0xE5,0xDA,0x6C,0x7B}; + + DataMovementInterface(const DataMovementInterface&); + DataMovementInterface& operator=(const DataMovementInterface&); + DataMovementInterface() : dataMovementInterfaceId(), dataMovementProtocol((DataMovementProtocol::type)0), priorityOrder(0) { + } + + virtual ~DataMovementInterface() throw(); + std::string dataMovementInterfaceId; + DataMovementProtocol::type dataMovementProtocol; + int32_t priorityOrder; + + void __set_dataMovementInterfaceId(const std::string& val); + + void __set_dataMovementProtocol(const DataMovementProtocol::type val); + + void __set_priorityOrder(const int32_t val); + + bool operator == (const DataMovementInterface & rhs) const + { + if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId)) + return false; + if (!(dataMovementProtocol == rhs.dataMovementProtocol)) + return false; + if (!(priorityOrder == rhs.priorityOrder)) + return false; + return true; + } + bool operator != (const DataMovementInterface &rhs) const { + return !(*this == rhs); + } + + bool operator < (const DataMovementInterface & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + friend std::ostream& operator<<(std::ostream& out, const DataMovementInterface& obj); +}; + +void swap(DataMovementInterface &a, DataMovementInterface &b); + +}}}}} // namespace + +#endif http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.cpp index cdbf72b..794aa56 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.cpp @@ -98,8 +98,13 @@ void UserConfigurationDataModel::__set_generateCert(const bool val) { __isset.generateCert = true; } -const char* UserConfigurationDataModel::ascii_fingerprint = "D7D5F12196F1444CE2A35E68C2EEDAF2"; -const uint8_t UserConfigurationDataModel::binary_fingerprint[16] = {0xD7,0xD5,0xF1,0x21,0x96,0xF1,0x44,0x4C,0xE2,0xA3,0x5E,0x68,0xC2,0xEE,0xDA,0xF2}; +void UserConfigurationDataModel::__set_storageId(const std::string& val) { + this->storageId = val; +__isset.storageId = true; +} + +const char* UserConfigurationDataModel::ascii_fingerprint = "9CA6AB92C690C796BF5375F505933922"; +const uint8_t UserConfigurationDataModel::binary_fingerprint[16] = {0x9C,0xA6,0xAB,0x92,0xC6,0x90,0xC7,0x96,0xBF,0x53,0x75,0xF5,0x05,0x93,0x39,0x22}; uint32_t UserConfigurationDataModel::read(::apache::thrift::protocol::TProtocol* iprot) { @@ -179,6 +184,14 @@ uint32_t UserConfigurationDataModel::read(::apache::thrift::protocol::TProtocol* xfer += iprot->skip(ftype); } break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->storageId); + this->__isset.storageId = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -233,6 +246,11 @@ uint32_t UserConfigurationDataModel::write(::apache::thrift::protocol::TProtocol xfer += oprot->writeBool(this->generateCert); xfer += oprot->writeFieldEnd(); } + if (this->__isset.storageId) { + xfer += oprot->writeFieldBegin("storageId", ::apache::thrift::protocol::T_STRING, 8); + xfer += oprot->writeString(this->storageId); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); oprot->decrementRecursionDepth(); @@ -248,6 +266,7 @@ void swap(UserConfigurationDataModel &a, UserConfigurationDataModel &b) { swap(a.throttleResources, b.throttleResources); swap(a.userDN, b.userDN); swap(a.generateCert, b.generateCert); + swap(a.storageId, b.storageId); swap(a.__isset, b.__isset); } @@ -259,6 +278,7 @@ UserConfigurationDataModel::UserConfigurationDataModel(const UserConfigurationDa throttleResources = other0.throttleResources; userDN = other0.userDN; generateCert = other0.generateCert; + storageId = other0.storageId; __isset = other0.__isset; } UserConfigurationDataModel& UserConfigurationDataModel::operator=(const UserConfigurationDataModel& other1) { @@ -269,6 +289,7 @@ UserConfigurationDataModel& UserConfigurationDataModel::operator=(const UserConf throttleResources = other1.throttleResources; userDN = other1.userDN; generateCert = other1.generateCert; + storageId = other1.storageId; __isset = other1.__isset; return *this; } @@ -282,6 +303,7 @@ std::ostream& operator<<(std::ostream& out, const UserConfigurationDataModel& ob out << ", " << "throttleResources="; (obj.__isset.throttleResources ? (out << to_string(obj.throttleResources)) : (out << "<null>")); out << ", " << "userDN="; (obj.__isset.userDN ? (out << to_string(obj.userDN)) : (out << "<null>")); out << ", " << "generateCert="; (obj.__isset.generateCert ? (out << to_string(obj.generateCert)) : (out << "<null>")); + out << ", " << "storageId="; (obj.__isset.storageId ? (out << to_string(obj.storageId)) : (out << "<null>")); out << ")"; return out; } @@ -375,8 +397,8 @@ void ExperimentModel::__set_processes(const std::vector< ::apache::airavata::mod __isset.processes = true; } -const char* ExperimentModel::ascii_fingerprint = "4DF530DE68212F7F779CF0EF35D9EDC3"; -const uint8_t ExperimentModel::binary_fingerprint[16] = {0x4D,0xF5,0x30,0xDE,0x68,0x21,0x2F,0x7F,0x77,0x9C,0xF0,0xEF,0x35,0xD9,0xED,0xC3}; +const char* ExperimentModel::ascii_fingerprint = "67B92D103C069754AD7A8ECD124FA0D0"; +const uint8_t ExperimentModel::binary_fingerprint[16] = {0x67,0xB9,0x2D,0x10,0x3C,0x06,0x97,0x54,0xAD,0x7A,0x8E,0xCD,0x12,0x4F,0xA0,0xD0}; uint32_t ExperimentModel::read(::apache::thrift::protocol::TProtocol* iprot) { http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.h index c9f71a2..677c7ae 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.h +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.h @@ -73,23 +73,24 @@ class ExperimentSummaryModel; class ExperimentStatistics; typedef struct _UserConfigurationDataModel__isset { - _UserConfigurationDataModel__isset() : shareExperimentPublicly(true), computationalResourceScheduling(false), throttleResources(true), userDN(false), generateCert(true) {} + _UserConfigurationDataModel__isset() : shareExperimentPublicly(true), computationalResourceScheduling(false), throttleResources(true), userDN(false), generateCert(true), storageId(false) {} bool shareExperimentPublicly :1; bool computationalResourceScheduling :1; bool throttleResources :1; bool userDN :1; bool generateCert :1; + bool storageId :1; } _UserConfigurationDataModel__isset; class UserConfigurationDataModel { public: - static const char* ascii_fingerprint; // = "D7D5F12196F1444CE2A35E68C2EEDAF2"; - static const uint8_t binary_fingerprint[16]; // = {0xD7,0xD5,0xF1,0x21,0x96,0xF1,0x44,0x4C,0xE2,0xA3,0x5E,0x68,0xC2,0xEE,0xDA,0xF2}; + static const char* ascii_fingerprint; // = "9CA6AB92C690C796BF5375F505933922"; + static const uint8_t binary_fingerprint[16]; // = {0x9C,0xA6,0xAB,0x92,0xC6,0x90,0xC7,0x96,0xBF,0x53,0x75,0xF5,0x05,0x93,0x39,0x22}; UserConfigurationDataModel(const UserConfigurationDataModel&); UserConfigurationDataModel& operator=(const UserConfigurationDataModel&); - UserConfigurationDataModel() : airavataAutoSchedule(false), overrideManualScheduledParams(false), shareExperimentPublicly(false), throttleResources(false), userDN(), generateCert(false) { + UserConfigurationDataModel() : airavataAutoSchedule(false), overrideManualScheduledParams(false), shareExperimentPublicly(false), throttleResources(false), userDN(), generateCert(false), storageId() { } virtual ~UserConfigurationDataModel() throw(); @@ -100,6 +101,7 @@ class UserConfigurationDataModel { bool throttleResources; std::string userDN; bool generateCert; + std::string storageId; _UserConfigurationDataModel__isset __isset; @@ -117,6 +119,8 @@ class UserConfigurationDataModel { void __set_generateCert(const bool val); + void __set_storageId(const std::string& val); + bool operator == (const UserConfigurationDataModel & rhs) const { if (!(airavataAutoSchedule == rhs.airavataAutoSchedule)) @@ -143,6 +147,10 @@ class UserConfigurationDataModel { return false; else if (__isset.generateCert && !(generateCert == rhs.generateCert)) return false; + if (__isset.storageId != rhs.__isset.storageId) + return false; + else if (__isset.storageId && !(storageId == rhs.storageId)) + return false; return true; } bool operator != (const UserConfigurationDataModel &rhs) const { @@ -178,8 +186,8 @@ typedef struct _ExperimentModel__isset { class ExperimentModel { public: - static const char* ascii_fingerprint; // = "4DF530DE68212F7F779CF0EF35D9EDC3"; - static const uint8_t binary_fingerprint[16]; // = {0x4D,0xF5,0x30,0xDE,0x68,0x21,0x2F,0x7F,0x77,0x9C,0xF0,0xEF,0x35,0xD9,0xED,0xC3}; + static const char* ascii_fingerprint; // = "67B92D103C069754AD7A8ECD124FA0D0"; + static const uint8_t binary_fingerprint[16]; // = {0x67,0xB9,0x2D,0x10,0x3C,0x06,0x97,0x54,0xAD,0x7A,0x8E,0xCD,0x12,0x4F,0xA0,0xD0}; ExperimentModel(const ExperimentModel&); ExperimentModel& operator=(const ExperimentModel&); http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/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 01e1e67..f85a2d8 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 @@ -53,7 +53,7 @@ void ComputeResourcePreference::__set_preferredJobSubmissionProtocol(const ::ap __isset.preferredJobSubmissionProtocol = true; } -void ComputeResourcePreference::__set_preferredDataMovementProtocol(const ::apache::airavata::model::appcatalog::computeresource::DataMovementProtocol::type val) { +void ComputeResourcePreference::__set_preferredDataMovementProtocol(const ::apache::airavata::model::data::movement::DataMovementProtocol::type val) { this->preferredDataMovementProtocol = val; __isset.preferredDataMovementProtocol = true; } @@ -141,7 +141,7 @@ uint32_t ComputeResourcePreference::read(::apache::thrift::protocol::TProtocol* if (ftype == ::apache::thrift::protocol::T_I32) { int32_t ecast1; xfer += iprot->readI32(ecast1); - this->preferredDataMovementProtocol = ( ::apache::airavata::model::appcatalog::computeresource::DataMovementProtocol::type)ecast1; + this->preferredDataMovementProtocol = ( ::apache::airavata::model::data::movement::DataMovementProtocol::type)ecast1; this->__isset.preferredDataMovementProtocol = true; } else { xfer += iprot->skip(ftype); http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/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 db23b4e..5437690 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 @@ -33,6 +33,7 @@ #include <thrift/cxxfunctional.h> #include "compute_resource_model_types.h" +#include "data_movement_models_types.h" namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace gatewayprofile { @@ -62,7 +63,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::appcatalog::computeresource::DataMovementProtocol::type)0), preferredBatchQueue(), scratchLocation(), allocationProjectNumber(), resourceSpecificCredentialStoreToken() { + 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() { } virtual ~ComputeResourcePreference() throw(); @@ -70,7 +71,7 @@ class ComputeResourcePreference { bool overridebyAiravata; std::string loginUserName; ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type preferredJobSubmissionProtocol; - ::apache::airavata::model::appcatalog::computeresource::DataMovementProtocol::type preferredDataMovementProtocol; + ::apache::airavata::model::data::movement::DataMovementProtocol::type preferredDataMovementProtocol; std::string preferredBatchQueue; std::string scratchLocation; std::string allocationProjectNumber; @@ -86,7 +87,7 @@ class ComputeResourcePreference { void __set_preferredJobSubmissionProtocol(const ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type val); - void __set_preferredDataMovementProtocol(const ::apache::airavata::model::appcatalog::computeresource::DataMovementProtocol::type val); + void __set_preferredDataMovementProtocol(const ::apache::airavata::model::data::movement::DataMovementProtocol::type val); void __set_preferredBatchQueue(const std::string& val); http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.cpp index 12a5cc9..be7cca2 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.cpp @@ -123,8 +123,13 @@ void ProcessModel::__set_emailAddresses(const std::vector<std::string> & val) { __isset.emailAddresses = true; } -const char* ProcessModel::ascii_fingerprint = "DD9F28E8C54528EC5BBC117D76D7BC84"; -const uint8_t ProcessModel::binary_fingerprint[16] = {0xDD,0x9F,0x28,0xE8,0xC5,0x45,0x28,0xEC,0x5B,0xBC,0x11,0x7D,0x76,0xD7,0xBC,0x84}; +void ProcessModel::__set_storageResourceId(const std::string& val) { + this->storageResourceId = val; +__isset.storageResourceId = true; +} + +const char* ProcessModel::ascii_fingerprint = "310420C32600E5B38338E13CDB526950"; +const uint8_t ProcessModel::binary_fingerprint[16] = {0x31,0x04,0x20,0xC3,0x26,0x00,0xE5,0xB3,0x83,0x38,0xE1,0x3C,0xDB,0x52,0x69,0x50}; uint32_t ProcessModel::read(::apache::thrift::protocol::TProtocol* iprot) { @@ -340,6 +345,14 @@ uint32_t ProcessModel::read(::apache::thrift::protocol::TProtocol* iprot) { xfer += iprot->skip(ftype); } break; + case 19: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->storageResourceId); + this->__isset.storageResourceId = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -481,6 +494,11 @@ uint32_t ProcessModel::write(::apache::thrift::protocol::TProtocol* oprot) const } xfer += oprot->writeFieldEnd(); } + if (this->__isset.storageResourceId) { + xfer += oprot->writeFieldBegin("storageResourceId", ::apache::thrift::protocol::T_STRING, 19); + xfer += oprot->writeString(this->storageResourceId); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); oprot->decrementRecursionDepth(); @@ -507,6 +525,7 @@ void swap(ProcessModel &a, ProcessModel &b) { swap(a.gatewayExecutionId, b.gatewayExecutionId); swap(a.enableEmailNotification, b.enableEmailNotification); swap(a.emailAddresses, b.emailAddresses); + swap(a.storageResourceId, b.storageResourceId); swap(a.__isset, b.__isset); } @@ -529,6 +548,7 @@ ProcessModel::ProcessModel(const ProcessModel& other24) { gatewayExecutionId = other24.gatewayExecutionId; enableEmailNotification = other24.enableEmailNotification; emailAddresses = other24.emailAddresses; + storageResourceId = other24.storageResourceId; __isset = other24.__isset; } ProcessModel& ProcessModel::operator=(const ProcessModel& other25) { @@ -550,6 +570,7 @@ ProcessModel& ProcessModel::operator=(const ProcessModel& other25) { gatewayExecutionId = other25.gatewayExecutionId; enableEmailNotification = other25.enableEmailNotification; emailAddresses = other25.emailAddresses; + storageResourceId = other25.storageResourceId; __isset = other25.__isset; return *this; } @@ -574,6 +595,7 @@ std::ostream& operator<<(std::ostream& out, const ProcessModel& obj) { out << ", " << "gatewayExecutionId="; (obj.__isset.gatewayExecutionId ? (out << to_string(obj.gatewayExecutionId)) : (out << "<null>")); out << ", " << "enableEmailNotification="; (obj.__isset.enableEmailNotification ? (out << to_string(obj.enableEmailNotification)) : (out << "<null>")); out << ", " << "emailAddresses="; (obj.__isset.emailAddresses ? (out << to_string(obj.emailAddresses)) : (out << "<null>")); + out << ", " << "storageResourceId="; (obj.__isset.storageResourceId ? (out << to_string(obj.storageResourceId)) : (out << "<null>")); out << ")"; return out; } http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.h index 8234941..599f7d0 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.h +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.h @@ -44,7 +44,7 @@ namespace apache { namespace airavata { namespace model { namespace process { class ProcessModel; typedef struct _ProcessModel__isset { - _ProcessModel__isset() : creationTime(false), lastUpdateTime(false), processStatus(false), processDetail(false), applicationInterfaceId(false), applicationDeploymentId(false), computeResourceId(false), processInputs(false), processOutputs(false), resourceSchedule(false), tasks(false), taskDag(false), processError(false), gatewayExecutionId(false), enableEmailNotification(false), emailAddresses(false) {} + _ProcessModel__isset() : creationTime(false), lastUpdateTime(false), processStatus(false), processDetail(false), applicationInterfaceId(false), applicationDeploymentId(false), computeResourceId(false), processInputs(false), processOutputs(false), resourceSchedule(false), tasks(false), taskDag(false), processError(false), gatewayExecutionId(false), enableEmailNotification(false), emailAddresses(false), storageResourceId(false) {} bool creationTime :1; bool lastUpdateTime :1; bool processStatus :1; @@ -61,17 +61,18 @@ typedef struct _ProcessModel__isset { bool gatewayExecutionId :1; bool enableEmailNotification :1; bool emailAddresses :1; + bool storageResourceId :1; } _ProcessModel__isset; class ProcessModel { public: - static const char* ascii_fingerprint; // = "DD9F28E8C54528EC5BBC117D76D7BC84"; - static const uint8_t binary_fingerprint[16]; // = {0xDD,0x9F,0x28,0xE8,0xC5,0x45,0x28,0xEC,0x5B,0xBC,0x11,0x7D,0x76,0xD7,0xBC,0x84}; + static const char* ascii_fingerprint; // = "310420C32600E5B38338E13CDB526950"; + static const uint8_t binary_fingerprint[16]; // = {0x31,0x04,0x20,0xC3,0x26,0x00,0xE5,0xB3,0x83,0x38,0xE1,0x3C,0xDB,0x52,0x69,0x50}; ProcessModel(const ProcessModel&); ProcessModel& operator=(const ProcessModel&); - ProcessModel() : processId("DO_NOT_SET_AT_CLIENTS"), experimentId(), creationTime(0), lastUpdateTime(0), processDetail(), applicationInterfaceId(), applicationDeploymentId(), computeResourceId(), taskDag(), gatewayExecutionId(), enableEmailNotification(0) { + ProcessModel() : processId("DO_NOT_SET_AT_CLIENTS"), experimentId(), creationTime(0), lastUpdateTime(0), processDetail(), applicationInterfaceId(), applicationDeploymentId(), computeResourceId(), taskDag(), gatewayExecutionId(), enableEmailNotification(0), storageResourceId() { } virtual ~ProcessModel() throw(); @@ -93,6 +94,7 @@ class ProcessModel { std::string gatewayExecutionId; bool enableEmailNotification; std::vector<std::string> emailAddresses; + std::string storageResourceId; _ProcessModel__isset __isset; @@ -132,6 +134,8 @@ class ProcessModel { void __set_emailAddresses(const std::vector<std::string> & val); + void __set_storageResourceId(const std::string& val); + bool operator == (const ProcessModel & rhs) const { if (!(processId == rhs.processId)) @@ -202,6 +206,10 @@ class ProcessModel { return false; else if (__isset.emailAddresses && !(emailAddresses == rhs.emailAddresses)) return false; + if (__isset.storageResourceId != rhs.__isset.storageResourceId) + return false; + else if (__isset.storageResourceId && !(storageResourceId == rhs.storageResourceId)) + return false; return true; } bool operator != (const ProcessModel &rhs) const { http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/storage_resource_model_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/storage_resource_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/storage_resource_model_types.cpp index 7c1fd7f..f816c02 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/storage_resource_model_types.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/storage_resource_model_types.cpp @@ -53,7 +53,7 @@ void StorageResourceDescription::__set_enabled(const bool val) { __isset.enabled = true; } -void StorageResourceDescription::__set_dataMovementInterfaces(const std::vector< ::apache::airavata::model::appcatalog::computeresource::DataMovementInterface> & val) { +void StorageResourceDescription::__set_dataMovementInterfaces(const std::vector< ::apache::airavata::model::data::movement::DataMovementInterface> & val) { this->dataMovementInterfaces = val; __isset.dataMovementInterfaces = true; } @@ -178,7 +178,7 @@ uint32_t StorageResourceDescription::write(::apache::thrift::protocol::TProtocol xfer += oprot->writeFieldBegin("dataMovementInterfaces", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->dataMovementInterfaces.size())); - std::vector< ::apache::airavata::model::appcatalog::computeresource::DataMovementInterface> ::const_iterator _iter5; + std::vector< ::apache::airavata::model::data::movement::DataMovementInterface> ::const_iterator _iter5; for (_iter5 = this->dataMovementInterfaces.begin(); _iter5 != this->dataMovementInterfaces.end(); ++_iter5) { xfer += (*_iter5).write(oprot); http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/storage_resource_model_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/storage_resource_model_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/storage_resource_model_types.h index 5382cdc..592094e 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/storage_resource_model_types.h +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/storage_resource_model_types.h @@ -33,7 +33,7 @@ #include <thrift/cxxfunctional.h> #include "airavata_commons_types.h" -#include "compute_resource_model_types.h" +#include "data_movement_models_types.h" namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace storageresource { @@ -63,7 +63,7 @@ class StorageResourceDescription { std::string hostName; std::string storageResourceDescription; bool enabled; - std::vector< ::apache::airavata::model::appcatalog::computeresource::DataMovementInterface> dataMovementInterfaces; + std::vector< ::apache::airavata::model::data::movement::DataMovementInterface> dataMovementInterfaces; _StorageResourceDescription__isset __isset; @@ -75,7 +75,7 @@ class StorageResourceDescription { void __set_enabled(const bool val); - void __set_dataMovementInterfaces(const std::vector< ::apache::airavata::model::appcatalog::computeresource::DataMovementInterface> & val); + void __set_dataMovementInterfaces(const std::vector< ::apache::airavata::model::data::movement::DataMovementInterface> & val); bool operator == (const StorageResourceDescription & rhs) const { http://git-wip-us.apache.org/repos/asf/airavata/blob/ca89eaee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.cpp index c99a9e0..30ba1e9 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.cpp @@ -636,7 +636,7 @@ void EnvironmentSetupTaskModel::__set_location(const std::string& val) { this->location = val; } -void EnvironmentSetupTaskModel::__set_protocol(const ::apache::airavata::model::appcatalog::computeresource::SecurityProtocol::type val) { +void EnvironmentSetupTaskModel::__set_protocol(const ::apache::airavata::model::data::movement::SecurityProtocol::type val) { this->protocol = val; } @@ -677,7 +677,7 @@ uint32_t EnvironmentSetupTaskModel::read(::apache::thrift::protocol::TProtocol* if (ftype == ::apache::thrift::protocol::T_I32) { int32_t ecast12; xfer += iprot->readI32(ecast12); - this->protocol = ( ::apache::airavata::model::appcatalog::computeresource::SecurityProtocol::type)ecast12; + this->protocol = ( ::apache::airavata::model::data::movement::SecurityProtocol::type)ecast12; isset_protocol = true; } else { xfer += iprot->skip(ftype);
