Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D6019200BC3 for ; Thu, 13 Oct 2016 20:32:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D4D6A160AD2; Thu, 13 Oct 2016 18:32:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 704CD160B02 for ; Thu, 13 Oct 2016 20:32:58 +0200 (CEST) Received: (qmail 80797 invoked by uid 500); 13 Oct 2016 18:32:57 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 78773 invoked by uid 99); 13 Oct 2016 18:32:54 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2016 18:32:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8775BE390E; Thu, 13 Oct 2016 18:32:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shameera@apache.org To: commits@airavata.apache.org Date: Thu, 13 Oct 2016 18:33:22 -0000 Message-Id: In-Reply-To: <8b25408717724aa7a23711c9fb6ae582@git.apache.org> References: <8b25408717724aa7a23711c9fb6ae582@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [29/30] airavata git commit: moving credential-store data model thrift file to data-models directory archived-at: Thu, 13 Oct 2016 18:33:00 -0000 moving credential-store data model thrift file to data-models directory Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/c9e26ec3 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/c9e26ec3 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/c9e26ec3 Branch: refs/heads/develop Commit: c9e26ec359c79d3d321e67060aac994941523e2f Parents: 8e59d80 Author: Anuj Bhandar Authored: Wed Oct 12 16:36:46 2016 -0400 Committer: Anuj Bhandar Committed: Wed Oct 12 16:36:46 2016 -0400 ---------------------------------------------------------------------- .../component-cpis/credential-store-cpi.thrift | 2 +- .../credential_store_data_models.thrift | 72 -------------------- .../credential_store_data_models.thrift | 72 ++++++++++++++++++++ .../generate-thrift-stubs.sh | 24 +++++++ 4 files changed, 97 insertions(+), 73 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/c9e26ec3/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift ---------------------------------------------------------------------- diff --git a/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift b/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift index 36e7980..923a192 100644 --- a/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift +++ b/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift @@ -23,7 +23,7 @@ * */ -include "credential_store_data_models.thrift" +include "../data-models/credential-store-models/credential_store_data_models.thrift" include "credential_store_errors.thrift" namespace java org.apache.airavata.credential.store.cpi http://git-wip-us.apache.org/repos/asf/airavata/blob/c9e26ec3/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift ---------------------------------------------------------------------- diff --git a/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift b/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift deleted file mode 100644 index f2c2c77..0000000 --- a/thrift-interface-descriptions/component-cpis/credential_store_data_models.thrift +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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. - * - */ - - -namespace java org.apache.airavata.credential.store.datamodel -namespace php Airavata.Model.Credential.Store - -const string DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS" - -struct SSHCredential { - 1: required string gatewayId, - 2: required string username, - 3: optional string passphrase, - 4: optional string publicKey, - 5: optional string privateKey, - 6: optional i64 persistedTime, - 7: optional string token, - 8: optional string description -} - -struct SSHCredentialSummary { - 1: required string gatewayId, - 2: required string username, - 3: optional string publicKey, - 4: optional i64 persistedTime, - 5: required string token, - 6: optional string description -} - -struct CommunityUser { - 1: required string gatewayName, - 2: required string username, - 3: required string userEmail -} - -struct CertificateCredential { - 1: required CommunityUser communityUser, - 2: required string x509Cert, - 3: optional string notAfter, - 4: optional string privateKey, - 5: optional i64 lifeTime, - 6: optional string notBefore - 7: optional i64 persistedTime, - 8: optional string token -} - -struct PasswordCredential { - 1: required string gatewayId, - 2: required string portalUserName, - 3: required string loginUserName, - 4: required string password, - 5: optional string description, - 6: optional i64 persistedTime, - 7: optional string token -} http://git-wip-us.apache.org/repos/asf/airavata/blob/c9e26ec3/thrift-interface-descriptions/data-models/credential-store-models/credential_store_data_models.thrift ---------------------------------------------------------------------- diff --git a/thrift-interface-descriptions/data-models/credential-store-models/credential_store_data_models.thrift b/thrift-interface-descriptions/data-models/credential-store-models/credential_store_data_models.thrift new file mode 100644 index 0000000..f2c2c77 --- /dev/null +++ b/thrift-interface-descriptions/data-models/credential-store-models/credential_store_data_models.thrift @@ -0,0 +1,72 @@ +/* + * 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. + * + */ + + +namespace java org.apache.airavata.credential.store.datamodel +namespace php Airavata.Model.Credential.Store + +const string DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS" + +struct SSHCredential { + 1: required string gatewayId, + 2: required string username, + 3: optional string passphrase, + 4: optional string publicKey, + 5: optional string privateKey, + 6: optional i64 persistedTime, + 7: optional string token, + 8: optional string description +} + +struct SSHCredentialSummary { + 1: required string gatewayId, + 2: required string username, + 3: optional string publicKey, + 4: optional i64 persistedTime, + 5: required string token, + 6: optional string description +} + +struct CommunityUser { + 1: required string gatewayName, + 2: required string username, + 3: required string userEmail +} + +struct CertificateCredential { + 1: required CommunityUser communityUser, + 2: required string x509Cert, + 3: optional string notAfter, + 4: optional string privateKey, + 5: optional i64 lifeTime, + 6: optional string notBefore + 7: optional i64 persistedTime, + 8: optional string token +} + +struct PasswordCredential { + 1: required string gatewayId, + 2: required string portalUserName, + 3: required string loginUserName, + 4: required string password, + 5: optional string description, + 6: optional i64 persistedTime, + 7: optional string token +} http://git-wip-us.apache.org/repos/asf/airavata/blob/c9e26ec3/thrift-interface-descriptions/generate-thrift-stubs.sh ---------------------------------------------------------------------- diff --git a/thrift-interface-descriptions/generate-thrift-stubs.sh b/thrift-interface-descriptions/generate-thrift-stubs.sh index 4a9550a..949ce2e 100755 --- a/thrift-interface-descriptions/generate-thrift-stubs.sh +++ b/thrift-interface-descriptions/generate-thrift-stubs.sh @@ -69,12 +69,14 @@ DATAMODEL_THRIFT_FILE='data-models/airavata_data_models.thrift' APP_CATALOG_THRIFT_FILE='data-models/app-catalog-models/app_catalog_models.thrift' RESOURCE_CATALOG_THRIFT_FILE='data-models/resource-catalog-models/resource_catalog_models.thrift' WORKFLOW_THRIFT_FILE='data-models/workflow-models/workflow_data_model.thrift' +CREDENTIAL_STORE_DATAMODEL_THRIFT_FILE='data-models/credential-store-models/credential_store_data_models.thrift' DATAMODEL_SRC_DIR='../airavata-api/airavata-data-models/src/main/java' JAVA_API_SDK_DIR='../airavata-api/airavata-api-stubs/src/main/java' PHP_SDK_DIR='../airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib' CPP_SDK_DIR='../airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/' PYTHON_SDK_DIR='../airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/' +CREDENTIAL_DATAMODEL_SRC_DIR='../modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel' # Initialize the thrift arguments. # Since most of the Airavata API and Data Models have includes, use recursive option by default. @@ -184,6 +186,27 @@ generate_java_stubs() { # As a precaution remove and previously generated files if exists rm -rf ${JAVA_GEN_DIR} + # Generate the credential store data models in move them to respective modules/credential-store directory + + $THRIFT_EXEC ${THRIFT_ARGS} --gen java:beans ${CREDENTIAL_STORE_DATAMODEL_THRIFT_FILE} || fail unable to generate java bean thrift classes on app workflow data models + + # For the generated java beans add the ASF V2 License header + add_license_header $JAVA_BEAN_GEN_DIR + + # Compare the newly generated beans with existing sources and replace the changed ones. + copy_changed_files ${JAVA_BEAN_GEN_DIR}/org/apache/airavata/credential/store/datamodel} ${CREDENTIAL_DATAMODEL_SRC_DIR} + + ############################################################################### + # Generate/Update source used by Airavata Server Skeletons & Java Client Stubs # + # JAVA server and client both use generated api-boilerplate-code # + ############################################################################### + + #Java generation directory + JAVA_GEN_DIR=${BASE_TARGET_DIR}/gen-java + + # As a precaution remove and previously generated files if exists + rm -rf ${JAVA_GEN_DIR} + # Using thrift Java generator, generate the java classes based on Airavata API. This # The airavata_api.thrift includes rest of data models. $THRIFT_EXEC ${THRIFT_ARGS} --gen java ${AIRAVATA_API_THRIFT_FILE} || fail unable to generate java thrift classes on AiravataAPI @@ -216,6 +239,7 @@ generate_php_stubs() { $THRIFT_EXEC ${THRIFT_ARGS} --gen php:autoload ${APP_CATALOG_THRIFT_FILE} || fail unable to generate PHP thrift classes $THRIFT_EXEC ${THRIFT_ARGS} --gen php:autoload ${RESOURCE_CATALOG_THRIFT_FILE} || fail unable to generate PHP thrift classes $THRIFT_EXEC ${THRIFT_ARGS} --gen php:autoload ${AIRAVATA_API_THRIFT_FILE} || fail unable to generate PHP thrift classes + $THRIFT_EXEC ${THRIFT_ARGS} --gen php:autoload ${CREDENTIAL_STORE_DATAMODEL_THRIFT_FILE} || fail unable to generate PHP thrift classes # For the generated java classes add the ASF V2 License header ## TODO Write PHP license parser