http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/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 c3b9023..1af59e7 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 @@ -210,6 +210,32 @@ class AiravataIf { virtual void generateAndRegisterSSHKeys(std::string& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userName) = 0; /** + * Generate and Register SSH Key Pair with Airavata Credential Store. + * + * @param gatewayId + * The identifier for the requested Gateway. + * + * @param userName + * The User for which the credential should be registered. For community accounts, this user is the name of the + * community user name. For computational resources, this user name need not be the same user name on resoruces. + * + * @param description + * The description field for a credential type, all type of credential can have a description. + * + * @return airavataCredStoreToken + * An SSH Key pair is generated and stored in the credential store and associated with users or community account + * belonging to a Gateway. + * + * + * + * @param authzToken + * @param gatewayId + * @param userName + * @param description + */ + virtual void generateAndRegisterSSHKeysWithDescription(std::string& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userName, const std::string& description) = 0; + + /** * Generate and Register Username PWD Pair with Airavata Credential Store. * * @param gatewayId @@ -275,6 +301,48 @@ class AiravataIf { * @param gatewayId */ virtual void getAllGatewaySSHPubKeys(std::map<std::string, std::string> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId) = 0; + + /** + * + * Get all Public Keys of the Gateway + * + * @param CredStoreToken + * Credential Store Token which you want to find the Public Key for. + * + * @param gatewayId + * This is the unique identifier of your gateway where the token and public key was generated from. + * + * @return publicKey + * + * + * + * @param authzToken + * @param gatewayId + */ + virtual void getAllGatewaySSHPubKeysSummary(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId) = 0; + + /** + * + * Get all Public Key summaries for user in a Gateway + * + * @param CredStoreToken + * Credential Store Token which you want to find the Public Key for. + * + * @param gatewayId + * This is the unique identifier of your gateway where the token and public key was generated from. + * + * @param userId + * This is the unique identifier of user whose public keys are to be fetched. + * + * @return CredentialSummary + * + * + * + * @param authzToken + * @param gatewayId + * @param userId + */ + virtual void getAllSSHPubKeysSummaryForUserInGateway(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userId) = 0; virtual void getAllGatewayPWDCredentials(std::map<std::string, std::string> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId) = 0; /** @@ -2885,6 +2953,9 @@ class AiravataNull : virtual public AiravataIf { void generateAndRegisterSSHKeys(std::string& /* _return */, const ::apache::airavata::model::security::AuthzToken& /* authzToken */, const std::string& /* gatewayId */, const std::string& /* userName */) { return; } + void generateAndRegisterSSHKeysWithDescription(std::string& /* _return */, const ::apache::airavata::model::security::AuthzToken& /* authzToken */, const std::string& /* gatewayId */, const std::string& /* userName */, const std::string& /* description */) { + return; + } void registerPwdCredential(std::string& /* _return */, const ::apache::airavata::model::security::AuthzToken& /* authzToken */, const std::string& /* gatewayId */, const std::string& /* portalUserName */, const std::string& /* loginUserName */, const std::string& /* password */, const std::string& /* description */) { return; } @@ -2894,6 +2965,12 @@ class AiravataNull : virtual public AiravataIf { void getAllGatewaySSHPubKeys(std::map<std::string, std::string> & /* _return */, const ::apache::airavata::model::security::AuthzToken& /* authzToken */, const std::string& /* gatewayId */) { return; } + void getAllGatewaySSHPubKeysSummary(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & /* _return */, const ::apache::airavata::model::security::AuthzToken& /* authzToken */, const std::string& /* gatewayId */) { + return; + } + void getAllSSHPubKeysSummaryForUserInGateway(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & /* _return */, const ::apache::airavata::model::security::AuthzToken& /* authzToken */, const std::string& /* gatewayId */, const std::string& /* userId */) { + return; + } void getAllGatewayPWDCredentials(std::map<std::string, std::string> & /* _return */, const ::apache::airavata::model::security::AuthzToken& /* authzToken */, const std::string& /* gatewayId */) { return; } @@ -5439,6 +5516,146 @@ class Airavata_generateAndRegisterSSHKeys_presult { }; +class Airavata_generateAndRegisterSSHKeysWithDescription_args { + public: + + Airavata_generateAndRegisterSSHKeysWithDescription_args(const Airavata_generateAndRegisterSSHKeysWithDescription_args&); + Airavata_generateAndRegisterSSHKeysWithDescription_args& operator=(const Airavata_generateAndRegisterSSHKeysWithDescription_args&); + Airavata_generateAndRegisterSSHKeysWithDescription_args() : gatewayId(), userName(), description() { + } + + virtual ~Airavata_generateAndRegisterSSHKeysWithDescription_args() throw(); + ::apache::airavata::model::security::AuthzToken authzToken; + std::string gatewayId; + std::string userName; + std::string description; + + void __set_authzToken(const ::apache::airavata::model::security::AuthzToken& val); + + void __set_gatewayId(const std::string& val); + + void __set_userName(const std::string& val); + + void __set_description(const std::string& val); + + bool operator == (const Airavata_generateAndRegisterSSHKeysWithDescription_args & rhs) const + { + if (!(authzToken == rhs.authzToken)) + return false; + if (!(gatewayId == rhs.gatewayId)) + return false; + if (!(userName == rhs.userName)) + return false; + if (!(description == rhs.description)) + return false; + return true; + } + bool operator != (const Airavata_generateAndRegisterSSHKeysWithDescription_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_generateAndRegisterSSHKeysWithDescription_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Airavata_generateAndRegisterSSHKeysWithDescription_pargs { + public: + + + virtual ~Airavata_generateAndRegisterSSHKeysWithDescription_pargs() throw(); + const ::apache::airavata::model::security::AuthzToken* authzToken; + const std::string* gatewayId; + const std::string* userName; + const std::string* description; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_generateAndRegisterSSHKeysWithDescription_result__isset { + _Airavata_generateAndRegisterSSHKeysWithDescription_result__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success :1; + bool ire :1; + bool ace :1; + bool ase :1; +} _Airavata_generateAndRegisterSSHKeysWithDescription_result__isset; + +class Airavata_generateAndRegisterSSHKeysWithDescription_result { + public: + + Airavata_generateAndRegisterSSHKeysWithDescription_result(const Airavata_generateAndRegisterSSHKeysWithDescription_result&); + Airavata_generateAndRegisterSSHKeysWithDescription_result& operator=(const Airavata_generateAndRegisterSSHKeysWithDescription_result&); + Airavata_generateAndRegisterSSHKeysWithDescription_result() : success() { + } + + virtual ~Airavata_generateAndRegisterSSHKeysWithDescription_result() throw(); + std::string success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_generateAndRegisterSSHKeysWithDescription_result__isset __isset; + + void __set_success(const std::string& val); + + void __set_ire(const ::apache::airavata::api::error::InvalidRequestException& val); + + void __set_ace(const ::apache::airavata::api::error::AiravataClientException& val); + + void __set_ase(const ::apache::airavata::api::error::AiravataSystemException& val); + + bool operator == (const Airavata_generateAndRegisterSSHKeysWithDescription_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_generateAndRegisterSSHKeysWithDescription_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_generateAndRegisterSSHKeysWithDescription_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_generateAndRegisterSSHKeysWithDescription_presult__isset { + _Airavata_generateAndRegisterSSHKeysWithDescription_presult__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success :1; + bool ire :1; + bool ace :1; + bool ase :1; +} _Airavata_generateAndRegisterSSHKeysWithDescription_presult__isset; + +class Airavata_generateAndRegisterSSHKeysWithDescription_presult { + public: + + + virtual ~Airavata_generateAndRegisterSSHKeysWithDescription_presult() throw(); + std::string* success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_generateAndRegisterSSHKeysWithDescription_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + class Airavata_registerPwdCredential_args { public: @@ -5853,6 +6070,268 @@ class Airavata_getAllGatewaySSHPubKeys_presult { }; +class Airavata_getAllGatewaySSHPubKeysSummary_args { + public: + + Airavata_getAllGatewaySSHPubKeysSummary_args(const Airavata_getAllGatewaySSHPubKeysSummary_args&); + Airavata_getAllGatewaySSHPubKeysSummary_args& operator=(const Airavata_getAllGatewaySSHPubKeysSummary_args&); + Airavata_getAllGatewaySSHPubKeysSummary_args() : gatewayId() { + } + + virtual ~Airavata_getAllGatewaySSHPubKeysSummary_args() throw(); + ::apache::airavata::model::security::AuthzToken authzToken; + std::string gatewayId; + + void __set_authzToken(const ::apache::airavata::model::security::AuthzToken& val); + + void __set_gatewayId(const std::string& val); + + bool operator == (const Airavata_getAllGatewaySSHPubKeysSummary_args & rhs) const + { + if (!(authzToken == rhs.authzToken)) + return false; + if (!(gatewayId == rhs.gatewayId)) + return false; + return true; + } + bool operator != (const Airavata_getAllGatewaySSHPubKeysSummary_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_getAllGatewaySSHPubKeysSummary_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Airavata_getAllGatewaySSHPubKeysSummary_pargs { + public: + + + virtual ~Airavata_getAllGatewaySSHPubKeysSummary_pargs() throw(); + const ::apache::airavata::model::security::AuthzToken* authzToken; + const std::string* gatewayId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_getAllGatewaySSHPubKeysSummary_result__isset { + _Airavata_getAllGatewaySSHPubKeysSummary_result__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success :1; + bool ire :1; + bool ace :1; + bool ase :1; +} _Airavata_getAllGatewaySSHPubKeysSummary_result__isset; + +class Airavata_getAllGatewaySSHPubKeysSummary_result { + public: + + Airavata_getAllGatewaySSHPubKeysSummary_result(const Airavata_getAllGatewaySSHPubKeysSummary_result&); + Airavata_getAllGatewaySSHPubKeysSummary_result& operator=(const Airavata_getAllGatewaySSHPubKeysSummary_result&); + Airavata_getAllGatewaySSHPubKeysSummary_result() { + } + + virtual ~Airavata_getAllGatewaySSHPubKeysSummary_result() throw(); + std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_getAllGatewaySSHPubKeysSummary_result__isset __isset; + + void __set_success(const std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & val); + + void __set_ire(const ::apache::airavata::api::error::InvalidRequestException& val); + + void __set_ace(const ::apache::airavata::api::error::AiravataClientException& val); + + void __set_ase(const ::apache::airavata::api::error::AiravataSystemException& val); + + bool operator == (const Airavata_getAllGatewaySSHPubKeysSummary_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_getAllGatewaySSHPubKeysSummary_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_getAllGatewaySSHPubKeysSummary_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_getAllGatewaySSHPubKeysSummary_presult__isset { + _Airavata_getAllGatewaySSHPubKeysSummary_presult__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success :1; + bool ire :1; + bool ace :1; + bool ase :1; +} _Airavata_getAllGatewaySSHPubKeysSummary_presult__isset; + +class Airavata_getAllGatewaySSHPubKeysSummary_presult { + public: + + + virtual ~Airavata_getAllGatewaySSHPubKeysSummary_presult() throw(); + std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> * success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_getAllGatewaySSHPubKeysSummary_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class Airavata_getAllSSHPubKeysSummaryForUserInGateway_args { + public: + + Airavata_getAllSSHPubKeysSummaryForUserInGateway_args(const Airavata_getAllSSHPubKeysSummaryForUserInGateway_args&); + Airavata_getAllSSHPubKeysSummaryForUserInGateway_args& operator=(const Airavata_getAllSSHPubKeysSummaryForUserInGateway_args&); + Airavata_getAllSSHPubKeysSummaryForUserInGateway_args() : gatewayId(), userId() { + } + + virtual ~Airavata_getAllSSHPubKeysSummaryForUserInGateway_args() throw(); + ::apache::airavata::model::security::AuthzToken authzToken; + std::string gatewayId; + std::string userId; + + void __set_authzToken(const ::apache::airavata::model::security::AuthzToken& val); + + void __set_gatewayId(const std::string& val); + + void __set_userId(const std::string& val); + + bool operator == (const Airavata_getAllSSHPubKeysSummaryForUserInGateway_args & rhs) const + { + if (!(authzToken == rhs.authzToken)) + return false; + if (!(gatewayId == rhs.gatewayId)) + return false; + if (!(userId == rhs.userId)) + return false; + return true; + } + bool operator != (const Airavata_getAllSSHPubKeysSummaryForUserInGateway_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_getAllSSHPubKeysSummaryForUserInGateway_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Airavata_getAllSSHPubKeysSummaryForUserInGateway_pargs { + public: + + + virtual ~Airavata_getAllSSHPubKeysSummaryForUserInGateway_pargs() throw(); + const ::apache::airavata::model::security::AuthzToken* authzToken; + const std::string* gatewayId; + const std::string* userId; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_getAllSSHPubKeysSummaryForUserInGateway_result__isset { + _Airavata_getAllSSHPubKeysSummaryForUserInGateway_result__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success :1; + bool ire :1; + bool ace :1; + bool ase :1; +} _Airavata_getAllSSHPubKeysSummaryForUserInGateway_result__isset; + +class Airavata_getAllSSHPubKeysSummaryForUserInGateway_result { + public: + + Airavata_getAllSSHPubKeysSummaryForUserInGateway_result(const Airavata_getAllSSHPubKeysSummaryForUserInGateway_result&); + Airavata_getAllSSHPubKeysSummaryForUserInGateway_result& operator=(const Airavata_getAllSSHPubKeysSummaryForUserInGateway_result&); + Airavata_getAllSSHPubKeysSummaryForUserInGateway_result() { + } + + virtual ~Airavata_getAllSSHPubKeysSummaryForUserInGateway_result() throw(); + std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_getAllSSHPubKeysSummaryForUserInGateway_result__isset __isset; + + void __set_success(const std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & val); + + void __set_ire(const ::apache::airavata::api::error::InvalidRequestException& val); + + void __set_ace(const ::apache::airavata::api::error::AiravataClientException& val); + + void __set_ase(const ::apache::airavata::api::error::AiravataSystemException& val); + + bool operator == (const Airavata_getAllSSHPubKeysSummaryForUserInGateway_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_getAllSSHPubKeysSummaryForUserInGateway_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Airavata_getAllSSHPubKeysSummaryForUserInGateway_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Airavata_getAllSSHPubKeysSummaryForUserInGateway_presult__isset { + _Airavata_getAllSSHPubKeysSummaryForUserInGateway_presult__isset() : success(false), ire(false), ace(false), ase(false) {} + bool success :1; + bool ire :1; + bool ace :1; + bool ase :1; +} _Airavata_getAllSSHPubKeysSummaryForUserInGateway_presult__isset; + +class Airavata_getAllSSHPubKeysSummaryForUserInGateway_presult { + public: + + + virtual ~Airavata_getAllSSHPubKeysSummaryForUserInGateway_presult() throw(); + std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> * success; + ::apache::airavata::api::error::InvalidRequestException ire; + ::apache::airavata::api::error::AiravataClientException ace; + ::apache::airavata::api::error::AiravataSystemException ase; + + _Airavata_getAllSSHPubKeysSummaryForUserInGateway_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + class Airavata_getAllGatewayPWDCredentials_args { public: @@ -26548,6 +27027,9 @@ class AiravataClient : virtual public AiravataIf { void generateAndRegisterSSHKeys(std::string& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userName); void send_generateAndRegisterSSHKeys(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userName); void recv_generateAndRegisterSSHKeys(std::string& _return); + void generateAndRegisterSSHKeysWithDescription(std::string& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userName, const std::string& description); + void send_generateAndRegisterSSHKeysWithDescription(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userName, const std::string& description); + void recv_generateAndRegisterSSHKeysWithDescription(std::string& _return); void registerPwdCredential(std::string& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& portalUserName, const std::string& loginUserName, const std::string& password, const std::string& description); void send_registerPwdCredential(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& portalUserName, const std::string& loginUserName, const std::string& password, const std::string& description); void recv_registerPwdCredential(std::string& _return); @@ -26557,6 +27039,12 @@ class AiravataClient : virtual public AiravataIf { void getAllGatewaySSHPubKeys(std::map<std::string, std::string> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId); void send_getAllGatewaySSHPubKeys(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId); void recv_getAllGatewaySSHPubKeys(std::map<std::string, std::string> & _return); + void getAllGatewaySSHPubKeysSummary(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId); + void send_getAllGatewaySSHPubKeysSummary(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId); + void recv_getAllGatewaySSHPubKeysSummary(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return); + void getAllSSHPubKeysSummaryForUserInGateway(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userId); + void send_getAllSSHPubKeysSummaryForUserInGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userId); + void recv_getAllSSHPubKeysSummaryForUserInGateway(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return); void getAllGatewayPWDCredentials(std::map<std::string, std::string> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId); void send_getAllGatewayPWDCredentials(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId); void recv_getAllGatewayPWDCredentials(std::map<std::string, std::string> & _return); @@ -27025,9 +27513,12 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor { void process_getNotification(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_getAllNotifications(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_generateAndRegisterSSHKeys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_generateAndRegisterSSHKeysWithDescription(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_registerPwdCredential(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_getSSHPubKey(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_getAllGatewaySSHPubKeys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getAllGatewaySSHPubKeysSummary(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getAllSSHPubKeysSummaryForUserInGateway(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_getAllGatewayPWDCredentials(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_deleteSSHPubKey(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_deletePWDCredential(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); @@ -27192,9 +27683,12 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor { processMap_["getNotification"] = &AiravataProcessor::process_getNotification; processMap_["getAllNotifications"] = &AiravataProcessor::process_getAllNotifications; processMap_["generateAndRegisterSSHKeys"] = &AiravataProcessor::process_generateAndRegisterSSHKeys; + processMap_["generateAndRegisterSSHKeysWithDescription"] = &AiravataProcessor::process_generateAndRegisterSSHKeysWithDescription; processMap_["registerPwdCredential"] = &AiravataProcessor::process_registerPwdCredential; processMap_["getSSHPubKey"] = &AiravataProcessor::process_getSSHPubKey; processMap_["getAllGatewaySSHPubKeys"] = &AiravataProcessor::process_getAllGatewaySSHPubKeys; + processMap_["getAllGatewaySSHPubKeysSummary"] = &AiravataProcessor::process_getAllGatewaySSHPubKeysSummary; + processMap_["getAllSSHPubKeysSummaryForUserInGateway"] = &AiravataProcessor::process_getAllSSHPubKeysSummaryForUserInGateway; processMap_["getAllGatewayPWDCredentials"] = &AiravataProcessor::process_getAllGatewayPWDCredentials; processMap_["deleteSSHPubKey"] = &AiravataProcessor::process_deleteSSHPubKey; processMap_["deletePWDCredential"] = &AiravataProcessor::process_deletePWDCredential; @@ -27513,6 +28007,16 @@ class AiravataMultiface : virtual public AiravataIf { return; } + void generateAndRegisterSSHKeysWithDescription(std::string& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userName, const std::string& description) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->generateAndRegisterSSHKeysWithDescription(_return, authzToken, gatewayId, userName, description); + } + ifaces_[i]->generateAndRegisterSSHKeysWithDescription(_return, authzToken, gatewayId, userName, description); + return; + } + void registerPwdCredential(std::string& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& portalUserName, const std::string& loginUserName, const std::string& password, const std::string& description) { size_t sz = ifaces_.size(); size_t i = 0; @@ -27543,6 +28047,26 @@ class AiravataMultiface : virtual public AiravataIf { return; } + void getAllGatewaySSHPubKeysSummary(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getAllGatewaySSHPubKeysSummary(_return, authzToken, gatewayId); + } + ifaces_[i]->getAllGatewaySSHPubKeysSummary(_return, authzToken, gatewayId); + return; + } + + void getAllSSHPubKeysSummaryForUserInGateway(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userId) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getAllSSHPubKeysSummaryForUserInGateway(_return, authzToken, gatewayId, userId); + } + ifaces_[i]->getAllSSHPubKeysSummaryForUserInGateway(_return, authzToken, gatewayId, userId); + return; + } + void getAllGatewayPWDCredentials(std::map<std::string, std::string> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId) { size_t sz = ifaces_.size(); size_t i = 0; @@ -29016,6 +29540,9 @@ class AiravataConcurrentClient : virtual public AiravataIf { void generateAndRegisterSSHKeys(std::string& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userName); int32_t send_generateAndRegisterSSHKeys(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userName); void recv_generateAndRegisterSSHKeys(std::string& _return, const int32_t seqid); + void generateAndRegisterSSHKeysWithDescription(std::string& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userName, const std::string& description); + int32_t send_generateAndRegisterSSHKeysWithDescription(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userName, const std::string& description); + void recv_generateAndRegisterSSHKeysWithDescription(std::string& _return, const int32_t seqid); void registerPwdCredential(std::string& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& portalUserName, const std::string& loginUserName, const std::string& password, const std::string& description); int32_t send_registerPwdCredential(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& portalUserName, const std::string& loginUserName, const std::string& password, const std::string& description); void recv_registerPwdCredential(std::string& _return, const int32_t seqid); @@ -29025,6 +29552,12 @@ class AiravataConcurrentClient : virtual public AiravataIf { void getAllGatewaySSHPubKeys(std::map<std::string, std::string> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId); int32_t send_getAllGatewaySSHPubKeys(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId); void recv_getAllGatewaySSHPubKeys(std::map<std::string, std::string> & _return, const int32_t seqid); + void getAllGatewaySSHPubKeysSummary(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId); + int32_t send_getAllGatewaySSHPubKeysSummary(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId); + void recv_getAllGatewaySSHPubKeysSummary(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return, const int32_t seqid); + void getAllSSHPubKeysSummaryForUserInGateway(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userId); + int32_t send_getAllSSHPubKeysSummaryForUserInGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userId); + void recv_getAllSSHPubKeysSummaryForUserInGateway(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return, const int32_t seqid); void getAllGatewayPWDCredentials(std::map<std::string, std::string> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId); int32_t send_getAllGatewayPWDCredentials(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId); void recv_getAllGatewayPWDCredentials(std::map<std::string, std::string> & _return, const int32_t seqid);
http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/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 9b8c7e9..389f8d7 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 @@ -259,6 +259,35 @@ class AiravataHandler : virtual public AiravataIf { } /** + * Generate and Register SSH Key Pair with Airavata Credential Store. + * + * @param gatewayId + * The identifier for the requested Gateway. + * + * @param userName + * The User for which the credential should be registered. For community accounts, this user is the name of the + * community user name. For computational resources, this user name need not be the same user name on resoruces. + * + * @param description + * The description field for a credential type, all type of credential can have a description. + * + * @return airavataCredStoreToken + * An SSH Key pair is generated and stored in the credential store and associated with users or community account + * belonging to a Gateway. + * + * + * + * @param authzToken + * @param gatewayId + * @param userName + * @param description + */ + void generateAndRegisterSSHKeysWithDescription(std::string& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userName, const std::string& description) { + // Your implementation goes here + printf("generateAndRegisterSSHKeysWithDescription\n"); + } + + /** * Generate and Register Username PWD Pair with Airavata Credential Store. * * @param gatewayId @@ -334,6 +363,54 @@ class AiravataHandler : virtual public AiravataIf { printf("getAllGatewaySSHPubKeys\n"); } + /** + * + * Get all Public Keys of the Gateway + * + * @param CredStoreToken + * Credential Store Token which you want to find the Public Key for. + * + * @param gatewayId + * This is the unique identifier of your gateway where the token and public key was generated from. + * + * @return publicKey + * + * + * + * @param authzToken + * @param gatewayId + */ + void getAllGatewaySSHPubKeysSummary(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId) { + // Your implementation goes here + printf("getAllGatewaySSHPubKeysSummary\n"); + } + + /** + * + * Get all Public Key summaries for user in a Gateway + * + * @param CredStoreToken + * Credential Store Token which you want to find the Public Key for. + * + * @param gatewayId + * This is the unique identifier of your gateway where the token and public key was generated from. + * + * @param userId + * This is the unique identifier of user whose public keys are to be fetched. + * + * @return CredentialSummary + * + * + * + * @param authzToken + * @param gatewayId + * @param userId + */ + void getAllSSHPubKeysSummaryForUserInGateway(std::vector< ::apache::airavata::model::appcatalog::credentialsummary::CredentialSummary> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const std::string& userId) { + // Your implementation goes here + printf("getAllSSHPubKeysSummaryForUserInGateway\n"); + } + void getAllGatewayPWDCredentials(std::map<std::string, std::string> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId) { // Your implementation goes here printf("getAllGatewayPWDCredentials\n"); http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_api_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_api_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_api_types.h index b01f07b..2ef1717 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_api_types.h +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavata_api_types.h @@ -44,6 +44,7 @@ #include "application_deployment_model_types.h" #include "application_interface_model_types.h" #include "compute_resource_model_types.h" +#include "credential_summary_types.h" #include "storage_resource_model_types.h" #include "gateway_resource_profile_model_types.h" #include "user_resource_profile_model_types.h" http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp index d1f0f20..b84306c 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp @@ -104,6 +104,7 @@ const std::map<int, const char*> _JobSubmissionProtocol_VALUES_TO_NAMES(::apache int _kMonitorModeValues[] = { MonitorMode::POLL_JOB_MANAGER, + MonitorMode::CLOUD_JOB_MONITOR, MonitorMode::JOB_EMAIL_NOTIFICATION_MONITOR, MonitorMode::XSEDE_AMQP_SUBSCRIBE, MonitorMode::FORK, @@ -111,12 +112,13 @@ int _kMonitorModeValues[] = { }; const char* _kMonitorModeNames[] = { "POLL_JOB_MANAGER", + "CLOUD_JOB_MONITOR", "JOB_EMAIL_NOTIFICATION_MONITOR", "XSEDE_AMQP_SUBSCRIBE", "FORK", "LOCAL" }; -const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kMonitorModeValues, _kMonitorModeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); +const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kMonitorModeValues, _kMonitorModeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); int _kDMTypeValues[] = { DMType::COMPUTE_RESOURCE, http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/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 463c246..5c90bd9 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 @@ -94,10 +94,11 @@ extern const std::map<int, const char*> _JobSubmissionProtocol_VALUES_TO_NAMES; struct MonitorMode { enum type { POLL_JOB_MANAGER = 0, - JOB_EMAIL_NOTIFICATION_MONITOR = 1, - XSEDE_AMQP_SUBSCRIBE = 2, - FORK = 3, - LOCAL = 4 + CLOUD_JOB_MONITOR = 1, + JOB_EMAIL_NOTIFICATION_MONITOR = 2, + XSEDE_AMQP_SUBSCRIBE = 3, + FORK = 4, + LOCAL = 5 }; }; http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_constants.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_constants.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_constants.cpp new file mode 100644 index 0000000..62d3d4a --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_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.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "credential_summary_constants.h" + +namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace credentialsummary { + +const credential_summaryConstants g_credential_summary_constants; + +credential_summaryConstants::credential_summaryConstants() { +} + +}}}}} // namespace + http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_constants.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_constants.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_constants.h new file mode 100644 index 0000000..62bef1f --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_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.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef credential_summary_CONSTANTS_H +#define credential_summary_CONSTANTS_H + +#include "credential_summary_types.h" + +namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace credentialsummary { + +class credential_summaryConstants { + public: + credential_summaryConstants(); + +}; + +extern const credential_summaryConstants g_credential_summary_constants; + +}}}}} // namespace + +#endif http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_types.cpp new file mode 100644 index 0000000..c470a1c --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_types.cpp @@ -0,0 +1,234 @@ +/** + * 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.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "credential_summary_types.h" + +#include <algorithm> +#include <ostream> + +#include <thrift/TToString.h> + +namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace credentialsummary { + + +CredentialSummary::~CredentialSummary() throw() { +} + + +void CredentialSummary::__set_gatewayId(const std::string& val) { + this->gatewayId = val; +} + +void CredentialSummary::__set_username(const std::string& val) { + this->username = val; +} + +void CredentialSummary::__set_token(const std::string& val) { + this->token = val; +} + +void CredentialSummary::__set_publicKey(const std::string& val) { + this->publicKey = val; +__isset.publicKey = true; +} + +void CredentialSummary::__set_persistedTime(const int64_t val) { + this->persistedTime = val; +__isset.persistedTime = true; +} + +void CredentialSummary::__set_description(const std::string& val) { + this->description = val; +__isset.description = true; +} + +uint32_t CredentialSummary::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*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_gatewayId = false; + bool isset_username = false; + bool isset_token = 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->gatewayId); + isset_gatewayId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->username); + isset_username = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->token); + isset_token = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->publicKey); + this->__isset.publicKey = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->persistedTime); + this->__isset.persistedTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->description); + this->__isset.description = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_gatewayId) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_username) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_token) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t CredentialSummary::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("CredentialSummary"); + + xfer += oprot->writeFieldBegin("gatewayId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->gatewayId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("username", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->username); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("token", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->token); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.publicKey) { + xfer += oprot->writeFieldBegin("publicKey", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->publicKey); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.persistedTime) { + xfer += oprot->writeFieldBegin("persistedTime", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->persistedTime); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.description) { + xfer += oprot->writeFieldBegin("description", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->description); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(CredentialSummary &a, CredentialSummary &b) { + using ::std::swap; + swap(a.gatewayId, b.gatewayId); + swap(a.username, b.username); + swap(a.token, b.token); + swap(a.publicKey, b.publicKey); + swap(a.persistedTime, b.persistedTime); + swap(a.description, b.description); + swap(a.__isset, b.__isset); +} + +CredentialSummary::CredentialSummary(const CredentialSummary& other0) { + gatewayId = other0.gatewayId; + username = other0.username; + token = other0.token; + publicKey = other0.publicKey; + persistedTime = other0.persistedTime; + description = other0.description; + __isset = other0.__isset; +} +CredentialSummary& CredentialSummary::operator=(const CredentialSummary& other1) { + gatewayId = other1.gatewayId; + username = other1.username; + token = other1.token; + publicKey = other1.publicKey; + persistedTime = other1.persistedTime; + description = other1.description; + __isset = other1.__isset; + return *this; +} +void CredentialSummary::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "CredentialSummary("; + out << "gatewayId=" << to_string(gatewayId); + out << ", " << "username=" << to_string(username); + out << ", " << "token=" << to_string(token); + out << ", " << "publicKey="; (__isset.publicKey ? (out << to_string(publicKey)) : (out << "<null>")); + out << ", " << "persistedTime="; (__isset.persistedTime ? (out << to_string(persistedTime)) : (out << "<null>")); + out << ", " << "description="; (__isset.description ? (out << to_string(description)) : (out << "<null>")); + out << ")"; +} + +}}}}} // namespace http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_types.h new file mode 100644 index 0000000..2668279 --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/credential_summary_types.h @@ -0,0 +1,122 @@ +/** + * 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.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef credential_summary_TYPES_H +#define credential_summary_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> + + +namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace credentialsummary { + +class CredentialSummary; + +typedef struct _CredentialSummary__isset { + _CredentialSummary__isset() : publicKey(false), persistedTime(false), description(false) {} + bool publicKey :1; + bool persistedTime :1; + bool description :1; +} _CredentialSummary__isset; + +class CredentialSummary { + public: + + CredentialSummary(const CredentialSummary&); + CredentialSummary& operator=(const CredentialSummary&); + CredentialSummary() : gatewayId(), username(), token(), publicKey(), persistedTime(0), description() { + } + + virtual ~CredentialSummary() throw(); + std::string gatewayId; + std::string username; + std::string token; + std::string publicKey; + int64_t persistedTime; + std::string description; + + _CredentialSummary__isset __isset; + + void __set_gatewayId(const std::string& val); + + void __set_username(const std::string& val); + + void __set_token(const std::string& val); + + void __set_publicKey(const std::string& val); + + void __set_persistedTime(const int64_t val); + + void __set_description(const std::string& val); + + bool operator == (const CredentialSummary & rhs) const + { + if (!(gatewayId == rhs.gatewayId)) + return false; + if (!(username == rhs.username)) + return false; + if (!(token == rhs.token)) + return false; + if (__isset.publicKey != rhs.__isset.publicKey) + return false; + else if (__isset.publicKey && !(publicKey == rhs.publicKey)) + return false; + if (__isset.persistedTime != rhs.__isset.persistedTime) + return false; + else if (__isset.persistedTime && !(persistedTime == rhs.persistedTime)) + return false; + if (__isset.description != rhs.__isset.description) + return false; + else if (__isset.description && !(description == rhs.description)) + return false; + return true; + } + bool operator != (const CredentialSummary &rhs) const { + return !(*this == rhs); + } + + bool operator < (const CredentialSummary & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(CredentialSummary &a, CredentialSummary &b); + +inline std::ostream& operator<<(std::ostream& out, const CredentialSummary& obj) +{ + obj.printTo(out); + return out; +} + +}}}}} // namespace + +#endif http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.cpp index cac2b0a..a1ad24e 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.cpp @@ -510,6 +510,11 @@ void UserResourceProfile::__set_identityServerPwdCredToken(const std::string& va __isset.identityServerPwdCredToken = true; } +void UserResourceProfile::__set_isNull(const bool val) { + this->isNull = val; +__isset.isNull = true; +} + uint32_t UserResourceProfile::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); @@ -613,6 +618,14 @@ uint32_t UserResourceProfile::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; + case 8: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isNull); + this->__isset.isNull = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -683,6 +696,11 @@ uint32_t UserResourceProfile::write(::apache::thrift::protocol::TProtocol* oprot xfer += oprot->writeString(this->identityServerPwdCredToken); xfer += oprot->writeFieldEnd(); } + if (this->__isset.isNull) { + xfer += oprot->writeFieldBegin("isNull", ::apache::thrift::protocol::T_BOOL, 8); + xfer += oprot->writeBool(this->isNull); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -697,6 +715,7 @@ void swap(UserResourceProfile &a, UserResourceProfile &b) { swap(a.userStoragePreferences, b.userStoragePreferences); swap(a.identityServerTenant, b.identityServerTenant); swap(a.identityServerPwdCredToken, b.identityServerPwdCredToken); + swap(a.isNull, b.isNull); swap(a.__isset, b.__isset); } @@ -708,6 +727,7 @@ UserResourceProfile::UserResourceProfile(const UserResourceProfile& other16) { userStoragePreferences = other16.userStoragePreferences; identityServerTenant = other16.identityServerTenant; identityServerPwdCredToken = other16.identityServerPwdCredToken; + isNull = other16.isNull; __isset = other16.__isset; } UserResourceProfile& UserResourceProfile::operator=(const UserResourceProfile& other17) { @@ -718,6 +738,7 @@ UserResourceProfile& UserResourceProfile::operator=(const UserResourceProfile& o userStoragePreferences = other17.userStoragePreferences; identityServerTenant = other17.identityServerTenant; identityServerPwdCredToken = other17.identityServerPwdCredToken; + isNull = other17.isNull; __isset = other17.__isset; return *this; } @@ -731,6 +752,7 @@ void UserResourceProfile::printTo(std::ostream& out) const { out << ", " << "userStoragePreferences="; (__isset.userStoragePreferences ? (out << to_string(userStoragePreferences)) : (out << "<null>")); out << ", " << "identityServerTenant="; (__isset.identityServerTenant ? (out << to_string(identityServerTenant)) : (out << "<null>")); out << ", " << "identityServerPwdCredToken="; (__isset.identityServerPwdCredToken ? (out << to_string(identityServerPwdCredToken)) : (out << "<null>")); + out << ", " << "isNull="; (__isset.isNull ? (out << to_string(isNull)) : (out << "<null>")); out << ")"; } http://git-wip-us.apache.org/repos/asf/airavata/blob/325d1630/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.h index fa3f1e6..88f94b8 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.h +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.h @@ -232,12 +232,13 @@ inline std::ostream& operator<<(std::ostream& out, const UserStoragePreference& } typedef struct _UserResourceProfile__isset { - _UserResourceProfile__isset() : credentialStoreToken(false), userComputeResourcePreferences(false), userStoragePreferences(false), identityServerTenant(false), identityServerPwdCredToken(false) {} + _UserResourceProfile__isset() : credentialStoreToken(false), userComputeResourcePreferences(false), userStoragePreferences(false), identityServerTenant(false), identityServerPwdCredToken(false), isNull(true) {} bool credentialStoreToken :1; bool userComputeResourcePreferences :1; bool userStoragePreferences :1; bool identityServerTenant :1; bool identityServerPwdCredToken :1; + bool isNull :1; } _UserResourceProfile__isset; class UserResourceProfile { @@ -245,7 +246,7 @@ class UserResourceProfile { UserResourceProfile(const UserResourceProfile&); UserResourceProfile& operator=(const UserResourceProfile&); - UserResourceProfile() : userId(), gatewayID(), credentialStoreToken(), identityServerTenant(), identityServerPwdCredToken() { + UserResourceProfile() : userId(), gatewayID(), credentialStoreToken(), identityServerTenant(), identityServerPwdCredToken(), isNull(false) { } virtual ~UserResourceProfile() throw(); @@ -256,6 +257,7 @@ class UserResourceProfile { std::vector<UserStoragePreference> userStoragePreferences; std::string identityServerTenant; std::string identityServerPwdCredToken; + bool isNull; _UserResourceProfile__isset __isset; @@ -273,6 +275,8 @@ class UserResourceProfile { void __set_identityServerPwdCredToken(const std::string& val); + void __set_isNull(const bool val); + bool operator == (const UserResourceProfile & rhs) const { if (!(userId == rhs.userId)) @@ -299,6 +303,10 @@ class UserResourceProfile { return false; else if (__isset.identityServerPwdCredToken && !(identityServerPwdCredToken == rhs.identityServerPwdCredToken)) return false; + if (__isset.isNull != rhs.__isset.isNull) + return false; + else if (__isset.isNull && !(isNull == rhs.isNull)) + return false; return true; } bool operator != (const UserResourceProfile &rhs) const {
