diff --git a/.ai/checkpoints/topic-11-sp-provider-commands.md b/.ai/checkpoints/topic-11-sp-provider-commands.md index 6684282..c25f3e1 100644 --- a/.ai/checkpoints/topic-11-sp-provider-commands.md +++ b/.ai/checkpoints/topic-11-sp-provider-commands.md @@ -57,7 +57,7 @@ Topic 11 implements the `dcm sp provider` command group with read-only subcomman 2. **Separate API type import** — The SP Manager has its API types in `api/v1alpha1`, imported as `spmapi` for `ListProvidersParams`. -3. **Table columns** — ID, NAME, SERVICE TYPE, STATUS, HEALTH, CREATED per spec section 4.11. Fields map to `id`, `name`, `service_type`, `status`, `health_status`, `create_time` from the `Provider` type. +3. **Table columns** — ID, NAME, SERVICE TYPE, HEALTH, CREATED per spec section 4.11. Fields map to `id`, `name`, `service_type`, `health_status`, `create_time` from the `Provider` type. (Updated 2026-04-22: removed STATUS column after upstream API dropped the `status` field.) 4. **List response uses `providers` field** — The SP Manager's `ProviderList` type uses `providers` for the array and `next_page_token` for pagination. diff --git a/.ai/specs/dcm-cli.spec.md b/.ai/specs/dcm-cli.spec.md index 57746b2..4077992 100644 --- a/.ai/specs/dcm-cli.spec.md +++ b/.ai/specs/dcm-cli.spec.md @@ -1246,8 +1246,8 @@ SP provider health check. #### Table Output Columns ``` -ID NAME SERVICE TYPE STATUS HEALTH CREATED -kubevirt-123 KubeVirt SP compute registered healthy 2026-03-09T10:00:00Z +ID NAME SERVICE TYPE HEALTH CREATED +kubevirt-123 KubeVirt SP compute healthy 2026-03-09T10:00:00Z ``` #### Acceptance Criteria diff --git a/.ai/test-plans/dcm-cli-unit.test-plan.md b/.ai/test-plans/dcm-cli-unit.test-plan.md index b273aed..b1e4f3e 100644 --- a/.ai/test-plans/dcm-cli-unit.test-plan.md +++ b/.ai/test-plans/dcm-cli-unit.test-plan.md @@ -1174,7 +1174,7 @@ test classes. Instead: - **Type:** Unit - **Given:** A mock server returning an SP provider with all fields populated - **When:** `dcm sp provider get kubevirt-123` is executed with `--output table` -- **Then:** The table output includes columns: ID, NAME, SERVICE TYPE, STATUS, HEALTH, CREATED +- **Then:** The table output includes columns: ID, NAME, SERVICE TYPE, HEALTH, CREATED ### TC-U147: SP command registers provider subcommand diff --git a/internal/commands/sp_provider.go b/internal/commands/sp_provider.go index 323e483..f52629a 100644 --- a/internal/commands/sp_provider.go +++ b/internal/commands/sp_provider.go @@ -13,17 +13,16 @@ import ( ) var spProviderTableDef = &output.TableDef{ - Headers: []string{"ID", "NAME", "SERVICE TYPE", "STATUS", "HEALTH", "CREATED"}, + Headers: []string{"ID", "NAME", "SERVICE TYPE", "HEALTH", "CREATED"}, RowFunc: func(resource any) []string { m, ok := resource.(map[string]any) if !ok { - return []string{"", "", "", "", "", ""} + return []string{"", "", "", "", ""} } return []string{ stringifyValue(m, "id"), stringifyValue(m, "name"), stringifyValue(m, "service_type"), - stringifyValue(m, "status"), stringifyValue(m, "health_status"), stringifyValue(m, "create_time"), } diff --git a/internal/commands/sp_provider_test.go b/internal/commands/sp_provider_test.go index a73c005..10af061 100644 --- a/internal/commands/sp_provider_test.go +++ b/internal/commands/sp_provider_test.go @@ -20,7 +20,6 @@ func sampleSPProviderResponse() map[string]any { "path": "providers/kubevirt-123", "name": "KubeVirt SP", "service_type": "compute", - "status": "registered", "health_status": "healthy", "create_time": "2026-03-09T10:00:00Z", } @@ -91,7 +90,6 @@ var _ = Describe("SP Provider Commands", func() { Expect(out).To(ContainSubstring("kubevirt-123")) Expect(out).To(ContainSubstring("KubeVirt SP")) Expect(out).To(ContainSubstring("compute")) - Expect(out).To(ContainSubstring("registered")) }) // TC-U140: List SP providers with pagination @@ -180,7 +178,6 @@ var _ = Describe("SP Provider Commands", func() { Expect(out).To(ContainSubstring("kubevirt-123")) Expect(out).To(ContainSubstring("KubeVirt SP")) Expect(out).To(ContainSubstring("compute")) - Expect(out).To(ContainSubstring("registered")) }) // TC-U143: Get SP provider without PROVIDER_ID fails @@ -225,13 +222,12 @@ var _ = Describe("SP Provider Commands", func() { Expect(out).To(ContainSubstring("ID")) Expect(out).To(ContainSubstring("NAME")) Expect(out).To(ContainSubstring("SERVICE TYPE")) - Expect(out).To(ContainSubstring("STATUS")) Expect(out).To(ContainSubstring("HEALTH")) Expect(out).To(ContainSubstring("CREATED")) + Expect(out).NotTo(ContainSubstring("STATUS")) Expect(out).To(ContainSubstring("kubevirt-123")) Expect(out).To(ContainSubstring("KubeVirt SP")) Expect(out).To(ContainSubstring("compute")) - Expect(out).To(ContainSubstring("registered")) Expect(out).To(ContainSubstring("healthy")) Expect(out).To(ContainSubstring("2026-03-09T10:00:00Z")) })