mirror of
https://github.com/google/nomulus.git
synced 2025-05-20 03:09:33 +02:00
Add option --non_live_versions to set_num_instances command
This commit introduced a new flag to enable SetNumInstancesCommand to be able to set the number of instances for all non-live versions for a given service or for all deployed services. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=222826003
This commit is contained in:
parent
19b7a7b3ec
commit
d20b83c820
16 changed files with 582 additions and 85 deletions
|
@ -12,6 +12,7 @@ java_library(
|
|||
"//java/google/registry/keyring/api",
|
||||
"//java/google/registry/util",
|
||||
"@com_google_api_client",
|
||||
"@com_google_api_client_appengine",
|
||||
"@com_google_appengine_api_1_0_sdk",
|
||||
"@com_google_auto_value",
|
||||
"@com_google_code_findbugs_jsr305",
|
||||
|
|
|
@ -17,6 +17,7 @@ package google.registry.config;
|
|||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
|
||||
import com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential;
|
||||
import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport;
|
||||
import com.google.api.client.googleapis.util.Utils;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
@ -107,6 +108,20 @@ public abstract class CredentialModule {
|
|||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a {@link AppIdentityCredential} with access for App Engine Admin API.
|
||||
*
|
||||
* <p>{@link AppIdentityCredential} is an OAuth 2.0 credential in which a client Google App Engine
|
||||
* application needs to access data that it owns.
|
||||
*/
|
||||
@AppEngineAdminApiCredential
|
||||
@Provides
|
||||
@Singleton
|
||||
public static AppIdentityCredential provideAppEngineAdminApiCredential(
|
||||
@Config("appEngineAdminApiCredentialOauthScopes") ImmutableList<String> requiredScopes) {
|
||||
return new AppIdentityCredential(requiredScopes);
|
||||
}
|
||||
|
||||
/** Dagger qualifier for the Application Default Credential. */
|
||||
@Qualifier
|
||||
public @interface DefaultCredential {}
|
||||
|
@ -124,4 +139,8 @@ public abstract class CredentialModule {
|
|||
*/
|
||||
@Qualifier
|
||||
public @interface DelegatedCredential {}
|
||||
|
||||
/** Dagger qualifier for a credential with access for App Engine Admin API. */
|
||||
@Qualifier
|
||||
public @interface AppEngineAdminApiCredential {}
|
||||
}
|
||||
|
|
|
@ -1229,6 +1229,14 @@ public final class RegistryConfig {
|
|||
return ImmutableList.copyOf(config.credentialOAuth.delegatedCredentialOauthScopes);
|
||||
}
|
||||
|
||||
/** Provides the OAuth scopes required for access to App Engine Admin API. */
|
||||
@Provides
|
||||
@Config("appEngineAdminApiCredentialOauthScopes")
|
||||
public static ImmutableList<String> provideAppEngineAdminApiCredentialOauthScopes(
|
||||
RegistryConfigSettings config) {
|
||||
return ImmutableList.copyOf(config.credentialOAuth.appEngineAdminApiCredentialOauthScopes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the help path for the RDAP terms of service.
|
||||
*
|
||||
|
|
|
@ -58,6 +58,7 @@ public class RegistryConfigSettings {
|
|||
public static class CredentialOAuth {
|
||||
public List<String> defaultCredentialOauthScopes;
|
||||
public List<String> delegatedCredentialOauthScopes;
|
||||
public List<String> appEngineAdminApiCredentialOauthScopes;
|
||||
}
|
||||
|
||||
/** Configuration options for the G Suite account used by Nomulus. */
|
||||
|
|
|
@ -282,6 +282,11 @@ credentialOAuth:
|
|||
- https://www.googleapis.com/auth/admin.directory.group
|
||||
# View and manage group settings in Group Settings API.
|
||||
- https://www.googleapis.com/auth/apps.groups.settings
|
||||
# OAuth scopes required for accessing App Engine Admin API using the
|
||||
# AppIdentityCredential.
|
||||
appEngineAdminApiCredentialOauthScopes:
|
||||
# View and manage your applications deployed on Google App Engine
|
||||
- https://www.googleapis.com/auth/appengine.admin
|
||||
|
||||
|
||||
icannReporting:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue