Skip to content

Commit 26666b0

Browse files
committed
feat(dedibox): add waiter support for Service and Server
1 parent cab3ccd commit 26666b0

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Diff for: internal/namespaces/dedibox/v1/custom.go

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import (
99
func GetCommands() *core.Commands {
1010
cmds := GetGeneratedCommands()
1111

12+
cmds.MustFind("dedibox", "server", "create").Override(serviceCreateBuilder)
13+
1214
for _, commandPath := range [][]string{
1315
{"dedibox", "server", "list"},
1416
{"dedibox", "service", "list"},

Diff for: internal/namespaces/dedibox/v1/custom_service.go

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package dedibox
2+
3+
import (
4+
"context"
5+
"github.com/scaleway/scaleway-cli/v2/internal/core"
6+
"github.com/scaleway/scaleway-sdk-go/api/dedibox/v1"
7+
)
8+
9+
func serviceCreateBuilder(c *core.Command) *core.Command {
10+
c.WaitFunc = func(ctx context.Context, argsI, respI interface{}) (interface{}, error) {
11+
api := dedibox.NewAPI(core.ExtractClient(ctx))
12+
13+
}
14+
}

0 commit comments

Comments
 (0)