mirror of
https://github.com/google/nomulus.git
synced 2025-07-11 21:48:18 +02:00
Add the App Engine service used in the Action definition
Our goal is to be able to address every Action by looking at the class itself, and to make it clearer at a glance what you need to access the Action's endpoint Currently, we can know from the @Action annotation: - the endpoint path - the Method needed - the authentication level needed This CL adds the service where the Action is hosted, which also translates to the URL. NOTE - currently we don't have any Action hosted on multiple services. I don't think we will ever need it (since they do the same thing no matter which service they are on, so why host it twice?), but if we do we'll have to update the code to allow it. The next step after this is to make sure all the @Parameters are defined on the Action itself, and then we will be able to craft access to the endpoint programatically (or at least verify at run-time we crafted a correct URL) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=229375735
This commit is contained in:
parent
98f11decb9
commit
a4f85c33c0
103 changed files with 555 additions and 385 deletions
|
@ -49,14 +49,16 @@ import org.joda.time.DateTime;
|
|||
* This bucket is special because a separate script will rsync it to the third party escrow provider
|
||||
* SFTP server. This is why the internal staging files are stored in the separate RDE bucket.
|
||||
*
|
||||
* @see <a href="http://newgtlds.icann.org/en/applicants/agb/agreement-approved-09jan14-en.htm">Registry Agreement</a>
|
||||
* @see <a
|
||||
* href="http://newgtlds.icann.org/en/applicants/agb/agreement-approved-09jan14-en.htm">Registry
|
||||
* Agreement</a>
|
||||
*/
|
||||
@Action(
|
||||
path = BrdaCopyAction.PATH,
|
||||
method = POST,
|
||||
automaticallyPrintOk = true,
|
||||
auth = Auth.AUTH_INTERNAL_ONLY
|
||||
)
|
||||
service = Action.Service.BACKEND,
|
||||
path = BrdaCopyAction.PATH,
|
||||
method = POST,
|
||||
automaticallyPrintOk = true,
|
||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
||||
public final class BrdaCopyAction implements Runnable {
|
||||
|
||||
static final String PATH = "/_dr/task/brdaCopy";
|
||||
|
|
|
@ -50,10 +50,10 @@ import org.joda.time.Duration;
|
|||
* Action that uploads a small XML RDE report to ICANN after {@link RdeUploadAction} has finished.
|
||||
*/
|
||||
@Action(
|
||||
path = RdeReportAction.PATH,
|
||||
method = POST,
|
||||
auth = Auth.AUTH_INTERNAL_ONLY
|
||||
)
|
||||
service = Action.Service.BACKEND,
|
||||
path = RdeReportAction.PATH,
|
||||
method = POST,
|
||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
||||
public final class RdeReportAction implements Runnable, EscrowTask {
|
||||
|
||||
static final String PATH = "/_dr/task/rdeReport";
|
||||
|
|
|
@ -78,8 +78,8 @@ import org.joda.time.Duration;
|
|||
* <p>Once a deposit is successfully generated, an {@link RdeUploadAction} is enqueued which will
|
||||
* upload it via SFTP to the third-party escrow provider.
|
||||
*
|
||||
* <p>To generate escrow deposits manually and locally, use the {@code nomulus} tool command
|
||||
* {@code GenerateEscrowDepositCommand}.
|
||||
* <p>To generate escrow deposits manually and locally, use the {@code nomulus} tool command {@code
|
||||
* GenerateEscrowDepositCommand}.
|
||||
*
|
||||
* <h3>Logging</h3>
|
||||
*
|
||||
|
@ -95,9 +95,9 @@ import org.joda.time.Duration;
|
|||
* <p>If a deposit fails, an error is emitted to the logs for each broken entity. It tells you the
|
||||
* key and shows you its representation in lenient XML.
|
||||
*
|
||||
* <p>Failed deposits will be retried indefinitely. This is because RDE and BRDA each have a
|
||||
* {@link Cursor} for each TLD. Even if the cursor lags for days, it'll catch up gradually on its
|
||||
* own, once the data becomes valid.
|
||||
* <p>Failed deposits will be retried indefinitely. This is because RDE and BRDA each have a {@link
|
||||
* Cursor} for each TLD. Even if the cursor lags for days, it'll catch up gradually on its own, once
|
||||
* the data becomes valid.
|
||||
*
|
||||
* <p>The third-party escrow provider will validate each deposit we send them. They do both schema
|
||||
* validation and reference checking.
|
||||
|
@ -143,21 +143,24 @@ import org.joda.time.Duration;
|
|||
*
|
||||
* <h3>Determinism</h3>
|
||||
*
|
||||
* <p>The filename of an escrow deposit is determistic for a given (TLD, watermark,
|
||||
* {@linkplain RdeMode mode}) triplet. Its generated contents is deterministic in all the ways that
|
||||
* we care about. Its view of the database is strongly consistent.
|
||||
* <p>The filename of an escrow deposit is determistic for a given (TLD, watermark, {@linkplain
|
||||
* RdeMode mode}) triplet. Its generated contents is deterministic in all the ways that we care
|
||||
* about. Its view of the database is strongly consistent.
|
||||
*
|
||||
* <p>This is because:
|
||||
*
|
||||
* <ol>
|
||||
* <li>{@code EppResource} queries are strongly consistent thanks to {@link EppResourceIndex}
|
||||
* <li>{@code EppResource} entities are rewinded to the point-in-time of the watermark
|
||||
* <li>{@code EppResource} queries are strongly consistent thanks to {@link EppResourceIndex}
|
||||
* <li>{@code EppResource} entities are rewinded to the point-in-time of the watermark
|
||||
* </ol>
|
||||
*
|
||||
* <p>Here's what's not deterministic:
|
||||
*
|
||||
* <ul>
|
||||
* <li>Ordering of XML fragments. We don't care about this.
|
||||
* <li>Information about registrars. There's no point-in-time for these objects. So in order to
|
||||
* guarantee referential correctness of your deposits, you must never delete a registrar entity.
|
||||
* <li>Ordering of XML fragments. We don't care about this.
|
||||
* <li>Information about registrars. There's no point-in-time for these objects. So in order to
|
||||
* guarantee referential correctness of your deposits, you must never delete a registrar
|
||||
* entity.
|
||||
* </ul>
|
||||
*
|
||||
* <h3>Manual Operation</h3>
|
||||
|
@ -167,13 +170,14 @@ import org.joda.time.Duration;
|
|||
* will be stored in a subdirectory of the "manual" directory, to avoid overwriting regular deposit
|
||||
* files. Cursors and revision numbers will not be updated, and the upload task will not be kicked
|
||||
* off. The parameters are:
|
||||
*
|
||||
* <ul>
|
||||
* <li>manual: if present and true, manual operation is indicated
|
||||
* <li>directory: the subdirectory of "manual" into which the files should be placed
|
||||
* <li>mode: the mode(s) to generate: FULL for RDE deposits, THIN for BRDA deposits
|
||||
* <li>tld: the tld(s) for which deposits should be generated
|
||||
* <li>watermark: the date(s) for which deposits should be generated; dates should be start-of-day
|
||||
* <li>revision: optional; if not specified, the next available revision number will be used
|
||||
* <li>manual: if present and true, manual operation is indicated
|
||||
* <li>directory: the subdirectory of "manual" into which the files should be placed
|
||||
* <li>mode: the mode(s) to generate: FULL for RDE deposits, THIN for BRDA deposits
|
||||
* <li>tld: the tld(s) for which deposits should be generated
|
||||
* <li>watermark: the date(s) for which deposits should be generated; dates should be start-of-day
|
||||
* <li>revision: optional; if not specified, the next available revision number will be used
|
||||
* </ul>
|
||||
*
|
||||
* <p>The manual, directory, mode, tld and watermark parameters must be present for manual
|
||||
|
@ -181,14 +185,16 @@ import org.joda.time.Duration;
|
|||
* set to false). The revision parameter is optional in manual operation, and must be absent for
|
||||
* standard operation.
|
||||
*
|
||||
* @see <a href="https://tools.ietf.org/html/draft-arias-noguchi-registry-data-escrow-06">Registry Data Escrow Specification</a>
|
||||
* @see <a href="https://tools.ietf.org/html/draft-arias-noguchi-dnrd-objects-mapping-05">Domain Name Registration Data Objects Mapping</a>
|
||||
* @see <a href="https://tools.ietf.org/html/draft-arias-noguchi-registry-data-escrow-06">Registry
|
||||
* Data Escrow Specification</a>
|
||||
* @see <a href="https://tools.ietf.org/html/draft-arias-noguchi-dnrd-objects-mapping-05">Domain
|
||||
* Name Registration Data Objects Mapping</a>
|
||||
*/
|
||||
@Action(
|
||||
path = RdeStagingAction.PATH,
|
||||
method = {GET, POST},
|
||||
auth = Auth.AUTH_INTERNAL_ONLY
|
||||
)
|
||||
service = Action.Service.BACKEND,
|
||||
path = RdeStagingAction.PATH,
|
||||
method = {GET, POST},
|
||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
||||
public final class RdeStagingAction implements Runnable {
|
||||
|
||||
public static final String PATH = "/_dr/task/rdeStaging";
|
||||
|
|
|
@ -76,14 +76,14 @@ import org.joda.time.Duration;
|
|||
* <p>This action is invoked by {@link RdeStagingAction} once it's created the files we need. The
|
||||
* date is calculated from {@link CursorType#RDE_UPLOAD}.
|
||||
*
|
||||
* <p>Once this action completes, it rolls the cursor forward a day and triggers
|
||||
* {@link RdeReportAction}.
|
||||
* <p>Once this action completes, it rolls the cursor forward a day and triggers {@link
|
||||
* RdeReportAction}.
|
||||
*/
|
||||
@Action(
|
||||
path = RdeUploadAction.PATH,
|
||||
method = POST,
|
||||
auth = Auth.AUTH_INTERNAL_ONLY
|
||||
)
|
||||
service = Action.Service.BACKEND,
|
||||
path = RdeUploadAction.PATH,
|
||||
method = POST,
|
||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
||||
public final class RdeUploadAction implements Runnable, EscrowTask {
|
||||
|
||||
static final String PATH = "/_dr/task/rdeUpload";
|
||||
|
|
|
@ -45,9 +45,9 @@ import javax.inject.Inject;
|
|||
* <p>Specify the escrow file to import with the "path" parameter.
|
||||
*/
|
||||
@Action(
|
||||
path = "/_dr/task/importRdeContacts",
|
||||
auth = Auth.AUTH_INTERNAL_ONLY
|
||||
)
|
||||
service = Action.Service.BACKEND,
|
||||
path = "/_dr/task/importRdeContacts",
|
||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
||||
public class RdeContactImportAction implements Runnable {
|
||||
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
|
|
@ -69,9 +69,9 @@ import org.joda.time.DateTime;
|
|||
* <p>Specify the escrow file to import with the "path" parameter.
|
||||
*/
|
||||
@Action(
|
||||
path = "/_dr/task/importRdeDomains",
|
||||
auth = Auth.AUTH_INTERNAL_ONLY
|
||||
)
|
||||
service = Action.Service.BACKEND,
|
||||
path = "/_dr/task/importRdeDomains",
|
||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
||||
public class RdeDomainImportAction implements Runnable {
|
||||
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
|
|
@ -45,9 +45,9 @@ import javax.inject.Inject;
|
|||
* <p>Specify the escrow file to import with the "path" parameter.
|
||||
*/
|
||||
@Action(
|
||||
path = "/_dr/task/importRdeHosts",
|
||||
auth = Auth.AUTH_INTERNAL_ONLY
|
||||
)
|
||||
service = Action.Service.BACKEND,
|
||||
path = "/_dr/task/importRdeHosts",
|
||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
||||
public class RdeHostImportAction implements Runnable {
|
||||
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
|
|
@ -56,9 +56,9 @@ import org.joda.time.DateTime;
|
|||
* <p>Specify the escrow file to import with the "path" parameter.
|
||||
*/
|
||||
@Action(
|
||||
path = "/_dr/task/linkRdeHosts",
|
||||
auth = Auth.AUTH_INTERNAL_ONLY
|
||||
)
|
||||
service = Action.Service.BACKEND,
|
||||
path = "/_dr/task/linkRdeHosts",
|
||||
auth = Auth.AUTH_INTERNAL_ONLY)
|
||||
public class RdeHostLinkAction implements Runnable {
|
||||
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue