Skip to content

Commit

Permalink
feat(dedibox): add waiter support for Service and Server
Browse files Browse the repository at this point in the history
  • Loading branch information
Laure-di committed Jul 31, 2024
1 parent cab3ccd commit 26666b0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/namespaces/dedibox/v1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
func GetCommands() *core.Commands {
cmds := GetGeneratedCommands()

cmds.MustFind("dedibox", "server", "create").Override(serviceCreateBuilder)

for _, commandPath := range [][]string{
{"dedibox", "server", "list"},
{"dedibox", "service", "list"},
Expand Down
14 changes: 14 additions & 0 deletions internal/namespaces/dedibox/v1/custom_service.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package dedibox

import (
"context"
"github.com/scaleway/scaleway-cli/v2/internal/core"
"github.com/scaleway/scaleway-sdk-go/api/dedibox/v1"
)

func serviceCreateBuilder(c *core.Command) *core.Command {
c.WaitFunc = func(ctx context.Context, argsI, respI interface{}) (interface{}, error) {
api := dedibox.NewAPI(core.ExtractClient(ctx))

}
}

0 comments on commit 26666b0

Please sign in to comment.