Skip to content

Commit

Permalink
feat(apple-silicon): add contract message information
Browse files Browse the repository at this point in the history
  • Loading branch information
Laure-di committed Jan 8, 2025
1 parent d03f829 commit c0d9594
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions internal/namespaces/applesilicon/v1alpha1/custom_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ var serverStatusMarshalSpecs = human.EnumMarshalSpecs{

func serverCreateBuilder(c *core.Command) *core.Command {
c.ArgSpecs.GetByName("type").AutoCompleteFunc = autocompleteServerType

c.AddInterceptors(func(ctx context.Context, argsI interface{}, runner core.CommandRunner) (i interface{}, err error) {
args := argsI.(*applesilicon.CreateServerRequest)
bareMetalLink := "\u001B[38;2;121;45;212;4m\u001B]8;;https://console.scaleway.com/organization/contracts\u001B\\Bare Metal Specific Conditions\u001B]8;;\u001B\\\u001B[0m (\u001B[38;2;121;45;212mhttps://console.scaleway.com/organization/contracts\u001B[0m)"
appleLink := "\u001B[4m\u001B[38;2;121;45;212m\u001B]8;;https://www.apple.com/legal/sla/\u001B\\macOS License Agreement\u001B]8;;\u001B\\\u001B[0m (https://www.apple.com/legal/sla/)"

fmt.Println("Please note: Signing the " + bareMetalLink + " and the " + appleLink + " is mandatory.")
return runner(ctx, args)
},
)

c.WaitFunc = waitForServerFunc(serverActionCreate)
return c
}
Expand Down

0 comments on commit c0d9594

Please sign in to comment.