Skip to content

Commit 4af138b

Browse files
authored
feat(cockpit): add plan resource (#2976)
1 parent 528f9f2 commit 4af138b

File tree

6 files changed

+44
-3
lines changed

6 files changed

+44
-3
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Pricing plans management commands.
4+
5+
USAGE:
6+
scw cockpit plan
7+
8+
FLAGS:
9+
-h, --help help for plan
10+
11+
GLOBAL FLAGS:
12+
-c, --config string The path to the config file
13+
-D, --debug Enable debug mode
14+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
15+
-p, --profile string The config profile to use

cmd/scw/testdata/test-all-usage-cockpit-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ AVAILABLE COMMANDS:
1010
cockpit Cockpit management commands
1111
contact Contacts management commands
1212
grafana-user Grafana user management commands
13+
plan Pricing plans management commands
1314
token Token management commands
1415

1516
FLAGS:

docs/commands/cockpit.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Cockpit API.
2222
- [Delete a grafana user](#delete-a-grafana-user)
2323
- [List grafana users](#list-grafana-users)
2424
- [Reset Grafana user password](#reset-grafana-user-password)
25+
- [Pricing plans management commands](#pricing-plans-management-commands)
2526
- [Token management commands](#token-management-commands)
2627
- [Create a token](#create-a-token)
2728
- [Delete token](#delete-token)
@@ -373,6 +374,20 @@ scw cockpit grafana-user reset-password [arg=value ...]
373374

374375

375376

377+
## Pricing plans management commands
378+
379+
Pricing plans management commands.
380+
381+
Pricing plans management commands.
382+
383+
**Usage:**
384+
385+
```
386+
scw cockpit plan
387+
```
388+
389+
390+
376391
## Token management commands
377392

378393
Token management commands.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ require (
2222
github.com/moby/buildkit v0.11.5
2323
github.com/opencontainers/go-digest v1.0.0
2424
github.com/pkg/errors v0.9.1
25-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230329091040-cc563855c7c2
25+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230330080454-96c819d2b904
2626
github.com/spf13/cobra v1.6.1
2727
github.com/spf13/pflag v1.0.5
2828
github.com/stretchr/testify v1.8.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
275275
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
276276
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
277277
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
278-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230329091040-cc563855c7c2 h1:XNAks4A2vVw6fDGuA0EwZUgBVzF1VQrQiVjUdFOj90E=
279-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230329091040-cc563855c7c2/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
278+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230330080454-96c819d2b904 h1:i9YkK/NBI/W0Hj+mcGWgoCBRPvSSPIkIchojl/VeogY=
279+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230330080454-96c819d2b904/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
280280
github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg=
281281
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
282282
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=

internal/namespaces/cockpit/v1beta1/cockpit_cli.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ func GetGeneratedCommands() *core.Commands {
2323
cockpitCockpit(),
2424
cockpitToken(),
2525
cockpitGrafanaUser(),
26+
cockpitPlan(),
2627
cockpitAlert(),
2728
cockpitContact(),
2829
cockpitCockpitActivate(),
@@ -81,6 +82,15 @@ func cockpitGrafanaUser() *core.Command {
8182
}
8283
}
8384

85+
func cockpitPlan() *core.Command {
86+
return &core.Command{
87+
Short: `Pricing plans management commands`,
88+
Long: `Pricing plans management commands.`,
89+
Namespace: "cockpit",
90+
Resource: "plan",
91+
}
92+
}
93+
8494
func cockpitAlert() *core.Command {
8595
return &core.Command{
8696
Short: `Managed alerts management commands`,

0 commit comments

Comments
 (0)