Rename UpdateKmsKeyringCommand (#1353)

This brings it in line with GetKeyringSecretCommand. We still need to
remove the rest of remaining Cloud KMS related code in the future.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/google/nomulus/1353)
<!-- Reviewable:end -->
This commit is contained in:
Lai Jiang 2021-10-01 16:45:45 -04:00 committed by GitHub
parent 7cbc27af30
commit f0a9073d4e
3 changed files with 8 additions and 9 deletions

View file

@ -123,7 +123,7 @@ public final class RegistryTool {
.put("update_allocation_tokens", UpdateAllocationTokensCommand.class)
.put("update_cursors", UpdateCursorsCommand.class)
.put("update_domain", UpdateDomainCommand.class)
.put("update_kms_keyring", UpdateKmsKeyringCommand.class)
.put("update_keyring_secret", UpdateKeyringSecretCommand.class)
.put("update_premium_list", UpdatePremiumListCommand.class)
.put("update_registrar", UpdateRegistrarCommand.class)
.put("update_reserved_list", UpdateReservedListCommand.class)

View file

@ -160,7 +160,7 @@ interface RegistryToolComponent {
void inject(UpdateDomainCommand command);
void inject(UpdateKmsKeyringCommand command);
void inject(UpdateKeyringSecretCommand command);
void inject(UpdateRegistrarCommand command);

View file

@ -27,17 +27,16 @@ import java.nio.file.Files;
import java.nio.file.Path;
import javax.inject.Inject;
/** Command to set and update {@code KmsKeyring} values. */
@Parameters(
separators = " =",
commandDescription = "Update values of secrets in KmsKeyring."
)
final class UpdateKmsKeyringCommand implements CommandWithRemoteApi {
/**
* Command to set and update ASCII-armored secret from the active {@code Keyring} implementation.
*/
@Parameters(separators = " =", commandDescription = "Update values of secret in the keyring.")
final class UpdateKeyringSecretCommand implements CommandWithRemoteApi {
@Inject KmsUpdater kmsUpdater;
@Inject
UpdateKmsKeyringCommand() {}
UpdateKeyringSecretCommand() {}
@Parameter(names = "--keyname", description = "The secret to update", required = true)
private KeyringKeyName keyringKeyName;