http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h index 3bbe805..d5eb326 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h @@ -109,6 +109,10 @@ class AiravataIf { virtual bool changeDataMovementPriorities(const std::map<std::string, int32_t> & dataMovementPriorityMap) = 0; virtual bool deleteJobSubmissionInterface(const std::string& jobSubmissionInterfaceId) = 0; virtual bool deleteDataMovementInterface(const std::string& dataMovementInterfaceId) = 0; + virtual void registerResourceJobManager(std::string& _return, const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager) = 0; + virtual bool updateResourceJobManager(const std::string& resourceJobManagerId, const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& updatedResourceJobManager) = 0; + virtual void getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& _return, const std::string& resourceJobManagerId) = 0; + virtual bool deleteResourceJobManager(const std::string& resourceJobManagerId) = 0; virtual void registerGatewayResourceProfile(std::string& _return, const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) = 0; virtual void getGatewayResourceProfile( ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& _return, const std::string& gatewayID) = 0; virtual bool updateGatewayResourceProfile(const std::string& gatewayID, const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) = 0; @@ -399,6 +403,20 @@ class AiravataNull : virtual public AiravataIf { bool _return = false; return _return; } + void registerResourceJobManager(std::string& /* _return */, const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& /* resourceJobManager */) { + return; + } + bool updateResourceJobManager(const std::string& /* resourceJobManagerId */, const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& /* updatedResourceJobManager */) { + bool _return = false; + return _return; + } + void getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& /* _return */, const std::string& /* resourceJobManagerId */) { + return; + } + bool deleteResourceJobManager(const std::string& /* resourceJobManagerId */) { + bool _return = false; + return _return; + } void registerGatewayResourceProfile(std::string& /* _return */, const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& /* gatewayResourceProfile */) { return; } @@ -10909,6 +10927,542 @@ class Airavata_deleteDataMovementInterface_presult { }; +class Airavata_registerResourceJobManager_args { + public: + + Airavata_registerResourceJobManager_args() { + } + + virtual ~Airavata_registerResourceJobManager_args() throw() {} + + ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager resourceJobManager; + + void __set_resourceJobManager(const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& val) { + resourceJobManager = val; + } + + bool operator == (const Airavata_registerResourceJobManager_args & rhs) const + { + if (!(resourceJobManager == rhs.resourceJobManager)) + return false; + return true; + } + bool operator != (const Airavata_registerResourceJobManager_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_registerResourceJobManager_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Airavata_registerResourceJobManager_pargs { + public: + + + virtual ~Airavata_registerResourceJobManager_pargs() throw() {} + + const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager* resourceJobManager; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_registerResourceJobManager_result__isset { + _Airavata_registerResourceJobManager_result__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success; + bool ire; + bool ace; + bool ase; +} _Airavata_registerResourceJobManager_result__isset; + +class Airavata_registerResourceJobManager_result { + public: + + Airavata_registerResourceJobManager_result() : success() { + } + + virtual ~Airavata_registerResourceJobManager_result() throw() {} + + std::string success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_registerResourceJobManager_result__isset __isset; + + void __set_success(const std::string& val) { + success = val; + } + + void __set_ire(const ::apache::airavata::api::error::InvalidRequestException& val) { + ire = val; + } + + void __set_ace(const ::apache::airavata::api::error::AiravataClientException& val) { + ace = val; + } + + void __set_ase(const ::apache::airavata::api::error::AiravataSystemException& val) { + ase = val; + } + + bool operator == (const Airavata_registerResourceJobManager_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ire == rhs.ire)) + return false; + if (!(ace == rhs.ace)) + return false; + if (!(ase == rhs.ase)) + return false; + return true; + } + bool operator != (const Airavata_registerResourceJobManager_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_registerResourceJobManager_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_registerResourceJobManager_presult__isset { + _Airavata_registerResourceJobManager_presult__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success; + bool ire; + bool ace; + bool ase; +} _Airavata_registerResourceJobManager_presult__isset; + +class Airavata_registerResourceJobManager_presult { + public: + + + virtual ~Airavata_registerResourceJobManager_presult() throw() {} + + std::string* success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_registerResourceJobManager_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class Airavata_updateResourceJobManager_args { + public: + + Airavata_updateResourceJobManager_args() : resourceJobManagerId() { + } + + virtual ~Airavata_updateResourceJobManager_args() throw() {} + + std::string resourceJobManagerId; + ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager updatedResourceJobManager; + + void __set_resourceJobManagerId(const std::string& val) { + resourceJobManagerId = val; + } + + void __set_updatedResourceJobManager(const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& val) { + updatedResourceJobManager = val; + } + + bool operator == (const Airavata_updateResourceJobManager_args & rhs) const + { + if (!(resourceJobManagerId == rhs.resourceJobManagerId)) + return false; + if (!(updatedResourceJobManager == rhs.updatedResourceJobManager)) + return false; + return true; + } + bool operator != (const Airavata_updateResourceJobManager_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_updateResourceJobManager_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Airavata_updateResourceJobManager_pargs { + public: + + + virtual ~Airavata_updateResourceJobManager_pargs() throw() {} + + const std::string* resourceJobManagerId; + const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager* updatedResourceJobManager; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_updateResourceJobManager_result__isset { + _Airavata_updateResourceJobManager_result__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success; + bool ire; + bool ace; + bool ase; +} _Airavata_updateResourceJobManager_result__isset; + +class Airavata_updateResourceJobManager_result { + public: + + Airavata_updateResourceJobManager_result() : success(0) { + } + + virtual ~Airavata_updateResourceJobManager_result() throw() {} + + bool success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_updateResourceJobManager_result__isset __isset; + + void __set_success(const bool val) { + success = val; + } + + void __set_ire(const ::apache::airavata::api::error::InvalidRequestException& val) { + ire = val; + } + + void __set_ace(const ::apache::airavata::api::error::AiravataClientException& val) { + ace = val; + } + + void __set_ase(const ::apache::airavata::api::error::AiravataSystemException& val) { + ase = val; + } + + bool operator == (const Airavata_updateResourceJobManager_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ire == rhs.ire)) + return false; + if (!(ace == rhs.ace)) + return false; + if (!(ase == rhs.ase)) + return false; + return true; + } + bool operator != (const Airavata_updateResourceJobManager_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_updateResourceJobManager_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_updateResourceJobManager_presult__isset { + _Airavata_updateResourceJobManager_presult__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success; + bool ire; + bool ace; + bool ase; +} _Airavata_updateResourceJobManager_presult__isset; + +class Airavata_updateResourceJobManager_presult { + public: + + + virtual ~Airavata_updateResourceJobManager_presult() throw() {} + + bool* success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_updateResourceJobManager_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class Airavata_getResourceJobManager_args { + public: + + Airavata_getResourceJobManager_args() : resourceJobManagerId() { + } + + virtual ~Airavata_getResourceJobManager_args() throw() {} + + std::string resourceJobManagerId; + + void __set_resourceJobManagerId(const std::string& val) { + resourceJobManagerId = val; + } + + bool operator == (const Airavata_getResourceJobManager_args & rhs) const + { + if (!(resourceJobManagerId == rhs.resourceJobManagerId)) + return false; + return true; + } + bool operator != (const Airavata_getResourceJobManager_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_getResourceJobManager_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Airavata_getResourceJobManager_pargs { + public: + + + virtual ~Airavata_getResourceJobManager_pargs() throw() {} + + const std::string* resourceJobManagerId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_getResourceJobManager_result__isset { + _Airavata_getResourceJobManager_result__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success; + bool ire; + bool ace; + bool ase; +} _Airavata_getResourceJobManager_result__isset; + +class Airavata_getResourceJobManager_result { + public: + + Airavata_getResourceJobManager_result() { + } + + virtual ~Airavata_getResourceJobManager_result() throw() {} + + ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_getResourceJobManager_result__isset __isset; + + void __set_success(const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& val) { + success = val; + } + + void __set_ire(const ::apache::airavata::api::error::InvalidRequestException& val) { + ire = val; + } + + void __set_ace(const ::apache::airavata::api::error::AiravataClientException& val) { + ace = val; + } + + void __set_ase(const ::apache::airavata::api::error::AiravataSystemException& val) { + ase = val; + } + + bool operator == (const Airavata_getResourceJobManager_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ire == rhs.ire)) + return false; + if (!(ace == rhs.ace)) + return false; + if (!(ase == rhs.ase)) + return false; + return true; + } + bool operator != (const Airavata_getResourceJobManager_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_getResourceJobManager_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_getResourceJobManager_presult__isset { + _Airavata_getResourceJobManager_presult__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success; + bool ire; + bool ace; + bool ase; +} _Airavata_getResourceJobManager_presult__isset; + +class Airavata_getResourceJobManager_presult { + public: + + + virtual ~Airavata_getResourceJobManager_presult() throw() {} + + ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager* success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_getResourceJobManager_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class Airavata_deleteResourceJobManager_args { + public: + + Airavata_deleteResourceJobManager_args() : resourceJobManagerId() { + } + + virtual ~Airavata_deleteResourceJobManager_args() throw() {} + + std::string resourceJobManagerId; + + void __set_resourceJobManagerId(const std::string& val) { + resourceJobManagerId = val; + } + + bool operator == (const Airavata_deleteResourceJobManager_args & rhs) const + { + if (!(resourceJobManagerId == rhs.resourceJobManagerId)) + return false; + return true; + } + bool operator != (const Airavata_deleteResourceJobManager_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_deleteResourceJobManager_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Airavata_deleteResourceJobManager_pargs { + public: + + + virtual ~Airavata_deleteResourceJobManager_pargs() throw() {} + + const std::string* resourceJobManagerId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_deleteResourceJobManager_result__isset { + _Airavata_deleteResourceJobManager_result__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success; + bool ire; + bool ace; + bool ase; +} _Airavata_deleteResourceJobManager_result__isset; + +class Airavata_deleteResourceJobManager_result { + public: + + Airavata_deleteResourceJobManager_result() : success(0) { + } + + virtual ~Airavata_deleteResourceJobManager_result() throw() {} + + bool success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_deleteResourceJobManager_result__isset __isset; + + void __set_success(const bool val) { + success = val; + } + + void __set_ire(const ::apache::airavata::api::error::InvalidRequestException& val) { + ire = val; + } + + void __set_ace(const ::apache::airavata::api::error::AiravataClientException& val) { + ace = val; + } + + void __set_ase(const ::apache::airavata::api::error::AiravataSystemException& val) { + ase = val; + } + + bool operator == (const Airavata_deleteResourceJobManager_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ire == rhs.ire)) + return false; + if (!(ace == rhs.ace)) + return false; + if (!(ase == rhs.ase)) + return false; + return true; + } + bool operator != (const Airavata_deleteResourceJobManager_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_deleteResourceJobManager_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_deleteResourceJobManager_presult__isset { + _Airavata_deleteResourceJobManager_presult__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success; + bool ire; + bool ace; + bool ase; +} _Airavata_deleteResourceJobManager_presult__isset; + +class Airavata_deleteResourceJobManager_presult { + public: + + + virtual ~Airavata_deleteResourceJobManager_presult() throw() {} + + bool* success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_deleteResourceJobManager_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + class Airavata_registerGatewayResourceProfile_args { public: @@ -12403,6 +12957,18 @@ class AiravataClient : virtual public AiravataIf { bool deleteDataMovementInterface(const std::string& dataMovementInterfaceId); void send_deleteDataMovementInterface(const std::string& dataMovementInterfaceId); bool recv_deleteDataMovementInterface(); + void registerResourceJobManager(std::string& _return, const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager); + void send_registerResourceJobManager(const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager); + void recv_registerResourceJobManager(std::string& _return); + bool updateResourceJobManager(const std::string& resourceJobManagerId, const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& updatedResourceJobManager); + void send_updateResourceJobManager(const std::string& resourceJobManagerId, const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& updatedResourceJobManager); + bool recv_updateResourceJobManager(); + void getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& _return, const std::string& resourceJobManagerId); + void send_getResourceJobManager(const std::string& resourceJobManagerId); + void recv_getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& _return); + bool deleteResourceJobManager(const std::string& resourceJobManagerId); + void send_deleteResourceJobManager(const std::string& resourceJobManagerId); + bool recv_deleteResourceJobManager(); void registerGatewayResourceProfile(std::string& _return, const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile); void send_registerGatewayResourceProfile(const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile); void recv_registerGatewayResourceProfile(std::string& _return); @@ -12522,6 +13088,10 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor { void process_changeDataMovementPriorities(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_deleteJobSubmissionInterface(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_deleteDataMovementInterface(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_registerResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_updateResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_deleteResourceJobManager(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_registerGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_getGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_updateGatewayResourceProfile(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); @@ -12611,6 +13181,10 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor { processMap_["changeDataMovementPriorities"] = &AiravataProcessor::process_changeDataMovementPriorities; processMap_["deleteJobSubmissionInterface"] = &AiravataProcessor::process_deleteJobSubmissionInterface; processMap_["deleteDataMovementInterface"] = &AiravataProcessor::process_deleteDataMovementInterface; + processMap_["registerResourceJobManager"] = &AiravataProcessor::process_registerResourceJobManager; + processMap_["updateResourceJobManager"] = &AiravataProcessor::process_updateResourceJobManager; + processMap_["getResourceJobManager"] = &AiravataProcessor::process_getResourceJobManager; + processMap_["deleteResourceJobManager"] = &AiravataProcessor::process_deleteResourceJobManager; processMap_["registerGatewayResourceProfile"] = &AiravataProcessor::process_registerGatewayResourceProfile; processMap_["getGatewayResourceProfile"] = &AiravataProcessor::process_getGatewayResourceProfile; processMap_["updateGatewayResourceProfile"] = &AiravataProcessor::process_updateGatewayResourceProfile; @@ -13391,6 +13965,44 @@ class AiravataMultiface : virtual public AiravataIf { return ifaces_[i]->deleteDataMovementInterface(dataMovementInterfaceId); } + void registerResourceJobManager(std::string& _return, const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->registerResourceJobManager(_return, resourceJobManager); + } + ifaces_[i]->registerResourceJobManager(_return, resourceJobManager); + return; + } + + bool updateResourceJobManager(const std::string& resourceJobManagerId, const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& updatedResourceJobManager) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->updateResourceJobManager(resourceJobManagerId, updatedResourceJobManager); + } + return ifaces_[i]->updateResourceJobManager(resourceJobManagerId, updatedResourceJobManager); + } + + void getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& _return, const std::string& resourceJobManagerId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getResourceJobManager(_return, resourceJobManagerId); + } + ifaces_[i]->getResourceJobManager(_return, resourceJobManagerId); + return; + } + + bool deleteResourceJobManager(const std::string& resourceJobManagerId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->deleteResourceJobManager(resourceJobManagerId); + } + return ifaces_[i]->deleteResourceJobManager(resourceJobManagerId); + } + void registerGatewayResourceProfile(std::string& _return, const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) { size_t sz = ifaces_.size(); size_t i = 0;
http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp index 6b062f4..fde48c0 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp @@ -424,6 +424,26 @@ class AiravataHandler : virtual public AiravataIf { printf("deleteDataMovementInterface\n"); } + void registerResourceJobManager(std::string& _return, const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& resourceJobManager) { + // Your implementation goes here + printf("registerResourceJobManager\n"); + } + + bool updateResourceJobManager(const std::string& resourceJobManagerId, const ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& updatedResourceJobManager) { + // Your implementation goes here + printf("updateResourceJobManager\n"); + } + + void getResourceJobManager( ::apache::airavata::model::appcatalog::computeresource::ResourceJobManager& _return, const std::string& resourceJobManagerId) { + // Your implementation goes here + printf("getResourceJobManager\n"); + } + + bool deleteResourceJobManager(const std::string& resourceJobManagerId) { + // Your implementation goes here + printf("deleteResourceJobManager\n"); + } + void registerGatewayResourceProfile(std::string& _return, const ::apache::airavata::model::appcatalog::gatewayprofile::GatewayResourceProfile& gatewayResourceProfile) { // Your implementation goes here printf("registerGatewayResourceProfile\n"); http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php index 792d8d3..3181377 100644 --- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php +++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php @@ -94,6 +94,10 @@ interface AiravataIf { public function changeDataMovementPriorities($dataMovementPriorityMap); public function deleteJobSubmissionInterface($jobSubmissionInterfaceId); public function deleteDataMovementInterface($dataMovementInterfaceId); + public function registerResourceJobManager(\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $resourceJobManager); + public function updateResourceJobManager($resourceJobManagerId, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $updatedResourceJobManager); + public function getResourceJobManager($resourceJobManagerId); + public function deleteResourceJobManager($resourceJobManagerId); public function registerGatewayResourceProfile(\Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile); public function getGatewayResourceProfile($gatewayID); public function updateGatewayResourceProfile($gatewayID, \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile); @@ -4781,6 +4785,247 @@ class AiravataClient implements \Airavata\API\AiravataIf { throw new \Exception("deleteDataMovementInterface failed: unknown result"); } + public function registerResourceJobManager(\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $resourceJobManager) + { + $this->send_registerResourceJobManager($resourceJobManager); + return $this->recv_registerResourceJobManager(); + } + + public function send_registerResourceJobManager(\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $resourceJobManager) + { + $args = new \Airavata\API\Airavata_registerResourceJobManager_args(); + $args->resourceJobManager = $resourceJobManager; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'registerResourceJobManager', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('registerResourceJobManager', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_registerResourceJobManager() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_registerResourceJobManager_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \Airavata\API\Airavata_registerResourceJobManager_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ire !== null) { + throw $result->ire; + } + if ($result->ace !== null) { + throw $result->ace; + } + if ($result->ase !== null) { + throw $result->ase; + } + throw new \Exception("registerResourceJobManager failed: unknown result"); + } + + public function updateResourceJobManager($resourceJobManagerId, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $updatedResourceJobManager) + { + $this->send_updateResourceJobManager($resourceJobManagerId, $updatedResourceJobManager); + return $this->recv_updateResourceJobManager(); + } + + public function send_updateResourceJobManager($resourceJobManagerId, \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager $updatedResourceJobManager) + { + $args = new \Airavata\API\Airavata_updateResourceJobManager_args(); + $args->resourceJobManagerId = $resourceJobManagerId; + $args->updatedResourceJobManager = $updatedResourceJobManager; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'updateResourceJobManager', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('updateResourceJobManager', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_updateResourceJobManager() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_updateResourceJobManager_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \Airavata\API\Airavata_updateResourceJobManager_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ire !== null) { + throw $result->ire; + } + if ($result->ace !== null) { + throw $result->ace; + } + if ($result->ase !== null) { + throw $result->ase; + } + throw new \Exception("updateResourceJobManager failed: unknown result"); + } + + public function getResourceJobManager($resourceJobManagerId) + { + $this->send_getResourceJobManager($resourceJobManagerId); + return $this->recv_getResourceJobManager(); + } + + public function send_getResourceJobManager($resourceJobManagerId) + { + $args = new \Airavata\API\Airavata_getResourceJobManager_args(); + $args->resourceJobManagerId = $resourceJobManagerId; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getResourceJobManager', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getResourceJobManager', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getResourceJobManager() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getResourceJobManager_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \Airavata\API\Airavata_getResourceJobManager_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ire !== null) { + throw $result->ire; + } + if ($result->ace !== null) { + throw $result->ace; + } + if ($result->ase !== null) { + throw $result->ase; + } + throw new \Exception("getResourceJobManager failed: unknown result"); + } + + public function deleteResourceJobManager($resourceJobManagerId) + { + $this->send_deleteResourceJobManager($resourceJobManagerId); + return $this->recv_deleteResourceJobManager(); + } + + public function send_deleteResourceJobManager($resourceJobManagerId) + { + $args = new \Airavata\API\Airavata_deleteResourceJobManager_args(); + $args->resourceJobManagerId = $resourceJobManagerId; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'deleteResourceJobManager', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('deleteResourceJobManager', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_deleteResourceJobManager() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_deleteResourceJobManager_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \Airavata\API\Airavata_deleteResourceJobManager_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ire !== null) { + throw $result->ire; + } + if ($result->ace !== null) { + throw $result->ace; + } + if ($result->ase !== null) { + throw $result->ase; + } + throw new \Exception("deleteResourceJobManager failed: unknown result"); + } + public function registerGatewayResourceProfile(\Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile $gatewayResourceProfile) { $this->send_registerGatewayResourceProfile($gatewayResourceProfile); @@ -23173,6 +23418,881 @@ class Airavata_deleteDataMovementInterface_result { } +class Airavata_registerResourceJobManager_args { + static $_TSPEC; + + public $resourceJobManager = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'resourceJobManager', + 'type' => TType::STRUCT, + 'class' => '\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['resourceJobManager'])) { + $this->resourceJobManager = $vals['resourceJobManager']; + } + } + } + + public function getName() { + return 'Airavata_registerResourceJobManager_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->resourceJobManager = new \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager(); + $xfer += $this->resourceJobManager->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Airavata_registerResourceJobManager_args'); + if ($this->resourceJobManager !== null) { + if (!is_object($this->resourceJobManager)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('resourceJobManager', TType::STRUCT, 1); + $xfer += $this->resourceJobManager->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Airavata_registerResourceJobManager_result { + static $_TSPEC; + + public $success = null; + public $ire = null; + public $ace = null; + public $ase = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\InvalidRequestException', + ), + 2 => array( + 'var' => 'ace', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\AiravataClientException', + ), + 3 => array( + 'var' => 'ase', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\AiravataSystemException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ire'])) { + $this->ire = $vals['ire']; + } + if (isset($vals['ace'])) { + $this->ace = $vals['ace']; + } + if (isset($vals['ase'])) { + $this->ase = $vals['ase']; + } + } + } + + public function getName() { + return 'Airavata_registerResourceJobManager_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ire = new \Airavata\API\Error\InvalidRequestException(); + $xfer += $this->ire->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ace = new \Airavata\API\Error\AiravataClientException(); + $xfer += $this->ace->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->ase = new \Airavata\API\Error\AiravataSystemException(); + $xfer += $this->ase->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Airavata_registerResourceJobManager_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->ire !== null) { + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); + $xfer += $this->ire->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ace !== null) { + $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2); + $xfer += $this->ace->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ase !== null) { + $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3); + $xfer += $this->ase->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Airavata_updateResourceJobManager_args { + static $_TSPEC; + + public $resourceJobManagerId = null; + public $updatedResourceJobManager = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'resourceJobManagerId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'updatedResourceJobManager', + 'type' => TType::STRUCT, + 'class' => '\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['resourceJobManagerId'])) { + $this->resourceJobManagerId = $vals['resourceJobManagerId']; + } + if (isset($vals['updatedResourceJobManager'])) { + $this->updatedResourceJobManager = $vals['updatedResourceJobManager']; + } + } + } + + public function getName() { + return 'Airavata_updateResourceJobManager_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->resourceJobManagerId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->updatedResourceJobManager = new \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager(); + $xfer += $this->updatedResourceJobManager->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Airavata_updateResourceJobManager_args'); + if ($this->resourceJobManagerId !== null) { + $xfer += $output->writeFieldBegin('resourceJobManagerId', TType::STRING, 1); + $xfer += $output->writeString($this->resourceJobManagerId); + $xfer += $output->writeFieldEnd(); + } + if ($this->updatedResourceJobManager !== null) { + if (!is_object($this->updatedResourceJobManager)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('updatedResourceJobManager', TType::STRUCT, 2); + $xfer += $this->updatedResourceJobManager->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Airavata_updateResourceJobManager_result { + static $_TSPEC; + + public $success = null; + public $ire = null; + public $ace = null; + public $ase = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\InvalidRequestException', + ), + 2 => array( + 'var' => 'ace', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\AiravataClientException', + ), + 3 => array( + 'var' => 'ase', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\AiravataSystemException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ire'])) { + $this->ire = $vals['ire']; + } + if (isset($vals['ace'])) { + $this->ace = $vals['ace']; + } + if (isset($vals['ase'])) { + $this->ase = $vals['ase']; + } + } + } + + public function getName() { + return 'Airavata_updateResourceJobManager_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ire = new \Airavata\API\Error\InvalidRequestException(); + $xfer += $this->ire->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ace = new \Airavata\API\Error\AiravataClientException(); + $xfer += $this->ace->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->ase = new \Airavata\API\Error\AiravataSystemException(); + $xfer += $this->ase->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Airavata_updateResourceJobManager_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->ire !== null) { + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); + $xfer += $this->ire->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ace !== null) { + $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2); + $xfer += $this->ace->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ase !== null) { + $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3); + $xfer += $this->ase->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Airavata_getResourceJobManager_args { + static $_TSPEC; + + public $resourceJobManagerId = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'resourceJobManagerId', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['resourceJobManagerId'])) { + $this->resourceJobManagerId = $vals['resourceJobManagerId']; + } + } + } + + public function getName() { + return 'Airavata_getResourceJobManager_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->resourceJobManagerId); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Airavata_getResourceJobManager_args'); + if ($this->resourceJobManagerId !== null) { + $xfer += $output->writeFieldBegin('resourceJobManagerId', TType::STRING, 1); + $xfer += $output->writeString($this->resourceJobManagerId); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Airavata_getResourceJobManager_result { + static $_TSPEC; + + public $success = null; + public $ire = null; + public $ace = null; + public $ase = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager', + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\InvalidRequestException', + ), + 2 => array( + 'var' => 'ace', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\AiravataClientException', + ), + 3 => array( + 'var' => 'ase', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\AiravataSystemException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ire'])) { + $this->ire = $vals['ire']; + } + if (isset($vals['ace'])) { + $this->ace = $vals['ace']; + } + if (isset($vals['ase'])) { + $this->ase = $vals['ase']; + } + } + } + + public function getName() { + return 'Airavata_getResourceJobManager_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ire = new \Airavata\API\Error\InvalidRequestException(); + $xfer += $this->ire->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ace = new \Airavata\API\Error\AiravataClientException(); + $xfer += $this->ace->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->ase = new \Airavata\API\Error\AiravataSystemException(); + $xfer += $this->ase->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Airavata_getResourceJobManager_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ire !== null) { + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); + $xfer += $this->ire->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ace !== null) { + $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2); + $xfer += $this->ace->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ase !== null) { + $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3); + $xfer += $this->ase->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Airavata_deleteResourceJobManager_args { + static $_TSPEC; + + public $resourceJobManagerId = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'resourceJobManagerId', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['resourceJobManagerId'])) { + $this->resourceJobManagerId = $vals['resourceJobManagerId']; + } + } + } + + public function getName() { + return 'Airavata_deleteResourceJobManager_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->resourceJobManagerId); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Airavata_deleteResourceJobManager_args'); + if ($this->resourceJobManagerId !== null) { + $xfer += $output->writeFieldBegin('resourceJobManagerId', TType::STRING, 1); + $xfer += $output->writeString($this->resourceJobManagerId); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Airavata_deleteResourceJobManager_result { + static $_TSPEC; + + public $success = null; + public $ire = null; + public $ace = null; + public $ase = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\InvalidRequestException', + ), + 2 => array( + 'var' => 'ace', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\AiravataClientException', + ), + 3 => array( + 'var' => 'ase', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\AiravataSystemException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ire'])) { + $this->ire = $vals['ire']; + } + if (isset($vals['ace'])) { + $this->ace = $vals['ace']; + } + if (isset($vals['ase'])) { + $this->ase = $vals['ase']; + } + } + } + + public function getName() { + return 'Airavata_deleteResourceJobManager_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ire = new \Airavata\API\Error\InvalidRequestException(); + $xfer += $this->ire->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ace = new \Airavata\API\Error\AiravataClientException(); + $xfer += $this->ace->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->ase = new \Airavata\API\Error\AiravataSystemException(); + $xfer += $this->ase->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Airavata_deleteResourceJobManager_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->ire !== null) { + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); + $xfer += $this->ire->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ace !== null) { + $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2); + $xfer += $this->ace->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ase !== null) { + $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3); + $xfer += $this->ase->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class Airavata_registerGatewayResourceProfile_args { static $_TSPEC; http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/airavata-api/thrift-interface-descriptions/airavataAPI.thrift ---------------------------------------------------------------------- diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift index b931391..2a051af 100644 --- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift +++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift @@ -1368,6 +1368,25 @@ service Airavata { 2: airavataErrors.AiravataClientException ace, 3: airavataErrors.AiravataSystemException ase) + string registerResourceJobManager(1: required computeResourceModel.ResourceJobManager resourceJobManager) + throws (1: airavataErrors.InvalidRequestException ire, + 2: airavataErrors.AiravataClientException ace, + 3: airavataErrors.AiravataSystemException ase) + + bool updateResourceJobManager(1: required string resourceJobManagerId, 2: required computeResourceModel.ResourceJobManager updatedResourceJobManager) + throws (1: airavataErrors.InvalidRequestException ire, + 2: airavataErrors.AiravataClientException ace, + 3: airavataErrors.AiravataSystemException ase) + + computeResourceModel.ResourceJobManager getResourceJobManager(1: required string resourceJobManagerId) + throws (1: airavataErrors.InvalidRequestException ire, + 2: airavataErrors.AiravataClientException ace, + 3: airavataErrors.AiravataSystemException ase) + + bool deleteResourceJobManager(1: required string resourceJobManagerId) + throws (1: airavataErrors.InvalidRequestException ire, + 2: airavataErrors.AiravataClientException ace, + 3: airavataErrors.AiravataSystemException ase) /* * Gateway Resource Profile * http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java index 059e071..7ece54d 100644 --- a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java +++ b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java @@ -55,6 +55,12 @@ public interface ComputeResource { String addResourceJobManager(ResourceJobManager resourceJobManager) throws AppCatalogException; + + void updateResourceJobManager (String resourceJobManagerId, ResourceJobManager updatedResourceJobManager) throws AppCatalogException; + + ResourceJobManager getResourceJobManager (String resourceJobManagerId) throws AppCatalogException; + + void deleteResourceJobManager (String resourceJobManagerId) throws AppCatalogException; /** * This will add a SSHJobSubmission protocol to the database @@ -79,6 +85,7 @@ public interface ComputeResource { String addUNICOREJobSubmission (UnicoreJobSubmission unicoreJobSubmission) throws AppCatalogException; + String addLocalDataMovement (LOCALDataMovement localDataMovement) throws AppCatalogException; /** http://git-wip-us.apache.org/repos/asf/airavata/blob/8b82bee9/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java index 023c103..dd1982e 100644 --- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java +++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java @@ -738,7 +738,56 @@ public class ComputeResourceImpl implements ComputeResource { return resource.getResourceJobManagerId(); } - @Override + @Override + public void updateResourceJobManager(String resourceJobManagerId, ResourceJobManager updatedResourceJobManager) throws AppCatalogException { + try { + ResourceJobManagerResource resource = AppCatalogThriftConversion.getResourceJobManager(updatedResourceJobManager); + resource.setResourceJobManagerId(resourceJobManagerId); + resource.save(); + Map<JobManagerCommand, String> jobManagerCommands = updatedResourceJobManager.getJobManagerCommands(); + if (jobManagerCommands!=null) { + for (JobManagerCommand commandType : jobManagerCommands.keySet()) { + JobManagerCommandResource r = new JobManagerCommandResource(); + Map<String, String> ids = new HashMap<String, String>(); + ids.put(AbstractResource.JobManagerCommandConstants.RESOURCE_JOB_MANAGER_ID, resourceJobManagerId); + ids.put(AbstractResource.JobManagerCommandConstants.COMMAND_TYPE, commandType.toString()); + JobManagerCommandResource existingCommand = (JobManagerCommandResource)r.get(ids); + existingCommand.setCommandType(commandType.toString()); + existingCommand.setCommand(jobManagerCommands.get(commandType)); + existingCommand.setResourceJobManagerId(resource.getResourceJobManagerId()); + existingCommand.save(); + } + } + }catch (Exception e){ + logger.error("Error while updating resource job manager..", e); + throw new AppCatalogException(e); + } + } + + @Override + public ResourceJobManager getResourceJobManager(String resourceJobManagerId) throws AppCatalogException { + try { + ResourceJobManagerResource resource = new ResourceJobManagerResource(); + ResourceJobManagerResource jobManagerResource = (ResourceJobManagerResource)resource.get(resourceJobManagerId); + return AppCatalogThriftConversion.getResourceJobManager(jobManagerResource); + }catch (Exception e){ + logger.error("Error while retrieving resource job manager..", e); + throw new AppCatalogException(e); + } + } + + @Override + public void deleteResourceJobManager(String resourceJobManagerId) throws AppCatalogException { + try { + ResourceJobManagerResource resource = new ResourceJobManagerResource(); + resource.remove(resourceJobManagerId); + }catch (Exception e){ + logger.error("Error while deleting resource job manager..", e); + throw new AppCatalogException(e); + } + } + + @Override public String addLocalJobSubmission(LOCALSubmission localSubmission) throws AppCatalogException { localSubmission.setJobSubmissionInterfaceId(AppCatalogUtils.getID("LOCAL"));
