feat: adding gcp management

This commit is contained in:
Hector Ventura committed 2026-06-02 20:24:55 -05:00
1 parent b15d14b0c2
commit 88362364b2
26 files changed
+1455 -6

No files matched your search

+7 -2
View File
@@ -3,6 +3,7 @@ package io.floci.cli;
import io.floci.cli.commands.*;
import io.floci.cli.commands.aws.AwsCommand;
import io.floci.cli.commands.az.AzCommand;
import io.floci.cli.commands.gcp.GcpCommand;
import io.floci.cli.commands.config.ConfigCommand;
import io.floci.cli.commands.snapshot.SnapshotCommand;
import io.floci.cli.config.GlobalConfigStore;
@@ -19,7 +20,8 @@ import picocli.CommandLine.*;
" floci doctor — diagnose environment issues%n" +
" floci env — print environment variables%n" +
" floci aws — explicit AWS emulator commands%n" +
" floci az — Azure emulator commands%n",
" floci az — Azure emulator commands%n" +
" floci gcp — GCP emulator commands%n",
mixinStandardHelpOptions = true,
versionProvider = FlociCli.VersionProvider.class,
subcommands = {
@@ -38,6 +40,7 @@ import picocli.CommandLine.*;
CompletionCommand.class,
AwsCommand.class,
AzCommand.class,
GcpCommand.class,
HelpCommand.class
}
)
@@ -73,6 +76,8 @@ public class FlociCli implements Runnable {
String defaultProduct = new GlobalConfigStore().getDefaultProduct();
if ("az".equals(defaultProduct)) {
effectiveArgs = prepend("az", args);
} else if ("gcp".equals(defaultProduct)) {
effectiveArgs = prepend("gcp", args);
}
}
@@ -88,7 +93,7 @@ public class FlociCli implements Runnable {
private static boolean isExplicitProduct(String[] args) {
for (String arg : args) {
if (arg.startsWith("-")) continue;
return "aws".equals(arg) || "az".equals(arg)
return "aws".equals(arg) || "az".equals(arg) || "gcp".equals(arg)
|| "config".equals(arg) || "completion".equals(arg) || "help".equals(arg);
}
return false;