mirror of
https://github.com/google/nomulus.git
synced 2025-06-15 08:54:45 +02:00
Update activity reports to comply with agreement changes
This removes the ramp-up and pre-ramp-up registrar fields, and lists 'CZDS' as the zfa-passwords field, in accordance to the registry agreement changes listed on the associated bug. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=170337426
This commit is contained in:
parent
c69b409b30
commit
d4ab6fe90b
6 changed files with 19 additions and 32 deletions
|
@ -76,8 +76,8 @@ public final class ActivityReportingQueryBuilder implements QueryBuilder {
|
||||||
String operationalRegistrarsQuery =
|
String operationalRegistrarsQuery =
|
||||||
SqlTemplate.create(getQueryFromFile("registrar_operating_status.sql"))
|
SqlTemplate.create(getQueryFromFile("registrar_operating_status.sql"))
|
||||||
.put("PROJECT_ID", projectId)
|
.put("PROJECT_ID", projectId)
|
||||||
.put("REGISTRAR_DATA_SET", "registrar_data")
|
.put("DATASTORE_EXPORT_DATA_SET", DATASTORE_EXPORT_DATA_SET)
|
||||||
.put("REGISTRAR_STATUS_TABLE", "registrar_status")
|
.put("REGISTRAR_TABLE", "Registrar")
|
||||||
.build();
|
.build();
|
||||||
queriesBuilder.put(getTableName(REGISTRAR_OPERATING_STATUS), operationalRegistrarsQuery);
|
queriesBuilder.put(getTableName(REGISTRAR_OPERATING_STATUS), operationalRegistrarsQuery);
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,6 @@ public final class IcannReportingModule {
|
||||||
static final String ICANN_REPORTING_DATA_SET = "icann_reporting";
|
static final String ICANN_REPORTING_DATA_SET = "icann_reporting";
|
||||||
static final String DATASTORE_EXPORT_DATA_SET = "latest_datastore_export";
|
static final String DATASTORE_EXPORT_DATA_SET = "latest_datastore_export";
|
||||||
private static final String BIGQUERY_SCOPE = "https://www.googleapis.com/auth/bigquery";
|
private static final String BIGQUERY_SCOPE = "https://www.googleapis.com/auth/bigquery";
|
||||||
private static final String DRIVE_SCOPE = "https://www.googleapis.com/auth/drive.readonly";
|
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Parameter(PARAM_YEAR_MONTH)
|
@Parameter(PARAM_YEAR_MONTH)
|
||||||
|
@ -90,7 +89,7 @@ public final class IcannReportingModule {
|
||||||
.getApplicationDefault(transport, new JacksonFactory());
|
.getApplicationDefault(transport, new JacksonFactory());
|
||||||
BigqueryConnection connection = new BigqueryConnection.Builder()
|
BigqueryConnection connection = new BigqueryConnection.Builder()
|
||||||
.setExecutorService(Executors.newFixedThreadPool(20))
|
.setExecutorService(Executors.newFixedThreadPool(20))
|
||||||
.setCredential(credential.createScoped(ImmutableList.of(BIGQUERY_SCOPE, DRIVE_SCOPE)))
|
.setCredential(credential.createScoped(ImmutableList.of(BIGQUERY_SCOPE)))
|
||||||
.setDatasetId(ICANN_REPORTING_DATA_SET)
|
.setDatasetId(ICANN_REPORTING_DATA_SET)
|
||||||
.setOverwrite(true)
|
.setOverwrite(true)
|
||||||
.setPollInterval(Duration.standardSeconds(1))
|
.setPollInterval(Duration.standardSeconds(1))
|
||||||
|
|
|
@ -21,8 +21,8 @@ SELECT
|
||||||
SUM(IF(metricName = 'operational-registrars', count, 0)) AS operational_registrars,
|
SUM(IF(metricName = 'operational-registrars', count, 0)) AS operational_registrars,
|
||||||
SUM(IF(metricName = 'ramp-up-registrars', count, 0)) AS ramp_up_registrars,
|
SUM(IF(metricName = 'ramp-up-registrars', count, 0)) AS ramp_up_registrars,
|
||||||
SUM(IF(metricName = 'pre-ramp-up-registrars', count, 0)) AS pre_ramp_up_registrars,
|
SUM(IF(metricName = 'pre-ramp-up-registrars', count, 0)) AS pre_ramp_up_registrars,
|
||||||
-- We don't support ZFA over SFTP, only AXFR.
|
-- We use the Centralized Zone Data Service.
|
||||||
0 AS zfa_passwords,
|
"CZDS" AS zfa_passwords,
|
||||||
SUM(IF(metricName = 'whois-43-queries', count, 0)) AS whois_43_queries,
|
SUM(IF(metricName = 'whois-43-queries', count, 0)) AS whois_43_queries,
|
||||||
SUM(IF(metricName = 'web-whois-queries', count, 0)) AS web_whois_queries,
|
SUM(IF(metricName = 'web-whois-queries', count, 0)) AS web_whois_queries,
|
||||||
-- We don't support searchable WHOIS.
|
-- We don't support searchable WHOIS.
|
||||||
|
|
|
@ -13,21 +13,15 @@
|
||||||
-- See the License for the specific language governing permissions and
|
-- See the License for the specific language governing permissions and
|
||||||
-- limitations under the License.
|
-- limitations under the License.
|
||||||
|
|
||||||
-- Query for all registrar statuses:
|
-- Query that counts the number of real registrars in system.
|
||||||
-- production, ramping up (OTE), or pre-ramp-up (requested).
|
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
-- Applies to all TLDs, hence the 'null' magic value.
|
-- Applies to all TLDs, hence the 'null' magic value.
|
||||||
STRING(NULL) AS tld,
|
STRING(NULL) AS tld,
|
||||||
CASE WHEN access_type = 'PROD' AND registrar_name IS NOT NULL
|
'operational-registrars' AS metricName,
|
||||||
THEN 'operational-registrars'
|
COUNT(registrarName) AS count
|
||||||
WHEN access_type = 'OTE' AND registrar_name IS NOT NULL
|
|
||||||
THEN 'ramp-up-registrars'
|
|
||||||
WHEN access_type IS NULL AND registrar_name IS NOT NULL
|
|
||||||
THEN 'pre-ramp-up-registrars'
|
|
||||||
-- The import process is imprecise; filter out invalid rows.
|
|
||||||
ELSE 'not-applicable' END AS metricName,
|
|
||||||
COUNT(registrar_id) AS count
|
|
||||||
FROM
|
FROM
|
||||||
`%PROJECT_ID%.%REGISTRAR_DATA_SET%.%REGISTRAR_STATUS_TABLE%`
|
`%PROJECT_ID%.%DATASTORE_EXPORT_DATA_SET%.%REGISTRAR_TABLE%`
|
||||||
|
WHERE
|
||||||
|
type = 'REAL'
|
||||||
GROUP BY metricName
|
GROUP BY metricName
|
||||||
|
|
|
@ -21,8 +21,8 @@ SELECT
|
||||||
SUM(IF(metricName = 'operational-registrars', count, 0)) AS operational_registrars,
|
SUM(IF(metricName = 'operational-registrars', count, 0)) AS operational_registrars,
|
||||||
SUM(IF(metricName = 'ramp-up-registrars', count, 0)) AS ramp_up_registrars,
|
SUM(IF(metricName = 'ramp-up-registrars', count, 0)) AS ramp_up_registrars,
|
||||||
SUM(IF(metricName = 'pre-ramp-up-registrars', count, 0)) AS pre_ramp_up_registrars,
|
SUM(IF(metricName = 'pre-ramp-up-registrars', count, 0)) AS pre_ramp_up_registrars,
|
||||||
-- We don't support ZFA over SFTP, only AXFR.
|
-- We use the Centralized Zone Data Service.
|
||||||
0 AS zfa_passwords,
|
"CZDS" AS zfa_passwords,
|
||||||
SUM(IF(metricName = 'whois-43-queries', count, 0)) AS whois_43_queries,
|
SUM(IF(metricName = 'whois-43-queries', count, 0)) AS whois_43_queries,
|
||||||
SUM(IF(metricName = 'web-whois-queries', count, 0)) AS web_whois_queries,
|
SUM(IF(metricName = 'web-whois-queries', count, 0)) AS web_whois_queries,
|
||||||
-- We don't support searchable WHOIS.
|
-- We don't support searchable WHOIS.
|
||||||
|
|
|
@ -13,21 +13,15 @@
|
||||||
-- See the License for the specific language governing permissions and
|
-- See the License for the specific language governing permissions and
|
||||||
-- limitations under the License.
|
-- limitations under the License.
|
||||||
|
|
||||||
-- Query for all registrar statuses:
|
-- Query that counts the number of real registrars in system.
|
||||||
-- production, ramping up (OTE), or pre-ramp-up (requested).
|
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
-- Applies to all TLDs, hence the 'null' magic value.
|
-- Applies to all TLDs, hence the 'null' magic value.
|
||||||
STRING(NULL) AS tld,
|
STRING(NULL) AS tld,
|
||||||
CASE WHEN access_type = 'PROD' AND registrar_name IS NOT NULL
|
'operational-registrars' AS metricName,
|
||||||
THEN 'operational-registrars'
|
COUNT(registrarName) AS count
|
||||||
WHEN access_type = 'OTE' AND registrar_name IS NOT NULL
|
|
||||||
THEN 'ramp-up-registrars'
|
|
||||||
WHEN access_type IS NULL AND registrar_name IS NOT NULL
|
|
||||||
THEN 'pre-ramp-up-registrars'
|
|
||||||
-- The import process is imprecise; filter out invalid rows.
|
|
||||||
ELSE 'not-applicable' END AS metricName,
|
|
||||||
COUNT(registrar_id) AS count
|
|
||||||
FROM
|
FROM
|
||||||
`domain-registry-alpha.registrar_data.registrar_status`
|
`domain-registry-alpha.latest_datastore_export.Registrar`
|
||||||
|
WHERE
|
||||||
|
type = 'REAL'
|
||||||
GROUP BY metricName
|
GROUP BY metricName
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue