Skip to content

Commit 32fab4f

Browse files
committed
STAC-24149: add topology inspect cmd
1 parent 780a958 commit 32fab4f

28 files changed

+3919
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ release-notes.json
2424

2525
.localdev/
2626
stackstate-cli
27+
28+
.claude

cmd/sts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ func STSCommand(cli *di.Deps) *cobra.Command {
3333
cmd.AddCommand(AgentCommand(cli))
3434
cmd.AddCommand(UserSessionCommand(cli))
3535
cmd.AddCommand(DashboardCommand(cli))
36+
cmd.AddCommand(TopologyCommand(cli))
3637

3738
// Experimental commands for otel mapping
3839
if os.Getenv("STS_EXPERIMENTAL_OTEL_MAPPING") != "" {

cmd/sts_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ func TestSTSCommandContainsExpectedSubcommands(t *testing.T) {
3838
"agent",
3939
"user-session",
4040
"dashboard",
41+
"topology",
4142
}
4243

4344
// Verify expected commands are present
@@ -57,7 +58,7 @@ func TestSTSCommandStructure(t *testing.T) {
5758
cli := di.NewMockDeps(t)
5859
cmd := STSCommand(&cli.Deps)
5960

60-
assert.Len(t, cmd.Commands(), 16, "Expected 16 subcommands")
61+
assert.Len(t, cmd.Commands(), 17, "Expected 17 subcommands")
6162
}
6263

6364
func TestSTSCommandUsageTemplate(t *testing.T) {

cmd/topology.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cmd
2+
3+
import (
4+
"github.com/spf13/cobra"
5+
"github.com/stackvista/stackstate-cli/cmd/topology"
6+
"github.com/stackvista/stackstate-cli/internal/di"
7+
)
8+
9+
func TopologyCommand(cli *di.Deps) *cobra.Command {
10+
cmd := &cobra.Command{
11+
Use: "topology",
12+
Short: "Inspect SUSE Observability topology components",
13+
Long: "Inspect SUSE Observability topology components. Query and display topology components using component types, tags, and identifiers.",
14+
}
15+
cmd.AddCommand(topology.InspectCommand(cli))
16+
17+
return cmd
18+
}

0 commit comments

Comments
 (0)