mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Add initial implementation of YAML config file
This implements the basic framework that allows global YAML configuration, per-environment custom configuration, and unit- test-specific configuration. TESTED=I deployed to alpha, ran some EPP commands through the nomulus tool, and verified no errors. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=145422680
This commit is contained in:
parent
9adfd7a353
commit
16f51f0a5c
6 changed files with 18 additions and 43 deletions
|
@ -1254,6 +1254,19 @@ public final class RegistryConfig {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Memoizes loading of the {@link RegistryConfigSettings} POJO.
|
||||||
|
*
|
||||||
|
* <p>Memoizing without cache expiration is used because the app must be re-deployed in order to
|
||||||
|
* change the contents of the YAML config files.
|
||||||
|
*/
|
||||||
|
private static final Supplier<RegistryConfigSettings> CONFIG_SETTINGS =
|
||||||
|
memoize(new Supplier<RegistryConfigSettings>() {
|
||||||
|
@Override
|
||||||
|
public RegistryConfigSettings get() {
|
||||||
|
return getConfigSettings();
|
||||||
|
}});
|
||||||
|
|
||||||
/** Returns the roid suffix to be used for the roids of all contacts and hosts. */
|
/** Returns the roid suffix to be used for the roids of all contacts and hosts. */
|
||||||
public static String getContactAndHostRoidSuffix() {
|
public static String getContactAndHostRoidSuffix() {
|
||||||
return CONFIG_SETTINGS.get().registryPolicy.contactAndHostRoidSuffix;
|
return CONFIG_SETTINGS.get().registryPolicy.contactAndHostRoidSuffix;
|
||||||
|
|
|
@ -1,10 +1 @@
|
||||||
|
# Add environment-specific configuration here
|
||||||
appEngine:
|
|
||||||
projectId: domain-registry-alpha
|
|
||||||
|
|
||||||
registryPolicy:
|
|
||||||
contactAndHostRoidSuffix: GOOGLE
|
|
||||||
productName: Google Registry Alpha
|
|
||||||
|
|
||||||
registrarConsole:
|
|
||||||
logoFilename: google_registry.png
|
|
||||||
|
|
|
@ -1,10 +1 @@
|
||||||
|
# Add environment-specific configuration here
|
||||||
appEngine:
|
|
||||||
projectId: domain-registry-crash
|
|
||||||
|
|
||||||
registryPolicy:
|
|
||||||
contactAndHostRoidSuffix: GOOGLE
|
|
||||||
productName: Google Registry Crash
|
|
||||||
|
|
||||||
registrarConsole:
|
|
||||||
logoFilename: google_registry.png
|
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
|
# Add environment-specific configuration here
|
||||||
appEngine:
|
|
||||||
projectId: domain-registry
|
|
||||||
|
|
|
@ -1,10 +1 @@
|
||||||
|
# Add environment-specific configuration here
|
||||||
appEngine:
|
|
||||||
projectId: domain-registry
|
|
||||||
|
|
||||||
registryPolicy:
|
|
||||||
contactAndHostRoidSuffix: GOOGLE
|
|
||||||
productName: Google Registry
|
|
||||||
|
|
||||||
registrarConsole:
|
|
||||||
logoFilename: google_registry.png
|
|
||||||
|
|
|
@ -1,10 +1 @@
|
||||||
|
# Add environment-specific configuration here
|
||||||
appEngine:
|
|
||||||
projectId: domain-registry-sandbox
|
|
||||||
|
|
||||||
registryPolicy:
|
|
||||||
contactAndHostRoidSuffix: GOOGLE
|
|
||||||
productName: Google Registry Sandbox
|
|
||||||
|
|
||||||
registrarConsole:
|
|
||||||
logoFilename: google_registry.png
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue