Repository: airavata Updated Branches: refs/heads/master e66c52bc6 -> c5585979d
http://git-wip-us.apache.org/repos/asf/airavata/blob/c5585979/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/GatewayProfileResource.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/GatewayProfileResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/GatewayProfileResource.java index be24822..7d92dcb 100644 --- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/GatewayProfileResource.java +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/GatewayProfileResource.java @@ -41,6 +41,7 @@ public class GatewayProfileResource extends AppCatAbstractResource { private String gatewayID; private Timestamp createdTime; private Timestamp updatedTime; + private String credentialStoreToken; public Timestamp getCreatedTime() { return createdTime; @@ -58,6 +59,14 @@ public class GatewayProfileResource extends AppCatAbstractResource { this.updatedTime = updatedTime; } + public String getCredentialStoreToken() { + return credentialStoreToken; + } + + public void setCredentialStoreToken(String credentialStoreToken) { + this.credentialStoreToken = credentialStoreToken; + } + public void remove(Object identifier) throws AppCatalogException { EntityManager em = null; try { @@ -266,11 +275,13 @@ public class GatewayProfileResource extends AppCatAbstractResource { em.getTransaction().begin(); if (existingGatewayProfile != null) { existingGatewayProfile.setUpdateTime(AiravataUtils.getCurrentTimestamp()); + existingGatewayProfile.setCredentialStoreToken(credentialStoreToken); em.merge(existingGatewayProfile); } else { GatewayProfile gatewayProfile = new GatewayProfile(); gatewayProfile.setGatewayID(gatewayID); gatewayProfile.setCreationTime(AiravataUtils.getCurrentTimestamp()); + gatewayProfile.setCredentialStoreToken(credentialStoreToken); em.persist(gatewayProfile); } em.getTransaction().commit(); http://git-wip-us.apache.org/repos/asf/airavata/blob/c5585979/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java index a027ef4..33ce626 100644 --- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java @@ -867,6 +867,7 @@ public class AppCatalogJPAUtils { if (o != null) { resource.setGatewayID(o.getGatewayID()); resource.setCreatedTime(o.getCreationTime()); + resource.setCredentialStoreToken(o.getCredentialStoreToken()); if (o.getUpdateTime() != null){ resource.setUpdatedTime(o.getUpdateTime()); } http://git-wip-us.apache.org/repos/asf/airavata/blob/c5585979/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java index 58e9659..f419e6e 100644 --- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java @@ -805,6 +805,7 @@ public class AppCatalogThriftConversion { public static GatewayResourceProfile getGatewayResourceProfile(GatewayProfileResource gw, List<ComputeResourcePreference> preferences, List<DataStoragePreference> storagePreferences){ GatewayResourceProfile gatewayProfile = new GatewayResourceProfile(); gatewayProfile.setGatewayID(gw.getGatewayID()); + gatewayProfile.setCredentialStoreToken(gw.getCredentialStoreToken()); gatewayProfile.setComputeResourcePreferences(preferences); gatewayProfile.setDataStoragePreferences(storagePreferences); return gatewayProfile; http://git-wip-us.apache.org/repos/asf/airavata/blob/c5585979/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql index f148e9c..e68d165 100644 --- a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql +++ b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql @@ -318,6 +318,7 @@ CREATE TABLE GATEWAY_PROFILE GATEWAY_ID VARCHAR(255), CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00', + CS_TOKEN VARCHAR (255), PRIMARY KEY(GATEWAY_ID) ); http://git-wip-us.apache.org/repos/asf/airavata/blob/c5585979/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql index 5cc5b8e..14a8132 100644 --- a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql +++ b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql @@ -316,6 +316,7 @@ CREATE TABLE GATEWAY_PROFILE GATEWAY_ID VARCHAR(255), CREATION_TIME TIMESTAMP DEFAULT NOW(), UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' , + CS_TOKEN VARCHAR (255), PRIMARY KEY(GATEWAY_ID) ); http://git-wip-us.apache.org/repos/asf/airavata/blob/c5585979/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java ---------------------------------------------------------------------- diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java index f063e99..33db776 100644 --- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java +++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java @@ -190,7 +190,7 @@ public class ComputeResourceRegister { loginNamesWithResourceIds = getLoginNamesWithResourceIDs(); - List<GatewayResourceProfile> allGatewayComputeResources = airavata.getAllGatewayComputeResources(authzToken); + List<GatewayResourceProfile> allGatewayComputeResources = airavata.getAllGatewayResourceProfiles(authzToken); for (GatewayResourceProfile gatewayResourceProfile : allGatewayComputeResources) { for (String resourceId : loginNamesWithResourceIds.keySet()) { String loginUserName = loginNamesWithResourceIds.get(resourceId); http://git-wip-us.apache.org/repos/asf/airavata/blob/c5585979/thrift-interface-descriptions/airavata-api/airavata_api.thrift ---------------------------------------------------------------------- diff --git a/thrift-interface-descriptions/airavata-api/airavata_api.thrift b/thrift-interface-descriptions/airavata-api/airavata_api.thrift index 3ad051f..1dd70f6 100644 --- a/thrift-interface-descriptions/airavata-api/airavata_api.thrift +++ b/thrift-interface-descriptions/airavata-api/airavata_api.thrift @@ -2050,7 +2050,7 @@ service Airavata { * Fetch all gateway profiles registered **/ list<gateway_resource_profile_model.GatewayResourceProfile> - getAllGatewayComputeResources(1: required security_model.AuthzToken authzToken) + getAllGatewayResourceProfiles(1: required security_model.AuthzToken authzToken) throws (1: airavata_errors.InvalidRequestException ire, 2: airavata_errors.AiravataClientException ace, 3: airavata_errors.AiravataSystemException ase,
