Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion cmd/scw/testdata/test-all-usage-rdb-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ AVAILABLE COMMANDS:
log Instance logs management commands
node-type Node types management commands
privilege User privileges management commands
settings Settings management commands
user User management commands

FLAGS:
Expand Down
85 changes: 0 additions & 85 deletions internal/namespaces/rdb/v1/rdb_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func GetGeneratedCommands() *core.Commands {
rdbEngine(),
rdbInstance(),
rdbACL(),
rdbSettings(),
rdbPrivilege(),
rdbUser(),
rdbDatabase(),
Expand All @@ -49,8 +48,6 @@ func GetGeneratedCommands() *core.Commands {
rdbLogPrepare(),
rdbLogList(),
rdbLogGet(),
rdbSettingsAdd(),
rdbSettingsDelete(),
rdbACLList(),
rdbACLAdd(),
rdbACLDelete(),
Expand Down Expand Up @@ -114,16 +111,6 @@ func rdbACL() *core.Command {
}
}

func rdbSettings() *core.Command {
return &core.Command{
Short: `Settings management commands`,
Long: `Instance Settings are tunables of Database Engines. Available settings depend on the database engine and its version.
`,
Namespace: "rdb",
Resource: "settings",
}
}

func rdbPrivilege() *core.Command {
return &core.Command{
Short: `User privileges management commands`,
Expand Down Expand Up @@ -939,78 +926,6 @@ func rdbLogGet() *core.Command {
}
}

func rdbSettingsAdd() *core.Command {
return &core.Command{
Short: `Add an instance setting`,
Long: `Add an instance setting.`,
Namespace: "rdb",
Resource: "settings",
Verb: "add",
ArgsType: reflect.TypeOf(rdb.AddInstanceSettingsRequest{}),
ArgSpecs: core.ArgSpecs{
{
Name: "instance-id",
Short: `UUID of the instance you want to add settings to`,
Required: true,
Positional: false,
},
{
Name: "settings.{index}.name",
Required: false,
Positional: false,
},
{
Name: "settings.{index}.value",
Required: false,
Positional: false,
},
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
request := args.(*rdb.AddInstanceSettingsRequest)

client := core.ExtractClient(ctx)
api := rdb.NewAPI(client)
return api.AddInstanceSettings(request)

},
}
}

func rdbSettingsDelete() *core.Command {
return &core.Command{
Short: `Delete an instance setting`,
Long: `Delete an instance setting.`,
Namespace: "rdb",
Resource: "settings",
Verb: "delete",
ArgsType: reflect.TypeOf(rdb.DeleteInstanceSettingsRequest{}),
ArgSpecs: core.ArgSpecs{
{
Name: "instance-id",
Short: `UUID of the instance to delete settings from`,
Required: true,
Positional: false,
},
{
Name: "setting-names.{index}",
Short: `Settings names to delete`,
Required: false,
Positional: false,
},
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
request := args.(*rdb.DeleteInstanceSettingsRequest)

client := core.ExtractClient(ctx)
api := rdb.NewAPI(client)
return api.DeleteInstanceSettings(request)

},
}
}

func rdbACLList() *core.Command {
return &core.Command{
Short: `List ACL rules of a given instance`,
Expand Down