Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ release-notes.json

.localdev/
stackstate-cli

.claude
1 change: 1 addition & 0 deletions cmd/sts.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func STSCommand(cli *di.Deps) *cobra.Command {
cmd.AddCommand(AgentCommand(cli))
cmd.AddCommand(UserSessionCommand(cli))
cmd.AddCommand(DashboardCommand(cli))
cmd.AddCommand(TopologyCommand(cli))

// Experimental commands for otel mapping
if os.Getenv("STS_EXPERIMENTAL_OTEL_MAPPING") != "" {
Expand Down
3 changes: 2 additions & 1 deletion cmd/sts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func TestSTSCommandContainsExpectedSubcommands(t *testing.T) {
"agent",
"user-session",
"dashboard",
"topology",
}

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

assert.Len(t, cmd.Commands(), 16, "Expected 16 subcommands")
assert.Len(t, cmd.Commands(), 17, "Expected 17 subcommands")
}

func TestSTSCommandUsageTemplate(t *testing.T) {
Expand Down
18 changes: 18 additions & 0 deletions cmd/topology.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package cmd

import (
"github.com/spf13/cobra"
"github.com/stackvista/stackstate-cli/cmd/topology"
"github.com/stackvista/stackstate-cli/internal/di"
)

func TopologyCommand(cli *di.Deps) *cobra.Command {
cmd := &cobra.Command{
Use: "topology",
Short: "Inspect SUSE Observability topology components",
Long: "Inspect SUSE Observability topology components. Query and display topology components using component types, tags, and identifiers.",
}
cmd.AddCommand(topology.InspectCommand(cli))

return cmd
}
Loading
Loading