This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch usage-reporting
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/usage-reporting by this push:
new 57823d6 Added compute resource id for fetching gateway usage
reporting command
57823d6 is described below
commit 57823d6e391cd0f7641e064f7b752137612bda70
Author: Dimuthu Wannipurage <[email protected]>
AuthorDate: Sat Aug 1 13:54:47 2020 -0400
Added compute resource id for fetching gateway usage reporting command
---
.../workspace/GatewayUsageReportingCommand.java | 108 +++-
.../task/submission/DefaultJobSubmissionTask.java | 7 +-
.../init/04-expcatalog-migrations.sql | 9 +-
.../GatewayUsageReportingCommandEntity.java | 13 +
...andEntity.java => GatewayUsageReportingPK.java} | 43 +-
.../GatewayUsageReportingCommandRepository.java | 26 +-
.../src/main/resources/appcatalog-mysql.sql | 6 -
.../src/main/resources/expcatalog-derby.sql | 7 +
.../src/main/resources/expcatalog-mysql.sql | 7 +
.../api/service/handler/RegistryServerHandler.java | 33 +-
.../airavata/registry/api/RegistryService.java | 684 +++++++++++++++------
.../component-cpis/registry-api.thrift | 7 +-
.../workspace_model.thrift | 3 +-
13 files changed, 705 insertions(+), 248 deletions(-)
diff --git
a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/GatewayUsageReportingCommand.java
b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/GatewayUsageReportingCommand.java
index 1b8196d..de9d648 100644
---
a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/GatewayUsageReportingCommand.java
+++
b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/GatewayUsageReportingCommand.java
@@ -29,18 +29,21 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new
org.apache.thrift.protocol.TStruct("GatewayUsageReportingCommand");
private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC
= new org.apache.thrift.protocol.TField("gatewayId",
org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField COMMAND_FIELD_DESC =
new org.apache.thrift.protocol.TField("command",
org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField
COMPUTE_RESOURCE_ID_FIELD_DESC = new
org.apache.thrift.protocol.TField("computeResourceId",
org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField COMMAND_FIELD_DESC =
new org.apache.thrift.protocol.TField("command",
org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory
STANDARD_SCHEME_FACTORY = new
GatewayUsageReportingCommandStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory
TUPLE_SCHEME_FACTORY = new GatewayUsageReportingCommandTupleSchemeFactory();
private java.lang.String gatewayId; // required
+ private java.lang.String computeResourceId; // required
private java.lang.String command; // required
/** The set of fields this struct contains, along with convenience methods
for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
GATEWAY_ID((short)1, "gatewayId"),
- COMMAND((short)2, "command");
+ COMPUTE_RESOURCE_ID((short)2, "computeResourceId"),
+ COMMAND((short)3, "command");
private static final java.util.Map<java.lang.String, _Fields> byName = new
java.util.HashMap<java.lang.String, _Fields>();
@@ -57,7 +60,9 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
switch(fieldId) {
case 1: // GATEWAY_ID
return GATEWAY_ID;
- case 2: // COMMAND
+ case 2: // COMPUTE_RESOURCE_ID
+ return COMPUTE_RESOURCE_ID;
+ case 3: // COMMAND
return COMMAND;
default:
return null;
@@ -104,6 +109,8 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
new java.util.EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.GATEWAY_ID, new
org.apache.thrift.meta_data.FieldMetaData("gatewayId",
org.apache.thrift.TFieldRequirementType.REQUIRED,
new
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.COMPUTE_RESOURCE_ID, new
org.apache.thrift.meta_data.FieldMetaData("computeResourceId",
org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.COMMAND, new
org.apache.thrift.meta_data.FieldMetaData("command",
org.apache.thrift.TFieldRequirementType.REQUIRED,
new
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
@@ -115,10 +122,12 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
public GatewayUsageReportingCommand(
java.lang.String gatewayId,
+ java.lang.String computeResourceId,
java.lang.String command)
{
this();
this.gatewayId = gatewayId;
+ this.computeResourceId = computeResourceId;
this.command = command;
}
@@ -129,6 +138,9 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
if (other.isSetGatewayId()) {
this.gatewayId = other.gatewayId;
}
+ if (other.isSetComputeResourceId()) {
+ this.computeResourceId = other.computeResourceId;
+ }
if (other.isSetCommand()) {
this.command = other.command;
}
@@ -141,6 +153,7 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
@Override
public void clear() {
this.gatewayId = null;
+ this.computeResourceId = null;
this.command = null;
}
@@ -167,6 +180,29 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
}
}
+ public java.lang.String getComputeResourceId() {
+ return this.computeResourceId;
+ }
+
+ public void setComputeResourceId(java.lang.String computeResourceId) {
+ this.computeResourceId = computeResourceId;
+ }
+
+ public void unsetComputeResourceId() {
+ this.computeResourceId = null;
+ }
+
+ /** Returns true if field computeResourceId is set (has been assigned a
value) and false otherwise */
+ public boolean isSetComputeResourceId() {
+ return this.computeResourceId != null;
+ }
+
+ public void setComputeResourceIdIsSet(boolean value) {
+ if (!value) {
+ this.computeResourceId = null;
+ }
+ }
+
public java.lang.String getCommand() {
return this.command;
}
@@ -200,6 +236,14 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
}
break;
+ case COMPUTE_RESOURCE_ID:
+ if (value == null) {
+ unsetComputeResourceId();
+ } else {
+ setComputeResourceId((java.lang.String)value);
+ }
+ break;
+
case COMMAND:
if (value == null) {
unsetCommand();
@@ -216,6 +260,9 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
case GATEWAY_ID:
return getGatewayId();
+ case COMPUTE_RESOURCE_ID:
+ return getComputeResourceId();
+
case COMMAND:
return getCommand();
@@ -232,6 +279,8 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
switch (field) {
case GATEWAY_ID:
return isSetGatewayId();
+ case COMPUTE_RESOURCE_ID:
+ return isSetComputeResourceId();
case COMMAND:
return isSetCommand();
}
@@ -262,6 +311,15 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
return false;
}
+ boolean this_present_computeResourceId = true &&
this.isSetComputeResourceId();
+ boolean that_present_computeResourceId = true &&
that.isSetComputeResourceId();
+ if (this_present_computeResourceId || that_present_computeResourceId) {
+ if (!(this_present_computeResourceId && that_present_computeResourceId))
+ return false;
+ if (!this.computeResourceId.equals(that.computeResourceId))
+ return false;
+ }
+
boolean this_present_command = true && this.isSetCommand();
boolean that_present_command = true && that.isSetCommand();
if (this_present_command || that_present_command) {
@@ -282,6 +340,10 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
+ hashCode = hashCode * 8191 + ((isSetComputeResourceId()) ? 131071 :
524287);
+ if (isSetComputeResourceId())
+ hashCode = hashCode * 8191 + computeResourceId.hashCode();
+
hashCode = hashCode * 8191 + ((isSetCommand()) ? 131071 : 524287);
if (isSetCommand())
hashCode = hashCode * 8191 + command.hashCode();
@@ -307,6 +369,16 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
return lastComparison;
}
}
+ lastComparison =
java.lang.Boolean.valueOf(isSetComputeResourceId()).compareTo(other.isSetComputeResourceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputeResourceId()) {
+ lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.computeResourceId,
other.computeResourceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison =
java.lang.Boolean.valueOf(isSetCommand()).compareTo(other.isSetCommand());
if (lastComparison != 0) {
return lastComparison;
@@ -345,6 +417,14 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
}
first = false;
if (!first) sb.append(", ");
+ sb.append("computeResourceId:");
+ if (this.computeResourceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computeResourceId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
sb.append("command:");
if (this.command == null) {
sb.append("null");
@@ -362,6 +442,10 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
throw new org.apache.thrift.protocol.TProtocolException("Required field
'gatewayId' is unset! Struct:" + toString());
}
+ if (!isSetComputeResourceId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field
'computeResourceId' is unset! Struct:" + toString());
+ }
+
if (!isSetCommand()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field
'command' is unset! Struct:" + toString());
}
@@ -411,7 +495,15 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
}
break;
- case 2: // COMMAND
+ case 2: // COMPUTE_RESOURCE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
+ }
+ break;
+ case 3: // COMMAND
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.command = iprot.readString();
struct.setCommandIsSet(true);
@@ -437,6 +529,11 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
oprot.writeString(struct.gatewayId);
oprot.writeFieldEnd();
}
+ if (struct.computeResourceId != null) {
+ oprot.writeFieldBegin(COMPUTE_RESOURCE_ID_FIELD_DESC);
+ oprot.writeString(struct.computeResourceId);
+ oprot.writeFieldEnd();
+ }
if (struct.command != null) {
oprot.writeFieldBegin(COMMAND_FIELD_DESC);
oprot.writeString(struct.command);
@@ -460,6 +557,7 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
public void write(org.apache.thrift.protocol.TProtocol prot,
GatewayUsageReportingCommand struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.gatewayId);
+ oprot.writeString(struct.computeResourceId);
oprot.writeString(struct.command);
}
@@ -468,6 +566,8 @@ public class GatewayUsageReportingCommand implements
org.apache.thrift.TBase<Gat
org.apache.thrift.protocol.TTupleProtocol iprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
struct.command = iprot.readString();
struct.setCommandIsSet(true);
}
diff --git
a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/DefaultJobSubmissionTask.java
b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/DefaultJobSubmissionTask.java
index 66eb333..20efe03 100644
---
a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/DefaultJobSubmissionTask.java
+++
b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/DefaultJobSubmissionTask.java
@@ -190,10 +190,13 @@ public class DefaultJobSubmissionTask extends
JobSubmissionTask {
// usage reporting as the last step of job submission task
try {
mapData.setJobId(jobId);
- boolean reportingAvailable =
getRegistryServiceClient().isReportingAvailable(getGatewayId());
+ boolean reportingAvailable = getRegistryServiceClient()
+
.isGatewayUsageReportingAvailable(getGatewayId(),
taskContext.getComputeResourceId());
if (reportingAvailable) {
- GatewayUsageReportingCommand reportingCommand =
getRegistryServiceClient().getGatewayReportingCommand(getGatewayId());
+ GatewayUsageReportingCommand reportingCommand =
getRegistryServiceClient()
+
.getGatewayReportingCommand(getGatewayId(), taskContext.getComputeResourceId());
+
String parsedCommand =
mapData.loadFromString(reportingCommand.getCommand());
logger.debug("Parsed usage reporting command {}",
parsedCommand);
diff --git
a/modules/ide-integration/src/main/resources/database_scripts/init/04-expcatalog-migrations.sql
b/modules/ide-integration/src/main/resources/database_scripts/init/04-expcatalog-migrations.sql
index 1e561e6..1be66c6 100644
---
a/modules/ide-integration/src/main/resources/database_scripts/init/04-expcatalog-migrations.sql
+++
b/modules/ide-integration/src/main/resources/database_scripts/init/04-expcatalog-migrations.sql
@@ -3,8 +3,9 @@ use experiment_catalog;
ALTER TABLE EXPERIMENT_INPUT ADD COLUMN IF NOT EXISTS OVERRIDE_FILENAME
VARCHAR(255);
ALTER TABLE PROCESS_INPUT ADD COLUMN IF NOT EXISTS OVERRIDE_FILENAME
VARCHAR(255);
-CREATE TABLE IF NOT EXISTS GATEWAY_USAGE_REPORTING_COMMAND (
- GATEWAY_ID VARCHAR(255) NOT NULL,
- COMMAND LONGTEXT NOT NULL,
- PRIMARY KEY (GATEWAY_ID)
+CREATE TABLE GATEWAY_USAGE_REPORTING_COMMAND (
+ GATEWAY_ID VARCHAR(255) NOT NULL,
+ COMPUTE_RESOURCE_ID VARCHAR(255) NOT NULL,
+ COMMAND LONGTEXT NOT NULL,
+ PRIMARY KEY (GATEWAY_ID, COMPUTE_RESOURCE_ID)
)ENGINE=InnoDB DEFAULT CHARSET=latin1;
\ No newline at end of file
diff --git
a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/GatewayUsageReportingCommandEntity.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/GatewayUsageReportingCommandEntity.java
index 1aec78a..1beeb34 100644
---
a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/GatewayUsageReportingCommandEntity.java
+++
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/GatewayUsageReportingCommandEntity.java
@@ -24,6 +24,7 @@ import java.io.Serializable;
@Entity
@Table(name = "GATEWAY_USAGE_REPORTING_COMMAND")
+@IdClass(GatewayUsageReportingPK.class)
public class GatewayUsageReportingCommandEntity implements Serializable {
private static final long serialVersionUID = 1L;
@@ -31,6 +32,10 @@ public class GatewayUsageReportingCommandEntity implements
Serializable {
@Column(name = "GATEWAY_ID")
private String gatewayId;
+ @Id
+ @Column(name = "COMPUTE_RESOURCE_ID")
+ private String computeResourceId;
+
@Lob
@Column(name = "COMMAND")
private String command;
@@ -50,4 +55,12 @@ public class GatewayUsageReportingCommandEntity implements
Serializable {
public void setCommand(String command) {
this.command = command;
}
+
+ public String getComputeResourceId() {
+ return computeResourceId;
+ }
+
+ public void setComputeResourceId(String computeResourceId) {
+ this.computeResourceId = computeResourceId;
+ }
}
diff --git
a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/GatewayUsageReportingCommandEntity.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/GatewayUsageReportingPK.java
similarity index 53%
copy from
modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/GatewayUsageReportingCommandEntity.java
copy to
modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/GatewayUsageReportingPK.java
index 1aec78a..16eb944 100644
---
a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/GatewayUsageReportingCommandEntity.java
+++
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/GatewayUsageReportingPK.java
@@ -19,21 +19,16 @@
*/
package org.apache.airavata.registry.core.entities.expcatalog;
-import javax.persistence.*;
import java.io.Serializable;
-@Entity
-@Table(name = "GATEWAY_USAGE_REPORTING_COMMAND")
-public class GatewayUsageReportingCommandEntity implements Serializable {
+public class GatewayUsageReportingPK implements Serializable {
private static final long serialVersionUID = 1L;
- @Id
- @Column(name = "GATEWAY_ID")
private String gatewayId;
+ private String computeResourceId;
- @Lob
- @Column(name = "COMMAND")
- private String command;
+ public GatewayUsageReportingPK() {
+ }
public String getGatewayId() {
return gatewayId;
@@ -43,11 +38,33 @@ public class GatewayUsageReportingCommandEntity implements
Serializable {
this.gatewayId = gatewayId;
}
- public String getCommand() {
- return command;
+ public String getComputeResourceId() {
+ return computeResourceId;
+ }
+
+ public void setComputeResourceId(String computeResourceId) {
+ this.computeResourceId = computeResourceId;
}
- public void setCommand(String command) {
- this.command = command;
+ public boolean equals(Object other) {
+ if (this == other) {
+ return true;
+ }
+ if (!(other instanceof GatewayUsageReportingPK)) {
+ return false;
+ }
+ GatewayUsageReportingPK castOther = (GatewayUsageReportingPK) other;
+ return
+ this.gatewayId.equals(castOther.gatewayId)
+ &&
this.computeResourceId.equals(castOther.computeResourceId);
+ }
+
+ public int hashCode() {
+ final int prime = 31;
+ int hash = 17;
+ hash = hash * prime + this.gatewayId.hashCode();
+ hash = hash * prime + this.computeResourceId.hashCode();
+
+ return hash;
}
}
diff --git
a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/GatewayUsageReportingCommandRepository.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/GatewayUsageReportingCommandRepository.java
index 5c0ba5f..12130de 100644
---
a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/GatewayUsageReportingCommandRepository.java
+++
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/GatewayUsageReportingCommandRepository.java
@@ -21,6 +21,7 @@
import org.apache.airavata.model.workspace.GatewayUsageReportingCommand;
import
org.apache.airavata.registry.core.entities.expcatalog.GatewayUsageReportingCommandEntity;
+import
org.apache.airavata.registry.core.entities.expcatalog.GatewayUsageReportingPK;
import org.apache.airavata.registry.core.utils.ObjectMapperSingleton;
import org.apache.airavata.registry.cpi.RegistryException;
import org.dozer.Mapper;
@@ -28,7 +29,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class GatewayUsageReportingCommandRepository extends
- ExpCatAbstractRepository<GatewayUsageReportingCommand,
GatewayUsageReportingCommandEntity, String> {
+ ExpCatAbstractRepository<GatewayUsageReportingCommand,
GatewayUsageReportingCommandEntity, GatewayUsageReportingPK> {
private final static Logger logger =
LoggerFactory.getLogger(GatewayRepository.class);
@@ -42,17 +43,26 @@ public class GatewayUsageReportingCommandRepository extends
logger.info("Added gateway usage reporting command for gateway {} to
the database", command.getGatewayId());
}
- public GatewayUsageReportingCommand getGatewayUsageReportingCommand(String
gatewayId) {
- return get(gatewayId);
+ public GatewayUsageReportingCommand getGatewayUsageReportingCommand(String
gatewayId, String computeResourceId) {
+ GatewayUsageReportingPK pk = new GatewayUsageReportingPK();
+ pk.setGatewayId(gatewayId);
+ pk.setComputeResourceId(computeResourceId);
+ return get(pk);
}
- public boolean isGatewayUsageReportingCommandExists(String gatewayId)
throws RegistryException {
- return isExists(gatewayId);
+ public boolean isGatewayUsageReportingCommandExists(String gatewayId,
String computeResourceId) throws RegistryException {
+ GatewayUsageReportingPK pk = new GatewayUsageReportingPK();
+ pk.setGatewayId(gatewayId);
+ pk.setComputeResourceId(computeResourceId);
+ return isExists(pk);
}
- public void removeGatewayUsageReportingCommand(String gatewayId) throws
RegistryException {
- if (isExists(gatewayId)) {
- delete(gatewayId);
+ public void removeGatewayUsageReportingCommand(String gatewayId, String
computeResourceId) throws RegistryException {
+ if (isGatewayUsageReportingCommandExists(gatewayId,
computeResourceId)) {
+ GatewayUsageReportingPK pk = new GatewayUsageReportingPK();
+ pk.setGatewayId(gatewayId);
+ pk.setComputeResourceId(computeResourceId);
+ delete(pk);
logger.info("Deleted gateway usage reporting command for gateway
{}", gatewayId);
}
}
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 d910f14..9ee940b 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
@@ -727,12 +727,6 @@ CREATE TABLE CLOUD_JOB_SUBMISSION (
PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID)
)ENGINE=InnoDB DEFAULT CHARSET=latin1;
-CREATE TABLE GATEWAY_USAGE_REPORTING_COMMAND (
- GATEWAY_ID VARCHAR(255) NOT NULL,
- COMMAND LONGTEXT NOT NULL,
- PRIMARY KEY (GATEWAY_ID)
-)ENGINE=InnoDB DEFAULT CHARSET=latin1;
-
CREATE TABLE CONFIGURATION
(
CONFIG_KEY VARCHAR(255),
diff --git
a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
index 85f12f1..0c92467 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
@@ -417,3 +417,10 @@ CREATE TABLE PROCESS_WORKFLOW
PRIMARY KEY (PROCESS_ID, WORKFLOW_ID),
FOREIGN KEY (PROCESS_ID) REFERENCES PROCESS(PROCESS_ID) ON DELETE CASCADE
);
+
+CREATE TABLE GATEWAY_USAGE_REPORTING_COMMAND (
+ GATEWAY_ID VARCHAR(255) NOT NULL,
+ COMPUTE_RESOURCE_ID VARCHAR(255) NOT NULL,
+ COMMAND LONGTEXT NOT NULL,
+ PRIMARY KEY (GATEWAY_ID, COMPUTE_RESOURCE_ID)
+)
\ No newline at end of file
diff --git
a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
index b093aa3..3560703 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
@@ -419,3 +419,10 @@ CREATE TABLE PROCESS_WORKFLOW
PRIMARY KEY (PROCESS_ID, WORKFLOW_ID),
FOREIGN KEY (PROCESS_ID) REFERENCES PROCESS(PROCESS_ID) ON DELETE CASCADE
)ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE GATEWAY_USAGE_REPORTING_COMMAND (
+ GATEWAY_ID VARCHAR(255) NOT NULL,
+ COMPUTE_RESOURCE_ID VARCHAR(255) NOT NULL,
+ COMMAND LONGTEXT NOT NULL,
+ PRIMARY KEY (GATEWAY_ID, COMPUTE_RESOURCE_ID)
+)ENGINE=InnoDB DEFAULT CHARSET=latin1;
diff --git
a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
index 222054f..3ff767d 100644
---
a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
+++
b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
@@ -5063,25 +5063,25 @@ public class RegistryServerHandler implements
RegistryService.Iface {
}
@Override
- public boolean isReportingAvailable(String gatewayId) throws
RegistryServiceException, TException {
+ public boolean isGatewayUsageReportingAvailable(String gatewayId, String
computeResourceId) throws RegistryServiceException, TException {
try {
- return
usageReportingCommandRepository.isGatewayUsageReportingCommandExists(gatewayId);
+ return
usageReportingCommandRepository.isGatewayUsageReportingCommandExists(gatewayId,
computeResourceId);
} catch (Exception e) {
- String message = "Failed to check the availability to find the
reporting information for the gateway " + gatewayId;
+ String message = "Failed to check the availability to find the
reporting information for the gateway "
+ + gatewayId + " and
compute resource " + computeResourceId;
logger.error(message, e);
RegistryServiceException rse = new RegistryServiceException();
rse.setMessage(message + ". More info " + e.getMessage());
throw rse;
- }
- }
+ } }
@Override
- public GatewayUsageReportingCommand getGatewayReportingCommand(String
gatewayId) throws RegistryServiceException, TException {
+ public GatewayUsageReportingCommand getGatewayReportingCommand(String
gatewayId, String computeResourceId) throws RegistryServiceException,
TException {
try {
- if
(usageReportingCommandRepository.isGatewayUsageReportingCommandExists(gatewayId))
{
- return
usageReportingCommandRepository.getGatewayUsageReportingCommand(gatewayId);
+ if
(usageReportingCommandRepository.isGatewayUsageReportingCommandExists(gatewayId,
computeResourceId)) {
+ return
usageReportingCommandRepository.getGatewayUsageReportingCommand(gatewayId,
computeResourceId);
} else {
- String message = "No usage reporting information for the
gateway " + gatewayId;
+ String message = "No usage reporting information for the
gateway " + gatewayId + " and compute resource " + computeResourceId;
logger.error(message);
throw new RegistryServiceException(message);
}
@@ -5089,19 +5089,21 @@ public class RegistryServerHandler implements
RegistryService.Iface {
throw e; // re-throw
} catch (Exception e) {
- String message = "Failed to check the availability to find the
reporting information for the gateway " + gatewayId;
+ String message = "Failed to check the availability to find the
reporting information for the gateway " +
+ gatewayId + " and compute resource " +
computeResourceId;
logger.error(message, e);
RegistryServiceException rse = new RegistryServiceException();
rse.setMessage(message + ". More info " + e.getMessage());
throw rse;
- } }
+ } }
@Override
public void addGatewayUsageReportingCommand(GatewayUsageReportingCommand
command) throws RegistryServiceException, TException {
try {
usageReportingCommandRepository.addGatewayUsageReportingCommand(command);
} catch (Exception e) {
- String message = "Failed to add the reporting information for the
gateway " + command.getGatewayId();
+ String message = "Failed to add the reporting information for the
gateway " + command.getGatewayId()
+ + " and compute resource " +
command.getComputeResourceId();
logger.error(message, e);
RegistryServiceException rse = new RegistryServiceException();
rse.setMessage(message + ". More info " + e.getMessage());
@@ -5110,11 +5112,12 @@ public class RegistryServerHandler implements
RegistryService.Iface {
}
@Override
- public void
removeGatewayUsageReportingCommand(GatewayUsageReportingCommand command) throws
RegistryServiceException, TException {
+ public void removeGatewayUsageReportingCommand(String gatewayId, String
computeResourceId) throws RegistryServiceException, TException {
try {
-
usageReportingCommandRepository.removeGatewayUsageReportingCommand(command.getGatewayId());
+
usageReportingCommandRepository.removeGatewayUsageReportingCommand(gatewayId,
computeResourceId);
} catch (Exception e) {
- String message = "Failed to add the reporting information for the
gateway " + command.getGatewayId();
+ String message = "Failed to add the reporting information for the
gateway " + gatewayId +
+ " and compute resource " + computeResourceId;
logger.error(message, e);
RegistryServiceException rse = new RegistryServiceException();
rse.setMessage(message + ". More info " + e.getMessage());
diff --git
a/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java
b/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java
index 5542dea..67b0c32 100644
---
a/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java
+++
b/modules/registry/registry-server/registry-api-stubs/src/main/java/org/apache/airavata/registry/api/RegistryService.java
@@ -2610,13 +2610,13 @@ public class RegistryService {
public void removeParsingTemplate(java.lang.String templateId,
java.lang.String gatewayId) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException;
- public boolean isReportingAvailable(java.lang.String gatewayId) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException;
+ public boolean isGatewayUsageReportingAvailable(java.lang.String
gatewayId, java.lang.String computeResourceId) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException;
- public org.apache.airavata.model.workspace.GatewayUsageReportingCommand
getGatewayReportingCommand(java.lang.String gatewayId) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException;
+ public org.apache.airavata.model.workspace.GatewayUsageReportingCommand
getGatewayReportingCommand(java.lang.String gatewayId, java.lang.String
computeResourceId) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException;
public void
addGatewayUsageReportingCommand(org.apache.airavata.model.workspace.GatewayUsageReportingCommand
command) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException;
- public void
removeGatewayUsageReportingCommand(org.apache.airavata.model.workspace.GatewayUsageReportingCommand
command) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException;
+ public void removeGatewayUsageReportingCommand(java.lang.String gatewayId,
java.lang.String computeResourceId) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException;
}
@@ -3014,13 +3014,13 @@ public class RegistryService {
public void removeParsingTemplate(java.lang.String templateId,
java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<Void>
resultHandler) throws org.apache.thrift.TException;
- public void isReportingAvailable(java.lang.String gatewayId,
org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler)
throws org.apache.thrift.TException;
+ public void isGatewayUsageReportingAvailable(java.lang.String gatewayId,
java.lang.String computeResourceId,
org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler)
throws org.apache.thrift.TException;
- public void getGatewayReportingCommand(java.lang.String gatewayId,
org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.GatewayUsageReportingCommand>
resultHandler) throws org.apache.thrift.TException;
+ public void getGatewayReportingCommand(java.lang.String gatewayId,
java.lang.String computeResourceId,
org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.GatewayUsageReportingCommand>
resultHandler) throws org.apache.thrift.TException;
public void
addGatewayUsageReportingCommand(org.apache.airavata.model.workspace.GatewayUsageReportingCommand
command, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler)
throws org.apache.thrift.TException;
- public void
removeGatewayUsageReportingCommand(org.apache.airavata.model.workspace.GatewayUsageReportingCommand
command, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler)
throws org.apache.thrift.TException;
+ public void removeGatewayUsageReportingCommand(java.lang.String gatewayId,
java.lang.String computeResourceId,
org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws
org.apache.thrift.TException;
}
@@ -8277,42 +8277,44 @@ public class RegistryService {
return;
}
- public boolean isReportingAvailable(java.lang.String gatewayId) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException
+ public boolean isGatewayUsageReportingAvailable(java.lang.String
gatewayId, java.lang.String computeResourceId) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException
{
- send_isReportingAvailable(gatewayId);
- return recv_isReportingAvailable();
+ send_isGatewayUsageReportingAvailable(gatewayId, computeResourceId);
+ return recv_isGatewayUsageReportingAvailable();
}
- public void send_isReportingAvailable(java.lang.String gatewayId) throws
org.apache.thrift.TException
+ public void send_isGatewayUsageReportingAvailable(java.lang.String
gatewayId, java.lang.String computeResourceId) throws
org.apache.thrift.TException
{
- isReportingAvailable_args args = new isReportingAvailable_args();
+ isGatewayUsageReportingAvailable_args args = new
isGatewayUsageReportingAvailable_args();
args.setGatewayId(gatewayId);
- sendBase("isReportingAvailable", args);
+ args.setComputeResourceId(computeResourceId);
+ sendBase("isGatewayUsageReportingAvailable", args);
}
- public boolean recv_isReportingAvailable() throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException
+ public boolean recv_isGatewayUsageReportingAvailable() throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException
{
- isReportingAvailable_result result = new isReportingAvailable_result();
- receiveBase(result, "isReportingAvailable");
+ isGatewayUsageReportingAvailable_result result = new
isGatewayUsageReportingAvailable_result();
+ receiveBase(result, "isGatewayUsageReportingAvailable");
if (result.isSetSuccess()) {
return result.success;
}
if (result.rse != null) {
throw result.rse;
}
- throw new
org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT,
"isReportingAvailable failed: unknown result");
+ throw new
org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT,
"isGatewayUsageReportingAvailable failed: unknown result");
}
- public org.apache.airavata.model.workspace.GatewayUsageReportingCommand
getGatewayReportingCommand(java.lang.String gatewayId) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException
+ public org.apache.airavata.model.workspace.GatewayUsageReportingCommand
getGatewayReportingCommand(java.lang.String gatewayId, java.lang.String
computeResourceId) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException
{
- send_getGatewayReportingCommand(gatewayId);
+ send_getGatewayReportingCommand(gatewayId, computeResourceId);
return recv_getGatewayReportingCommand();
}
- public void send_getGatewayReportingCommand(java.lang.String gatewayId)
throws org.apache.thrift.TException
+ public void send_getGatewayReportingCommand(java.lang.String gatewayId,
java.lang.String computeResourceId) throws org.apache.thrift.TException
{
getGatewayReportingCommand_args args = new
getGatewayReportingCommand_args();
args.setGatewayId(gatewayId);
+ args.setComputeResourceId(computeResourceId);
sendBase("getGatewayReportingCommand", args);
}
@@ -8352,16 +8354,17 @@ public class RegistryService {
return;
}
- public void
removeGatewayUsageReportingCommand(org.apache.airavata.model.workspace.GatewayUsageReportingCommand
command) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException
+ public void removeGatewayUsageReportingCommand(java.lang.String gatewayId,
java.lang.String computeResourceId) throws
org.apache.airavata.registry.api.exception.RegistryServiceException,
org.apache.thrift.TException
{
- send_removeGatewayUsageReportingCommand(command);
+ send_removeGatewayUsageReportingCommand(gatewayId, computeResourceId);
recv_removeGatewayUsageReportingCommand();
}
- public void
send_removeGatewayUsageReportingCommand(org.apache.airavata.model.workspace.GatewayUsageReportingCommand
command) throws org.apache.thrift.TException
+ public void send_removeGatewayUsageReportingCommand(java.lang.String
gatewayId, java.lang.String computeResourceId) throws
org.apache.thrift.TException
{
removeGatewayUsageReportingCommand_args args = new
removeGatewayUsageReportingCommand_args();
- args.setCommand(command);
+ args.setGatewayId(gatewayId);
+ args.setComputeResourceId(computeResourceId);
sendBase("removeGatewayUsageReportingCommand", args);
}
@@ -15121,24 +15124,27 @@ public class RegistryService {
}
}
- public void isReportingAvailable(java.lang.String gatewayId,
org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler)
throws org.apache.thrift.TException {
+ public void isGatewayUsageReportingAvailable(java.lang.String gatewayId,
java.lang.String computeResourceId,
org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler)
throws org.apache.thrift.TException {
checkReady();
- isReportingAvailable_call method_call = new
isReportingAvailable_call(gatewayId, resultHandler, this, ___protocolFactory,
___transport);
+ isGatewayUsageReportingAvailable_call method_call = new
isGatewayUsageReportingAvailable_call(gatewayId, computeResourceId,
resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class isReportingAvailable_call extends
org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
+ public static class isGatewayUsageReportingAvailable_call extends
org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private java.lang.String gatewayId;
- public isReportingAvailable_call(java.lang.String gatewayId,
org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler,
org.apache.thrift.async.TAsyncClient client,
org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.transport.TNonblockingTransport transport) throws
org.apache.thrift.TException {
+ private java.lang.String computeResourceId;
+ public isGatewayUsageReportingAvailable_call(java.lang.String gatewayId,
java.lang.String computeResourceId,
org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler,
org.apache.thrift.async.TAsyncClient client,
org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.transport.TNonblockingTransport transport) throws
org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.gatewayId = gatewayId;
+ this.computeResourceId = computeResourceId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws
org.apache.thrift.TException {
- prot.writeMessageBegin(new
org.apache.thrift.protocol.TMessage("isReportingAvailable",
org.apache.thrift.protocol.TMessageType.CALL, 0));
- isReportingAvailable_args args = new isReportingAvailable_args();
+ prot.writeMessageBegin(new
org.apache.thrift.protocol.TMessage("isGatewayUsageReportingAvailable",
org.apache.thrift.protocol.TMessageType.CALL, 0));
+ isGatewayUsageReportingAvailable_args args = new
isGatewayUsageReportingAvailable_args();
args.setGatewayId(gatewayId);
+ args.setComputeResourceId(computeResourceId);
args.write(prot);
prot.writeMessageEnd();
}
@@ -15149,28 +15155,31 @@ public class RegistryService {
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot =
client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_isReportingAvailable();
+ return (new Client(prot)).recv_isGatewayUsageReportingAvailable();
}
}
- public void getGatewayReportingCommand(java.lang.String gatewayId,
org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.GatewayUsageReportingCommand>
resultHandler) throws org.apache.thrift.TException {
+ public void getGatewayReportingCommand(java.lang.String gatewayId,
java.lang.String computeResourceId,
org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.GatewayUsageReportingCommand>
resultHandler) throws org.apache.thrift.TException {
checkReady();
- getGatewayReportingCommand_call method_call = new
getGatewayReportingCommand_call(gatewayId, resultHandler, this,
___protocolFactory, ___transport);
+ getGatewayReportingCommand_call method_call = new
getGatewayReportingCommand_call(gatewayId, computeResourceId, resultHandler,
this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getGatewayReportingCommand_call extends
org.apache.thrift.async.TAsyncMethodCall<org.apache.airavata.model.workspace.GatewayUsageReportingCommand>
{
private java.lang.String gatewayId;
- public getGatewayReportingCommand_call(java.lang.String gatewayId,
org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.GatewayUsageReportingCommand>
resultHandler, org.apache.thrift.async.TAsyncClient client,
org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.transport.TNonblockingTransport transport) throws
org.apache.thrift.TException {
+ private java.lang.String computeResourceId;
+ public getGatewayReportingCommand_call(java.lang.String gatewayId,
java.lang.String computeResourceId,
org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.GatewayUsageReportingCommand>
resultHandler, org.apache.thrift.async.TAsyncClient client,
org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.transport.TNonblockingTransport transport) throws
org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.gatewayId = gatewayId;
+ this.computeResourceId = computeResourceId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws
org.apache.thrift.TException {
prot.writeMessageBegin(new
org.apache.thrift.protocol.TMessage("getGatewayReportingCommand",
org.apache.thrift.protocol.TMessageType.CALL, 0));
getGatewayReportingCommand_args args = new
getGatewayReportingCommand_args();
args.setGatewayId(gatewayId);
+ args.setComputeResourceId(computeResourceId);
args.write(prot);
prot.writeMessageEnd();
}
@@ -15217,24 +15226,27 @@ public class RegistryService {
}
}
- public void
removeGatewayUsageReportingCommand(org.apache.airavata.model.workspace.GatewayUsageReportingCommand
command, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler)
throws org.apache.thrift.TException {
+ public void removeGatewayUsageReportingCommand(java.lang.String gatewayId,
java.lang.String computeResourceId,
org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws
org.apache.thrift.TException {
checkReady();
- removeGatewayUsageReportingCommand_call method_call = new
removeGatewayUsageReportingCommand_call(command, resultHandler, this,
___protocolFactory, ___transport);
+ removeGatewayUsageReportingCommand_call method_call = new
removeGatewayUsageReportingCommand_call(gatewayId, computeResourceId,
resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class removeGatewayUsageReportingCommand_call extends
org.apache.thrift.async.TAsyncMethodCall<Void> {
- private org.apache.airavata.model.workspace.GatewayUsageReportingCommand
command;
- public
removeGatewayUsageReportingCommand_call(org.apache.airavata.model.workspace.GatewayUsageReportingCommand
command, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler,
org.apache.thrift.async.TAsyncClient client,
org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.transport.TNonblockingTransport transport) throws
org.apache.thrift.TException {
+ private java.lang.String gatewayId;
+ private java.lang.String computeResourceId;
+ public removeGatewayUsageReportingCommand_call(java.lang.String
gatewayId, java.lang.String computeResourceId,
org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler,
org.apache.thrift.async.TAsyncClient client,
org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.transport.TNonblockingTransport transport) throws
org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
- this.command = command;
+ this.gatewayId = gatewayId;
+ this.computeResourceId = computeResourceId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws
org.apache.thrift.TException {
prot.writeMessageBegin(new
org.apache.thrift.protocol.TMessage("removeGatewayUsageReportingCommand",
org.apache.thrift.protocol.TMessageType.CALL, 0));
removeGatewayUsageReportingCommand_args args = new
removeGatewayUsageReportingCommand_args();
- args.setCommand(command);
+ args.setGatewayId(gatewayId);
+ args.setComputeResourceId(computeResourceId);
args.write(prot);
prot.writeMessageEnd();
}
@@ -15458,7 +15470,7 @@ public class RegistryService {
processMap.put("saveParsingTemplate", new saveParsingTemplate());
processMap.put("listAllParsingTemplates", new listAllParsingTemplates());
processMap.put("removeParsingTemplate", new removeParsingTemplate());
- processMap.put("isReportingAvailable", new isReportingAvailable());
+ processMap.put("isGatewayUsageReportingAvailable", new
isGatewayUsageReportingAvailable());
processMap.put("getGatewayReportingCommand", new
getGatewayReportingCommand());
processMap.put("addGatewayUsageReportingCommand", new
addGatewayUsageReportingCommand());
processMap.put("removeGatewayUsageReportingCommand", new
removeGatewayUsageReportingCommand());
@@ -20257,23 +20269,23 @@ public class RegistryService {
}
}
- public static class isReportingAvailable<I extends Iface> extends
org.apache.thrift.ProcessFunction<I, isReportingAvailable_args> {
- public isReportingAvailable() {
- super("isReportingAvailable");
+ public static class isGatewayUsageReportingAvailable<I extends Iface>
extends org.apache.thrift.ProcessFunction<I,
isGatewayUsageReportingAvailable_args> {
+ public isGatewayUsageReportingAvailable() {
+ super("isGatewayUsageReportingAvailable");
}
- public isReportingAvailable_args getEmptyArgsInstance() {
- return new isReportingAvailable_args();
+ public isGatewayUsageReportingAvailable_args getEmptyArgsInstance() {
+ return new isGatewayUsageReportingAvailable_args();
}
protected boolean isOneway() {
return false;
}
- public isReportingAvailable_result getResult(I iface,
isReportingAvailable_args args) throws org.apache.thrift.TException {
- isReportingAvailable_result result = new isReportingAvailable_result();
+ public isGatewayUsageReportingAvailable_result getResult(I iface,
isGatewayUsageReportingAvailable_args args) throws org.apache.thrift.TException
{
+ isGatewayUsageReportingAvailable_result result = new
isGatewayUsageReportingAvailable_result();
try {
- result.success = iface.isReportingAvailable(args.gatewayId);
+ result.success =
iface.isGatewayUsageReportingAvailable(args.gatewayId, args.computeResourceId);
result.setSuccessIsSet(true);
} catch
(org.apache.airavata.registry.api.exception.RegistryServiceException rse) {
result.rse = rse;
@@ -20298,7 +20310,7 @@ public class RegistryService {
public getGatewayReportingCommand_result getResult(I iface,
getGatewayReportingCommand_args args) throws org.apache.thrift.TException {
getGatewayReportingCommand_result result = new
getGatewayReportingCommand_result();
try {
- result.success = iface.getGatewayReportingCommand(args.gatewayId);
+ result.success = iface.getGatewayReportingCommand(args.gatewayId,
args.computeResourceId);
} catch
(org.apache.airavata.registry.api.exception.RegistryServiceException rse) {
result.rse = rse;
}
@@ -20346,7 +20358,7 @@ public class RegistryService {
public removeGatewayUsageReportingCommand_result getResult(I iface,
removeGatewayUsageReportingCommand_args args) throws
org.apache.thrift.TException {
removeGatewayUsageReportingCommand_result result = new
removeGatewayUsageReportingCommand_result();
try {
- iface.removeGatewayUsageReportingCommand(args.command);
+ iface.removeGatewayUsageReportingCommand(args.gatewayId,
args.computeResourceId);
} catch
(org.apache.airavata.registry.api.exception.RegistryServiceException rse) {
result.rse = rse;
}
@@ -20563,7 +20575,7 @@ public class RegistryService {
processMap.put("saveParsingTemplate", new saveParsingTemplate());
processMap.put("listAllParsingTemplates", new listAllParsingTemplates());
processMap.put("removeParsingTemplate", new removeParsingTemplate());
- processMap.put("isReportingAvailable", new isReportingAvailable());
+ processMap.put("isGatewayUsageReportingAvailable", new
isGatewayUsageReportingAvailable());
processMap.put("getGatewayReportingCommand", new
getGatewayReportingCommand());
processMap.put("addGatewayUsageReportingCommand", new
addGatewayUsageReportingCommand());
processMap.put("removeGatewayUsageReportingCommand", new
removeGatewayUsageReportingCommand());
@@ -33408,20 +33420,20 @@ public class RegistryService {
}
}
- public static class isReportingAvailable<I extends AsyncIface> extends
org.apache.thrift.AsyncProcessFunction<I, isReportingAvailable_args,
java.lang.Boolean> {
- public isReportingAvailable() {
- super("isReportingAvailable");
+ public static class isGatewayUsageReportingAvailable<I extends AsyncIface>
extends org.apache.thrift.AsyncProcessFunction<I,
isGatewayUsageReportingAvailable_args, java.lang.Boolean> {
+ public isGatewayUsageReportingAvailable() {
+ super("isGatewayUsageReportingAvailable");
}
- public isReportingAvailable_args getEmptyArgsInstance() {
- return new isReportingAvailable_args();
+ public isGatewayUsageReportingAvailable_args getEmptyArgsInstance() {
+ return new isGatewayUsageReportingAvailable_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>
getResultHandler(final
org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final
int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new
org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
- isReportingAvailable_result result = new
isReportingAvailable_result();
+ isGatewayUsageReportingAvailable_result result = new
isGatewayUsageReportingAvailable_result();
result.success = o;
result.setSuccessIsSet(true);
try {
@@ -33437,7 +33449,7 @@ public class RegistryService {
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
- isReportingAvailable_result result = new
isReportingAvailable_result();
+ isGatewayUsageReportingAvailable_result result = new
isGatewayUsageReportingAvailable_result();
if (e instanceof
org.apache.airavata.registry.api.exception.RegistryServiceException) {
result.rse =
(org.apache.airavata.registry.api.exception.RegistryServiceException) e;
result.setRseIsSet(true);
@@ -33469,8 +33481,8 @@ public class RegistryService {
return false;
}
- public void start(I iface, isReportingAvailable_args args,
org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler)
throws org.apache.thrift.TException {
- iface.isReportingAvailable(args.gatewayId,resultHandler);
+ public void start(I iface, isGatewayUsageReportingAvailable_args args,
org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler)
throws org.apache.thrift.TException {
+ iface.isGatewayUsageReportingAvailable(args.gatewayId,
args.computeResourceId,resultHandler);
}
}
@@ -33535,7 +33547,7 @@ public class RegistryService {
}
public void start(I iface, getGatewayReportingCommand_args args,
org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.GatewayUsageReportingCommand>
resultHandler) throws org.apache.thrift.TException {
- iface.getGatewayReportingCommand(args.gatewayId,resultHandler);
+ iface.getGatewayReportingCommand(args.gatewayId,
args.computeResourceId,resultHandler);
}
}
@@ -33663,7 +33675,7 @@ public class RegistryService {
}
public void start(I iface, removeGatewayUsageReportingCommand_args args,
org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws
org.apache.thrift.TException {
- iface.removeGatewayUsageReportingCommand(args.command,resultHandler);
+ iface.removeGatewayUsageReportingCommand(args.gatewayId,
args.computeResourceId,resultHandler);
}
}
@@ -213477,19 +213489,22 @@ public class RegistryService {
}
}
- public static class isReportingAvailable_args implements
org.apache.thrift.TBase<isReportingAvailable_args,
isReportingAvailable_args._Fields>, java.io.Serializable, Cloneable,
Comparable<isReportingAvailable_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new
org.apache.thrift.protocol.TStruct("isReportingAvailable_args");
+ public static class isGatewayUsageReportingAvailable_args implements
org.apache.thrift.TBase<isGatewayUsageReportingAvailable_args,
isGatewayUsageReportingAvailable_args._Fields>, java.io.Serializable,
Cloneable, Comparable<isGatewayUsageReportingAvailable_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new
org.apache.thrift.protocol.TStruct("isGatewayUsageReportingAvailable_args");
private static final org.apache.thrift.protocol.TField
GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId",
org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField
COMPUTE_RESOURCE_ID_FIELD_DESC = new
org.apache.thrift.protocol.TField("computeResourceId",
org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.scheme.SchemeFactory
STANDARD_SCHEME_FACTORY = new isReportingAvailable_argsStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory
TUPLE_SCHEME_FACTORY = new isReportingAvailable_argsTupleSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory
STANDARD_SCHEME_FACTORY = new
isGatewayUsageReportingAvailable_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory
TUPLE_SCHEME_FACTORY = new
isGatewayUsageReportingAvailable_argsTupleSchemeFactory();
public java.lang.String gatewayId; // required
+ public java.lang.String computeResourceId; // required
/** The set of fields this struct contains, along with convenience methods
for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- GATEWAY_ID((short)1, "gatewayId");
+ GATEWAY_ID((short)1, "gatewayId"),
+ COMPUTE_RESOURCE_ID((short)2, "computeResourceId");
private static final java.util.Map<java.lang.String, _Fields> byName =
new java.util.HashMap<java.lang.String, _Fields>();
@@ -213506,6 +213521,8 @@ public class RegistryService {
switch(fieldId) {
case 1: // GATEWAY_ID
return GATEWAY_ID;
+ case 2: // COMPUTE_RESOURCE_ID
+ return COMPUTE_RESOURCE_ID;
default:
return null;
}
@@ -213551,43 +213568,51 @@ public class RegistryService {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap
= new java.util.EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.GATEWAY_ID, new
org.apache.thrift.meta_data.FieldMetaData("gatewayId",
org.apache.thrift.TFieldRequirementType.REQUIRED,
new
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.COMPUTE_RESOURCE_ID, new
org.apache.thrift.meta_data.FieldMetaData("computeResourceId",
org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
-
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isReportingAvailable_args.class,
metaDataMap);
+
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isGatewayUsageReportingAvailable_args.class,
metaDataMap);
}
- public isReportingAvailable_args() {
+ public isGatewayUsageReportingAvailable_args() {
}
- public isReportingAvailable_args(
- java.lang.String gatewayId)
+ public isGatewayUsageReportingAvailable_args(
+ java.lang.String gatewayId,
+ java.lang.String computeResourceId)
{
this();
this.gatewayId = gatewayId;
+ this.computeResourceId = computeResourceId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
- public isReportingAvailable_args(isReportingAvailable_args other) {
+ public
isGatewayUsageReportingAvailable_args(isGatewayUsageReportingAvailable_args
other) {
if (other.isSetGatewayId()) {
this.gatewayId = other.gatewayId;
}
+ if (other.isSetComputeResourceId()) {
+ this.computeResourceId = other.computeResourceId;
+ }
}
- public isReportingAvailable_args deepCopy() {
- return new isReportingAvailable_args(this);
+ public isGatewayUsageReportingAvailable_args deepCopy() {
+ return new isGatewayUsageReportingAvailable_args(this);
}
@Override
public void clear() {
this.gatewayId = null;
+ this.computeResourceId = null;
}
public java.lang.String getGatewayId() {
return this.gatewayId;
}
- public isReportingAvailable_args setGatewayId(java.lang.String gatewayId) {
+ public isGatewayUsageReportingAvailable_args setGatewayId(java.lang.String
gatewayId) {
this.gatewayId = gatewayId;
return this;
}
@@ -213607,6 +213632,30 @@ public class RegistryService {
}
}
+ public java.lang.String getComputeResourceId() {
+ return this.computeResourceId;
+ }
+
+ public isGatewayUsageReportingAvailable_args
setComputeResourceId(java.lang.String computeResourceId) {
+ this.computeResourceId = computeResourceId;
+ return this;
+ }
+
+ public void unsetComputeResourceId() {
+ this.computeResourceId = null;
+ }
+
+ /** Returns true if field computeResourceId is set (has been assigned a
value) and false otherwise */
+ public boolean isSetComputeResourceId() {
+ return this.computeResourceId != null;
+ }
+
+ public void setComputeResourceIdIsSet(boolean value) {
+ if (!value) {
+ this.computeResourceId = null;
+ }
+ }
+
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case GATEWAY_ID:
@@ -213617,6 +213666,14 @@ public class RegistryService {
}
break;
+ case COMPUTE_RESOURCE_ID:
+ if (value == null) {
+ unsetComputeResourceId();
+ } else {
+ setComputeResourceId((java.lang.String)value);
+ }
+ break;
+
}
}
@@ -213625,6 +213682,9 @@ public class RegistryService {
case GATEWAY_ID:
return getGatewayId();
+ case COMPUTE_RESOURCE_ID:
+ return getComputeResourceId();
+
}
throw new java.lang.IllegalStateException();
}
@@ -213638,6 +213698,8 @@ public class RegistryService {
switch (field) {
case GATEWAY_ID:
return isSetGatewayId();
+ case COMPUTE_RESOURCE_ID:
+ return isSetComputeResourceId();
}
throw new java.lang.IllegalStateException();
}
@@ -213646,12 +213708,12 @@ public class RegistryService {
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
- if (that instanceof isReportingAvailable_args)
- return this.equals((isReportingAvailable_args)that);
+ if (that instanceof isGatewayUsageReportingAvailable_args)
+ return this.equals((isGatewayUsageReportingAvailable_args)that);
return false;
}
- public boolean equals(isReportingAvailable_args that) {
+ public boolean equals(isGatewayUsageReportingAvailable_args that) {
if (that == null)
return false;
if (this == that)
@@ -213666,6 +213728,15 @@ public class RegistryService {
return false;
}
+ boolean this_present_computeResourceId = true &&
this.isSetComputeResourceId();
+ boolean that_present_computeResourceId = true &&
that.isSetComputeResourceId();
+ if (this_present_computeResourceId || that_present_computeResourceId) {
+ if (!(this_present_computeResourceId &&
that_present_computeResourceId))
+ return false;
+ if (!this.computeResourceId.equals(that.computeResourceId))
+ return false;
+ }
+
return true;
}
@@ -213677,11 +213748,15 @@ public class RegistryService {
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
+ hashCode = hashCode * 8191 + ((isSetComputeResourceId()) ? 131071 :
524287);
+ if (isSetComputeResourceId())
+ hashCode = hashCode * 8191 + computeResourceId.hashCode();
+
return hashCode;
}
@Override
- public int compareTo(isReportingAvailable_args other) {
+ public int compareTo(isGatewayUsageReportingAvailable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
@@ -213698,6 +213773,16 @@ public class RegistryService {
return lastComparison;
}
}
+ lastComparison =
java.lang.Boolean.valueOf(isSetComputeResourceId()).compareTo(other.isSetComputeResourceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputeResourceId()) {
+ lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.computeResourceId,
other.computeResourceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -213715,7 +213800,7 @@ public class RegistryService {
@Override
public java.lang.String toString() {
- java.lang.StringBuilder sb = new
java.lang.StringBuilder("isReportingAvailable_args(");
+ java.lang.StringBuilder sb = new
java.lang.StringBuilder("isGatewayUsageReportingAvailable_args(");
boolean first = true;
sb.append("gatewayId:");
@@ -213725,6 +213810,14 @@ public class RegistryService {
sb.append(this.gatewayId);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("computeResourceId:");
+ if (this.computeResourceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computeResourceId);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -213734,6 +213827,9 @@ public class RegistryService {
if (gatewayId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required
field 'gatewayId' was not present! Struct: " + toString());
}
+ if (computeResourceId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required
field 'computeResourceId' was not present! Struct: " + toString());
+ }
// check for sub-struct validity
}
@@ -213753,15 +213849,15 @@ public class RegistryService {
}
}
- private static class isReportingAvailable_argsStandardSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
- public isReportingAvailable_argsStandardScheme getScheme() {
- return new isReportingAvailable_argsStandardScheme();
+ private static class
isGatewayUsageReportingAvailable_argsStandardSchemeFactory implements
org.apache.thrift.scheme.SchemeFactory {
+ public isGatewayUsageReportingAvailable_argsStandardScheme getScheme() {
+ return new isGatewayUsageReportingAvailable_argsStandardScheme();
}
}
- private static class isReportingAvailable_argsStandardScheme extends
org.apache.thrift.scheme.StandardScheme<isReportingAvailable_args> {
+ private static class isGatewayUsageReportingAvailable_argsStandardScheme
extends
org.apache.thrift.scheme.StandardScheme<isGatewayUsageReportingAvailable_args> {
- public void read(org.apache.thrift.protocol.TProtocol iprot,
isReportingAvailable_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot,
isGatewayUsageReportingAvailable_args struct) throws
org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -213779,6 +213875,14 @@ public class RegistryService {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
}
break;
+ case 2: // COMPUTE_RESOURCE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING)
{
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
}
@@ -213790,7 +213894,7 @@ public class RegistryService {
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot,
isReportingAvailable_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot,
isGatewayUsageReportingAvailable_args struct) throws
org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -213799,31 +213903,39 @@ public class RegistryService {
oprot.writeString(struct.gatewayId);
oprot.writeFieldEnd();
}
+ if (struct.computeResourceId != null) {
+ oprot.writeFieldBegin(COMPUTE_RESOURCE_ID_FIELD_DESC);
+ oprot.writeString(struct.computeResourceId);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
- private static class isReportingAvailable_argsTupleSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
- public isReportingAvailable_argsTupleScheme getScheme() {
- return new isReportingAvailable_argsTupleScheme();
+ private static class
isGatewayUsageReportingAvailable_argsTupleSchemeFactory implements
org.apache.thrift.scheme.SchemeFactory {
+ public isGatewayUsageReportingAvailable_argsTupleScheme getScheme() {
+ return new isGatewayUsageReportingAvailable_argsTupleScheme();
}
}
- private static class isReportingAvailable_argsTupleScheme extends
org.apache.thrift.scheme.TupleScheme<isReportingAvailable_args> {
+ private static class isGatewayUsageReportingAvailable_argsTupleScheme
extends
org.apache.thrift.scheme.TupleScheme<isGatewayUsageReportingAvailable_args> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot,
isReportingAvailable_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot,
isGatewayUsageReportingAvailable_args struct) throws
org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.gatewayId);
+ oprot.writeString(struct.computeResourceId);
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot,
isReportingAvailable_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot,
isGatewayUsageReportingAvailable_args struct) throws
org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
}
}
@@ -213832,14 +213944,14 @@ public class RegistryService {
}
}
- public static class isReportingAvailable_result implements
org.apache.thrift.TBase<isReportingAvailable_result,
isReportingAvailable_result._Fields>, java.io.Serializable, Cloneable,
Comparable<isReportingAvailable_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new
org.apache.thrift.protocol.TStruct("isReportingAvailable_result");
+ public static class isGatewayUsageReportingAvailable_result implements
org.apache.thrift.TBase<isGatewayUsageReportingAvailable_result,
isGatewayUsageReportingAvailable_result._Fields>, java.io.Serializable,
Cloneable, Comparable<isGatewayUsageReportingAvailable_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new
org.apache.thrift.protocol.TStruct("isGatewayUsageReportingAvailable_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC
= new org.apache.thrift.protocol.TField("success",
org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField RSE_FIELD_DESC =
new org.apache.thrift.protocol.TField("rse",
org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final org.apache.thrift.scheme.SchemeFactory
STANDARD_SCHEME_FACTORY = new
isReportingAvailable_resultStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory
TUPLE_SCHEME_FACTORY = new isReportingAvailable_resultTupleSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory
STANDARD_SCHEME_FACTORY = new
isGatewayUsageReportingAvailable_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory
TUPLE_SCHEME_FACTORY = new
isGatewayUsageReportingAvailable_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.registry.api.exception.RegistryServiceException
rse; // required
@@ -213916,13 +214028,13 @@ public class RegistryService {
tmpMap.put(_Fields.RSE, new
org.apache.thrift.meta_data.FieldMetaData("rse",
org.apache.thrift.TFieldRequirementType.DEFAULT,
new
org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
org.apache.airavata.registry.api.exception.RegistryServiceException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
-
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isReportingAvailable_result.class,
metaDataMap);
+
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isGatewayUsageReportingAvailable_result.class,
metaDataMap);
}
- public isReportingAvailable_result() {
+ public isGatewayUsageReportingAvailable_result() {
}
- public isReportingAvailable_result(
+ public isGatewayUsageReportingAvailable_result(
boolean success,
org.apache.airavata.registry.api.exception.RegistryServiceException rse)
{
@@ -213935,7 +214047,7 @@ public class RegistryService {
/**
* Performs a deep copy on <i>other</i>.
*/
- public isReportingAvailable_result(isReportingAvailable_result other) {
+ public
isGatewayUsageReportingAvailable_result(isGatewayUsageReportingAvailable_result
other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetRse()) {
@@ -213943,8 +214055,8 @@ public class RegistryService {
}
}
- public isReportingAvailable_result deepCopy() {
- return new isReportingAvailable_result(this);
+ public isGatewayUsageReportingAvailable_result deepCopy() {
+ return new isGatewayUsageReportingAvailable_result(this);
}
@Override
@@ -213958,7 +214070,7 @@ public class RegistryService {
return this.success;
}
- public isReportingAvailable_result setSuccess(boolean success) {
+ public isGatewayUsageReportingAvailable_result setSuccess(boolean success)
{
this.success = success;
setSuccessIsSet(true);
return this;
@@ -213981,7 +214093,7 @@ public class RegistryService {
return this.rse;
}
- public isReportingAvailable_result
setRse(org.apache.airavata.registry.api.exception.RegistryServiceException rse)
{
+ public isGatewayUsageReportingAvailable_result
setRse(org.apache.airavata.registry.api.exception.RegistryServiceException rse)
{
this.rse = rse;
return this;
}
@@ -214053,12 +214165,12 @@ public class RegistryService {
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
- if (that instanceof isReportingAvailable_result)
- return this.equals((isReportingAvailable_result)that);
+ if (that instanceof isGatewayUsageReportingAvailable_result)
+ return this.equals((isGatewayUsageReportingAvailable_result)that);
return false;
}
- public boolean equals(isReportingAvailable_result that) {
+ public boolean equals(isGatewayUsageReportingAvailable_result that) {
if (that == null)
return false;
if (this == that)
@@ -214099,7 +214211,7 @@ public class RegistryService {
}
@Override
- public int compareTo(isReportingAvailable_result other) {
+ public int compareTo(isGatewayUsageReportingAvailable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
@@ -214143,7 +214255,7 @@ public class RegistryService {
@Override
public java.lang.String toString() {
- java.lang.StringBuilder sb = new
java.lang.StringBuilder("isReportingAvailable_result(");
+ java.lang.StringBuilder sb = new
java.lang.StringBuilder("isGatewayUsageReportingAvailable_result(");
boolean first = true;
sb.append("success:");
@@ -214184,15 +214296,15 @@ public class RegistryService {
}
}
- private static class isReportingAvailable_resultStandardSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
- public isReportingAvailable_resultStandardScheme getScheme() {
- return new isReportingAvailable_resultStandardScheme();
+ private static class
isGatewayUsageReportingAvailable_resultStandardSchemeFactory implements
org.apache.thrift.scheme.SchemeFactory {
+ public isGatewayUsageReportingAvailable_resultStandardScheme getScheme()
{
+ return new isGatewayUsageReportingAvailable_resultStandardScheme();
}
}
- private static class isReportingAvailable_resultStandardScheme extends
org.apache.thrift.scheme.StandardScheme<isReportingAvailable_result> {
+ private static class isGatewayUsageReportingAvailable_resultStandardScheme
extends
org.apache.thrift.scheme.StandardScheme<isGatewayUsageReportingAvailable_result>
{
- public void read(org.apache.thrift.protocol.TProtocol iprot,
isReportingAvailable_result struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot,
isGatewayUsageReportingAvailable_result struct) throws
org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -214230,7 +214342,7 @@ public class RegistryService {
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot,
isReportingAvailable_result struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot,
isGatewayUsageReportingAvailable_result struct) throws
org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -214250,16 +214362,16 @@ public class RegistryService {
}
- private static class isReportingAvailable_resultTupleSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
- public isReportingAvailable_resultTupleScheme getScheme() {
- return new isReportingAvailable_resultTupleScheme();
+ private static class
isGatewayUsageReportingAvailable_resultTupleSchemeFactory implements
org.apache.thrift.scheme.SchemeFactory {
+ public isGatewayUsageReportingAvailable_resultTupleScheme getScheme() {
+ return new isGatewayUsageReportingAvailable_resultTupleScheme();
}
}
- private static class isReportingAvailable_resultTupleScheme extends
org.apache.thrift.scheme.TupleScheme<isReportingAvailable_result> {
+ private static class isGatewayUsageReportingAvailable_resultTupleScheme
extends
org.apache.thrift.scheme.TupleScheme<isGatewayUsageReportingAvailable_result> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot,
isReportingAvailable_result struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot,
isGatewayUsageReportingAvailable_result struct) throws
org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
@@ -214278,7 +214390,7 @@ public class RegistryService {
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot,
isReportingAvailable_result struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot,
isGatewayUsageReportingAvailable_result struct) throws
org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
@@ -214302,15 +214414,18 @@ public class RegistryService {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new
org.apache.thrift.protocol.TStruct("getGatewayReportingCommand_args");
private static final org.apache.thrift.protocol.TField
GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId",
org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField
COMPUTE_RESOURCE_ID_FIELD_DESC = new
org.apache.thrift.protocol.TField("computeResourceId",
org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory
STANDARD_SCHEME_FACTORY = new
getGatewayReportingCommand_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory
TUPLE_SCHEME_FACTORY = new getGatewayReportingCommand_argsTupleSchemeFactory();
public java.lang.String gatewayId; // required
+ public java.lang.String computeResourceId; // required
/** The set of fields this struct contains, along with convenience methods
for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- GATEWAY_ID((short)1, "gatewayId");
+ GATEWAY_ID((short)1, "gatewayId"),
+ COMPUTE_RESOURCE_ID((short)2, "computeResourceId");
private static final java.util.Map<java.lang.String, _Fields> byName =
new java.util.HashMap<java.lang.String, _Fields>();
@@ -214327,6 +214442,8 @@ public class RegistryService {
switch(fieldId) {
case 1: // GATEWAY_ID
return GATEWAY_ID;
+ case 2: // COMPUTE_RESOURCE_ID
+ return COMPUTE_RESOURCE_ID;
default:
return null;
}
@@ -214372,6 +214489,8 @@ public class RegistryService {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap
= new java.util.EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.GATEWAY_ID, new
org.apache.thrift.meta_data.FieldMetaData("gatewayId",
org.apache.thrift.TFieldRequirementType.REQUIRED,
new
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.COMPUTE_RESOURCE_ID, new
org.apache.thrift.meta_data.FieldMetaData("computeResourceId",
org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGatewayReportingCommand_args.class,
metaDataMap);
}
@@ -214380,10 +214499,12 @@ public class RegistryService {
}
public getGatewayReportingCommand_args(
- java.lang.String gatewayId)
+ java.lang.String gatewayId,
+ java.lang.String computeResourceId)
{
this();
this.gatewayId = gatewayId;
+ this.computeResourceId = computeResourceId;
}
/**
@@ -214393,6 +214514,9 @@ public class RegistryService {
if (other.isSetGatewayId()) {
this.gatewayId = other.gatewayId;
}
+ if (other.isSetComputeResourceId()) {
+ this.computeResourceId = other.computeResourceId;
+ }
}
public getGatewayReportingCommand_args deepCopy() {
@@ -214402,6 +214526,7 @@ public class RegistryService {
@Override
public void clear() {
this.gatewayId = null;
+ this.computeResourceId = null;
}
public java.lang.String getGatewayId() {
@@ -214428,6 +214553,30 @@ public class RegistryService {
}
}
+ public java.lang.String getComputeResourceId() {
+ return this.computeResourceId;
+ }
+
+ public getGatewayReportingCommand_args
setComputeResourceId(java.lang.String computeResourceId) {
+ this.computeResourceId = computeResourceId;
+ return this;
+ }
+
+ public void unsetComputeResourceId() {
+ this.computeResourceId = null;
+ }
+
+ /** Returns true if field computeResourceId is set (has been assigned a
value) and false otherwise */
+ public boolean isSetComputeResourceId() {
+ return this.computeResourceId != null;
+ }
+
+ public void setComputeResourceIdIsSet(boolean value) {
+ if (!value) {
+ this.computeResourceId = null;
+ }
+ }
+
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case GATEWAY_ID:
@@ -214438,6 +214587,14 @@ public class RegistryService {
}
break;
+ case COMPUTE_RESOURCE_ID:
+ if (value == null) {
+ unsetComputeResourceId();
+ } else {
+ setComputeResourceId((java.lang.String)value);
+ }
+ break;
+
}
}
@@ -214446,6 +214603,9 @@ public class RegistryService {
case GATEWAY_ID:
return getGatewayId();
+ case COMPUTE_RESOURCE_ID:
+ return getComputeResourceId();
+
}
throw new java.lang.IllegalStateException();
}
@@ -214459,6 +214619,8 @@ public class RegistryService {
switch (field) {
case GATEWAY_ID:
return isSetGatewayId();
+ case COMPUTE_RESOURCE_ID:
+ return isSetComputeResourceId();
}
throw new java.lang.IllegalStateException();
}
@@ -214487,6 +214649,15 @@ public class RegistryService {
return false;
}
+ boolean this_present_computeResourceId = true &&
this.isSetComputeResourceId();
+ boolean that_present_computeResourceId = true &&
that.isSetComputeResourceId();
+ if (this_present_computeResourceId || that_present_computeResourceId) {
+ if (!(this_present_computeResourceId &&
that_present_computeResourceId))
+ return false;
+ if (!this.computeResourceId.equals(that.computeResourceId))
+ return false;
+ }
+
return true;
}
@@ -214498,6 +214669,10 @@ public class RegistryService {
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
+ hashCode = hashCode * 8191 + ((isSetComputeResourceId()) ? 131071 :
524287);
+ if (isSetComputeResourceId())
+ hashCode = hashCode * 8191 + computeResourceId.hashCode();
+
return hashCode;
}
@@ -214519,6 +214694,16 @@ public class RegistryService {
return lastComparison;
}
}
+ lastComparison =
java.lang.Boolean.valueOf(isSetComputeResourceId()).compareTo(other.isSetComputeResourceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputeResourceId()) {
+ lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.computeResourceId,
other.computeResourceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -214546,6 +214731,14 @@ public class RegistryService {
sb.append(this.gatewayId);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("computeResourceId:");
+ if (this.computeResourceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computeResourceId);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -214555,6 +214748,9 @@ public class RegistryService {
if (gatewayId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required
field 'gatewayId' was not present! Struct: " + toString());
}
+ if (computeResourceId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required
field 'computeResourceId' was not present! Struct: " + toString());
+ }
// check for sub-struct validity
}
@@ -214600,6 +214796,14 @@ public class RegistryService {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
}
break;
+ case 2: // COMPUTE_RESOURCE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING)
{
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
}
@@ -214620,6 +214824,11 @@ public class RegistryService {
oprot.writeString(struct.gatewayId);
oprot.writeFieldEnd();
}
+ if (struct.computeResourceId != null) {
+ oprot.writeFieldBegin(COMPUTE_RESOURCE_ID_FIELD_DESC);
+ oprot.writeString(struct.computeResourceId);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -214638,6 +214847,7 @@ public class RegistryService {
public void write(org.apache.thrift.protocol.TProtocol prot,
getGatewayReportingCommand_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.gatewayId);
+ oprot.writeString(struct.computeResourceId);
}
@Override
@@ -214645,6 +214855,8 @@ public class RegistryService {
org.apache.thrift.protocol.TTupleProtocol iprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
}
}
@@ -215860,16 +216072,19 @@ public class RegistryService {
public static class removeGatewayUsageReportingCommand_args implements
org.apache.thrift.TBase<removeGatewayUsageReportingCommand_args,
removeGatewayUsageReportingCommand_args._Fields>, java.io.Serializable,
Cloneable, Comparable<removeGatewayUsageReportingCommand_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new
org.apache.thrift.protocol.TStruct("removeGatewayUsageReportingCommand_args");
- private static final org.apache.thrift.protocol.TField COMMAND_FIELD_DESC
= new org.apache.thrift.protocol.TField("command",
org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField
GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId",
org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField
COMPUTE_RESOURCE_ID_FIELD_DESC = new
org.apache.thrift.protocol.TField("computeResourceId",
org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory
STANDARD_SCHEME_FACTORY = new
removeGatewayUsageReportingCommand_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory
TUPLE_SCHEME_FACTORY = new
removeGatewayUsageReportingCommand_argsTupleSchemeFactory();
- public org.apache.airavata.model.workspace.GatewayUsageReportingCommand
command; // required
+ public java.lang.String gatewayId; // required
+ public java.lang.String computeResourceId; // required
/** The set of fields this struct contains, along with convenience methods
for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- COMMAND((short)1, "command");
+ GATEWAY_ID((short)1, "gatewayId"),
+ COMPUTE_RESOURCE_ID((short)2, "computeResourceId");
private static final java.util.Map<java.lang.String, _Fields> byName =
new java.util.HashMap<java.lang.String, _Fields>();
@@ -215884,8 +216099,10 @@ public class RegistryService {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // COMMAND
- return COMMAND;
+ case 1: // GATEWAY_ID
+ return GATEWAY_ID;
+ case 2: // COMPUTE_RESOURCE_ID
+ return COMPUTE_RESOURCE_ID;
default:
return null;
}
@@ -215929,8 +216146,10 @@ public class RegistryService {
public static final java.util.Map<_Fields,
org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap
= new java.util.EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.COMMAND, new
org.apache.thrift.meta_data.FieldMetaData("command",
org.apache.thrift.TFieldRequirementType.DEFAULT,
- new
org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
org.apache.airavata.model.workspace.GatewayUsageReportingCommand.class)));
+ tmpMap.put(_Fields.GATEWAY_ID, new
org.apache.thrift.meta_data.FieldMetaData("gatewayId",
org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.COMPUTE_RESOURCE_ID, new
org.apache.thrift.meta_data.FieldMetaData("computeResourceId",
org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeGatewayUsageReportingCommand_args.class,
metaDataMap);
}
@@ -215939,18 +216158,23 @@ public class RegistryService {
}
public removeGatewayUsageReportingCommand_args(
- org.apache.airavata.model.workspace.GatewayUsageReportingCommand command)
+ java.lang.String gatewayId,
+ java.lang.String computeResourceId)
{
this();
- this.command = command;
+ this.gatewayId = gatewayId;
+ this.computeResourceId = computeResourceId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public
removeGatewayUsageReportingCommand_args(removeGatewayUsageReportingCommand_args
other) {
- if (other.isSetCommand()) {
- this.command = new
org.apache.airavata.model.workspace.GatewayUsageReportingCommand(other.command);
+ if (other.isSetGatewayId()) {
+ this.gatewayId = other.gatewayId;
+ }
+ if (other.isSetComputeResourceId()) {
+ this.computeResourceId = other.computeResourceId;
}
}
@@ -215960,40 +216184,73 @@ public class RegistryService {
@Override
public void clear() {
- this.command = null;
+ this.gatewayId = null;
+ this.computeResourceId = null;
}
- public org.apache.airavata.model.workspace.GatewayUsageReportingCommand
getCommand() {
- return this.command;
+ public java.lang.String getGatewayId() {
+ return this.gatewayId;
}
- public removeGatewayUsageReportingCommand_args
setCommand(org.apache.airavata.model.workspace.GatewayUsageReportingCommand
command) {
- this.command = command;
+ public removeGatewayUsageReportingCommand_args
setGatewayId(java.lang.String gatewayId) {
+ this.gatewayId = gatewayId;
return this;
}
- public void unsetCommand() {
- this.command = null;
+ public void unsetGatewayId() {
+ this.gatewayId = null;
}
- /** Returns true if field command is set (has been assigned a value) and
false otherwise */
- public boolean isSetCommand() {
- return this.command != null;
+ /** Returns true if field gatewayId is set (has been assigned a value) and
false otherwise */
+ public boolean isSetGatewayId() {
+ return this.gatewayId != null;
}
- public void setCommandIsSet(boolean value) {
+ public void setGatewayIdIsSet(boolean value) {
if (!value) {
- this.command = null;
+ this.gatewayId = null;
+ }
+ }
+
+ public java.lang.String getComputeResourceId() {
+ return this.computeResourceId;
+ }
+
+ public removeGatewayUsageReportingCommand_args
setComputeResourceId(java.lang.String computeResourceId) {
+ this.computeResourceId = computeResourceId;
+ return this;
+ }
+
+ public void unsetComputeResourceId() {
+ this.computeResourceId = null;
+ }
+
+ /** Returns true if field computeResourceId is set (has been assigned a
value) and false otherwise */
+ public boolean isSetComputeResourceId() {
+ return this.computeResourceId != null;
+ }
+
+ public void setComputeResourceIdIsSet(boolean value) {
+ if (!value) {
+ this.computeResourceId = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
- case COMMAND:
+ case GATEWAY_ID:
if (value == null) {
- unsetCommand();
+ unsetGatewayId();
} else {
-
setCommand((org.apache.airavata.model.workspace.GatewayUsageReportingCommand)value);
+ setGatewayId((java.lang.String)value);
+ }
+ break;
+
+ case COMPUTE_RESOURCE_ID:
+ if (value == null) {
+ unsetComputeResourceId();
+ } else {
+ setComputeResourceId((java.lang.String)value);
}
break;
@@ -216002,8 +216259,11 @@ public class RegistryService {
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case COMMAND:
- return getCommand();
+ case GATEWAY_ID:
+ return getGatewayId();
+
+ case COMPUTE_RESOURCE_ID:
+ return getComputeResourceId();
}
throw new java.lang.IllegalStateException();
@@ -216016,8 +216276,10 @@ public class RegistryService {
}
switch (field) {
- case COMMAND:
- return isSetCommand();
+ case GATEWAY_ID:
+ return isSetGatewayId();
+ case COMPUTE_RESOURCE_ID:
+ return isSetComputeResourceId();
}
throw new java.lang.IllegalStateException();
}
@@ -216037,12 +216299,21 @@ public class RegistryService {
if (this == that)
return true;
- boolean this_present_command = true && this.isSetCommand();
- boolean that_present_command = true && that.isSetCommand();
- if (this_present_command || that_present_command) {
- if (!(this_present_command && that_present_command))
+ boolean this_present_gatewayId = true && this.isSetGatewayId();
+ boolean that_present_gatewayId = true && that.isSetGatewayId();
+ if (this_present_gatewayId || that_present_gatewayId) {
+ if (!(this_present_gatewayId && that_present_gatewayId))
return false;
- if (!this.command.equals(that.command))
+ if (!this.gatewayId.equals(that.gatewayId))
+ return false;
+ }
+
+ boolean this_present_computeResourceId = true &&
this.isSetComputeResourceId();
+ boolean that_present_computeResourceId = true &&
that.isSetComputeResourceId();
+ if (this_present_computeResourceId || that_present_computeResourceId) {
+ if (!(this_present_computeResourceId &&
that_present_computeResourceId))
+ return false;
+ if (!this.computeResourceId.equals(that.computeResourceId))
return false;
}
@@ -216053,9 +216324,13 @@ public class RegistryService {
public int hashCode() {
int hashCode = 1;
- hashCode = hashCode * 8191 + ((isSetCommand()) ? 131071 : 524287);
- if (isSetCommand())
- hashCode = hashCode * 8191 + command.hashCode();
+ hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
+ if (isSetGatewayId())
+ hashCode = hashCode * 8191 + gatewayId.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetComputeResourceId()) ? 131071 :
524287);
+ if (isSetComputeResourceId())
+ hashCode = hashCode * 8191 + computeResourceId.hashCode();
return hashCode;
}
@@ -216068,12 +216343,22 @@ public class RegistryService {
int lastComparison = 0;
- lastComparison =
java.lang.Boolean.valueOf(isSetCommand()).compareTo(other.isSetCommand());
+ lastComparison =
java.lang.Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetCommand()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.command,
other.command);
+ if (isSetGatewayId()) {
+ lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison =
java.lang.Boolean.valueOf(isSetComputeResourceId()).compareTo(other.isSetComputeResourceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputeResourceId()) {
+ lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.computeResourceId,
other.computeResourceId);
if (lastComparison != 0) {
return lastComparison;
}
@@ -216098,11 +216383,19 @@ public class RegistryService {
java.lang.StringBuilder sb = new
java.lang.StringBuilder("removeGatewayUsageReportingCommand_args(");
boolean first = true;
- sb.append("command:");
- if (this.command == null) {
+ sb.append("gatewayId:");
+ if (this.gatewayId == null) {
sb.append("null");
} else {
- sb.append(this.command);
+ sb.append(this.gatewayId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("computeResourceId:");
+ if (this.computeResourceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computeResourceId);
}
first = false;
sb.append(")");
@@ -216111,10 +216404,13 @@ public class RegistryService {
public void validate() throws org.apache.thrift.TException {
// check for required fields
- // check for sub-struct validity
- if (command != null) {
- command.validate();
+ if (gatewayId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required
field 'gatewayId' was not present! Struct: " + toString());
+ }
+ if (computeResourceId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required
field 'computeResourceId' was not present! Struct: " + toString());
}
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws
java.io.IOException {
@@ -216151,11 +216447,18 @@ public class RegistryService {
break;
}
switch (schemeField.id) {
- case 1: // COMMAND
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT)
{
- struct.command = new
org.apache.airavata.model.workspace.GatewayUsageReportingCommand();
- struct.command.read(iprot);
- struct.setCommandIsSet(true);
+ case 1: // GATEWAY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING)
{
+ struct.gatewayId = iprot.readString();
+ struct.setGatewayIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
+ }
+ break;
+ case 2: // COMPUTE_RESOURCE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING)
{
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
}
@@ -216175,9 +216478,14 @@ public class RegistryService {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.command != null) {
- oprot.writeFieldBegin(COMMAND_FIELD_DESC);
- struct.command.write(oprot);
+ if (struct.gatewayId != null) {
+ oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+ oprot.writeString(struct.gatewayId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.computeResourceId != null) {
+ oprot.writeFieldBegin(COMPUTE_RESOURCE_ID_FIELD_DESC);
+ oprot.writeString(struct.computeResourceId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -216197,25 +216505,17 @@ public class RegistryService {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot,
removeGatewayUsageReportingCommand_args struct) throws
org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetCommand()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetCommand()) {
- struct.command.write(oprot);
- }
+ oprot.writeString(struct.gatewayId);
+ oprot.writeString(struct.computeResourceId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot,
removeGatewayUsageReportingCommand_args struct) throws
org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.command = new
org.apache.airavata.model.workspace.GatewayUsageReportingCommand();
- struct.command.read(iprot);
- struct.setCommandIsSet(true);
- }
+ struct.gatewayId = iprot.readString();
+ struct.setGatewayIdIsSet(true);
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
}
}
diff --git a/thrift-interface-descriptions/component-cpis/registry-api.thrift
b/thrift-interface-descriptions/component-cpis/registry-api.thrift
index dc4fac5..1694a1d 100644
--- a/thrift-interface-descriptions/component-cpis/registry-api.thrift
+++ b/thrift-interface-descriptions/component-cpis/registry-api.thrift
@@ -2678,11 +2678,12 @@ service RegistryService extends base_api.BaseAPI {
void removeParsingTemplate(1: required string templateId, 2: required
string gatewayId)
throws (1: registry_api_errors.RegistryServiceException rse);
- bool isReportingAvailable(1: required string gatewayId) throws (1:
registry_api_errors.RegistryServiceException rse);
- workspace_model.GatewayUsageReportingCommand getGatewayReportingCommand(1:
required string gatewayId)
+ bool isGatewayUsageReportingAvailable(1: required string gatewayId, 2:
required string computeResourceId)
+ throws (1: registry_api_errors.RegistryServiceException rse);
+ workspace_model.GatewayUsageReportingCommand getGatewayReportingCommand(1:
required string gatewayId, 2: required string computeResourceId)
throws (1: registry_api_errors.RegistryServiceException rse);
void addGatewayUsageReportingCommand(1:
workspace_model.GatewayUsageReportingCommand command)
throws (1: registry_api_errors.RegistryServiceException rse);
- void removeGatewayUsageReportingCommand(1:
workspace_model.GatewayUsageReportingCommand command)
+ void removeGatewayUsageReportingCommand(1: required string gatewayId, 2:
required string computeResourceId)
throws (1: registry_api_errors.RegistryServiceException rse);
}
diff --git
a/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift
b/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift
index 1f202fd..97a3d57 100644
---
a/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift
+++
b/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift
@@ -96,7 +96,8 @@ struct Gateway {
struct GatewayUsageReportingCommand {
1: required string gatewayId,
- 2: required string command
+ 2: required string computeResourceId,
+ 3: required string command
}
enum NotificationPriority {