http://git-wip-us.apache.org/repos/asf/airavata/blob/48e2593e/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 21f66d5..6a2ac8b 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 @@ -42,7 +42,6 @@ public class GatewayProfileResource extends AppCatAbstractResource { private Timestamp createdTime; private Timestamp updatedTime; private String credentialStoreToken; - private String usageReportingGWId; public Timestamp getCreatedTime() { return createdTime; @@ -64,14 +63,6 @@ public class GatewayProfileResource extends AppCatAbstractResource { return credentialStoreToken; } - public String getUsageReportingGWId() { - return usageReportingGWId; - } - - public void setUsageReportingGWId(String usageReportingGWId) { - this.usageReportingGWId = usageReportingGWId; - } - public void setCredentialStoreToken(String credentialStoreToken) { this.credentialStoreToken = credentialStoreToken; } @@ -324,7 +315,6 @@ public class GatewayProfileResource extends AppCatAbstractResource { em.getTransaction().begin(); if (existingGatewayProfile != null) { existingGatewayProfile.setUpdateTime(AiravataUtils.getCurrentTimestamp()); - existingGatewayProfile.setUsageReportingGWId(getUsageReportingGWId()); if (credentialStoreToken != null){ existingGatewayProfile.setCredentialStoreToken(credentialStoreToken); } @@ -332,7 +322,6 @@ public class GatewayProfileResource extends AppCatAbstractResource { } else { GatewayProfile gatewayProfile = new GatewayProfile(); gatewayProfile.setGatewayID(gatewayID); - gatewayProfile.setUsageReportingGWId(usageReportingGWId); gatewayProfile.setCreationTime(AiravataUtils.getCurrentTimestamp()); if (credentialStoreToken != null){ gatewayProfile.setCredentialStoreToken(credentialStoreToken);
http://git-wip-us.apache.org/repos/asf/airavata/blob/48e2593e/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 a754114..d5e7549 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 @@ -845,7 +845,6 @@ public class AppCatalogJPAUtils { resource.setGatewayID(o.getGatewayID()); resource.setCreatedTime(o.getCreationTime()); resource.setCredentialStoreToken(o.getCredentialStoreToken()); - resource.setUsageReportingGWId(o.getUsageReportingGWId()); if (o.getUpdateTime() != null) { resource.setUpdatedTime(o.getUpdateTime()); } @@ -866,6 +865,7 @@ public class AppCatalogJPAUtils { resource.setProjectNumber(o.getProjectNumber()); resource.setLoginUserName(o.getLoginUserName()); resource.setResourceCSToken(o.getComputeResourceCSToken()); + resource.setUsageReportingGatewayId(o.getUsageReportingGWId()); resource.setComputeHostResource((ComputeResourceResource) createComputeResource(o.getComputeHostResource())); resource.setGatewayProfile((GatewayProfileResource) createGatewayProfile(o.getGatewayProfile())); } http://git-wip-us.apache.org/repos/asf/airavata/blob/48e2593e/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 770e29c..b788109 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 @@ -819,6 +819,7 @@ public class AppCatalogThriftConversion { preference.setAllocationProjectNumber(resource.getProjectNumber()); preference.setLoginUserName(resource.getLoginUserName()); preference.setResourceSpecificCredentialStoreToken(resource.getResourceCSToken()); + preference.setUsageReportingGatewayId(resource.getGatewayId()); return preference; } @@ -857,7 +858,6 @@ public class AppCatalogThriftConversion { gatewayProfile.setCredentialStoreToken(gw.getCredentialStoreToken()); gatewayProfile.setComputeResourcePreferences(preferences); gatewayProfile.setStoragePreferences(storagePreferences); - gatewayProfile.setUsageReportingGatewayId(gw.getUsageReportingGWId()); return gatewayProfile; } http://git-wip-us.apache.org/repos/asf/airavata/blob/48e2593e/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 f08ed83..078cd73 100644 --- a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql +++ b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql @@ -323,7 +323,6 @@ CREATE TABLE GATEWAY_PROFILE CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00', CS_TOKEN VARCHAR (255), - USAGE_REPORTING_GATEWAY_ID VARCHAR(255), PRIMARY KEY(GATEWAY_ID) ); @@ -339,6 +338,7 @@ CREATE TABLE COMPUTE_RESOURCE_PREFERENCE ALLOCATION_PROJECT_NUMBER VARCHAR(255), LOGIN_USERNAME VARCHAR(255), RESOURCE_CS_TOKEN VARCHAR(255), + USAGE_REPORTING_GATEWAY_ID VARCHAR(255), PRIMARY KEY(GATEWAY_ID,RESOURCE_ID), FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE, FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY_PROFILE(GATEWAY_ID) ON DELETE CASCADE http://git-wip-us.apache.org/repos/asf/airavata/blob/48e2593e/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 a201897..25024f5 100644 --- a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql +++ b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql @@ -321,7 +321,6 @@ CREATE TABLE GATEWAY_PROFILE CREATION_TIME TIMESTAMP DEFAULT NOW(), UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' , CS_TOKEN VARCHAR (255), - USAGE_REPORTING_GATEWAY_ID VARCHAR(255), PRIMARY KEY(GATEWAY_ID) ); @@ -337,6 +336,7 @@ CREATE TABLE COMPUTE_RESOURCE_PREFERENCE ALLOCATION_PROJECT_NUMBER VARCHAR(255), LOGIN_USERNAME VARCHAR(255), RESOURCE_CS_TOKEN VARCHAR(255), + USAGE_REPORTING_GATEWAY_ID VARCHAR(255), PRIMARY KEY(GATEWAY_ID,RESOURCE_ID), FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE, FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY_PROFILE(GATEWAY_ID) ON DELETE CASCADE http://git-wip-us.apache.org/repos/asf/airavata/blob/48e2593e/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift ---------------------------------------------------------------------- diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift index 9447e97..23074f6 100644 --- a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift +++ b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift @@ -69,7 +69,8 @@ struct ComputeResourcePreference { 6: optional string preferredBatchQueue, 7: optional string scratchLocation, 8: optional string allocationProjectNumber, - 9: optional string resourceSpecificCredentialStoreToken + 9: optional string resourceSpecificCredentialStoreToken, + 10: optional string usageReportingGatewayId } struct StoragePreference { @@ -96,6 +97,5 @@ struct GatewayResourceProfile { 1: required string gatewayID, 2: optional string credentialStoreToken, 3: optional list<ComputeResourcePreference> computeResourcePreferences, - 4: optional list<StoragePreference> storagePreferences, - 5: optional string usageReportingGatewayId + 4: optional list<StoragePreference> storagePreferences }
