Actionize the EPP endpoints.

This introduces Actions and Dagger up until FlowRunner. The changes
to the servlets are relatively simple, but the required changes to
the tests, as well as to auxillary EPP endpoints (such as the http
check api and the load test servlet) were vast. I've added some
comments in critique to make the review easier that don't really
make sense as in-code comments for the future.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124593546
This commit is contained in:
Corey Goldfeder 2016-06-10 13:44:06 -07:00 committed by Justine Tunney
parent 6ba1d5e6df
commit 0ce293325c
63 changed files with 1911 additions and 1630 deletions

View file

@ -15,12 +15,17 @@
package google.registry.monitoring.whitebox;
import com.google.api.services.bigquery.model.TableFieldSchema;
import com.google.apphosting.api.ApiProxy;
import com.google.common.collect.ImmutableList;
import google.registry.bigquery.BigqueryUtils.FieldType;
import google.registry.model.eppoutput.Result.Code;
import google.registry.request.RequestScope;
import javax.inject.Inject;
/** The EPP Metrics collector. See {@link Metrics}. */
@RequestScope
public class EppMetrics extends Metrics {
static final String EPPMETRICS_TABLE_ID = "eppMetrics";
@ -37,9 +42,14 @@ public class EppMetrics extends Metrics {
new TableFieldSchema().setName("eppStatus").setType(FieldType.INTEGER.name()),
new TableFieldSchema().setName("attempts").setType(FieldType.INTEGER.name()));
@Inject
public EppMetrics() {
setTableId(EPPMETRICS_TABLE_ID);
fields.put("attempts", 0);
fields.put(
"requestId",
ApiProxy.getCurrentEnvironment().getAttributes()
.get("com.google.appengine.runtime.request_log_id").toString());
}
public void setCommandName(String name) {
@ -58,10 +68,6 @@ public class EppMetrics extends Metrics {
fields.put("eppTarget", eppTarget);
}
public void setRequestId(String requestId) {
fields.put("requestId", requestId);
}
public void setEppStatus(Code status) {
fields.put("eppStatus", String.valueOf(status.code));
}