Skip to content

feat cloud: add SSH key creation#150

Merged
amstuta merged 3 commits intomainfrom
dev/adrien.pensart/PCINT-8022-create-ssh-key
Feb 23, 2026
Merged

feat cloud: add SSH key creation#150
amstuta merged 3 commits intomainfrom
dev/adrien.pensart/PCINT-8022-create-ssh-key

Conversation

@AdrienPensart
Copy link
Contributor

Description

Please include a summary of the changes and the related issue if applicable.

Fixes #xx (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (improvement of existing commands)
  • Breaking change (fix or feature that can break a current behavior)
  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have commented my code
  • I updated the documentation by running make doc
  • I ran go mod tidy
  • I have added tests that prove my fix is effective or that my feature works

@AdrienPensart AdrienPensart requested a review from a team as a code owner February 20, 2026 20:07
@AdrienPensart AdrienPensart force-pushed the dev/adrien.pensart/PCINT-8022-create-ssh-key branch from d45d839 to bf8e57d Compare February 20, 2026 20:09
Signed-off-by: Adrien Pensart <adrien.pensart@corp.ovh.com>
@AdrienPensart AdrienPensart force-pushed the dev/adrien.pensart/PCINT-8022-create-ssh-key branch from bf8e57d to d500e1a Compare February 20, 2026 20:12
Copy link
Collaborator

@amstuta amstuta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, you need to run make doc to add the doc pages

Comment on lines +30 to +34
SSHKeyCreationParameters = struct {
Name string `json:"name,omitempty"`
PublicKey string `json:"publicKey,omitempty"`
Region string `json:"region,omitzero"`
}{}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SSHKeyCreationParameters = struct {
Name string `json:"name,omitempty"`
PublicKey string `json:"publicKey,omitempty"`
Region string `json:"region,omitzero"`
}{}
SSHKeyCreationParameters struct {
Name string `json:"name,omitempty"`
PublicKey string `json:"publicKey,omitempty"`
Region string `json:"region,omitzero"`
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, why omitzero on the Region ? For consistency I'd rather have either omitempty or omitzero on all fields.

@@ -0,0 +1,4 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file will never be used if you don't set the following flags on the command: https://github.com/ovh/ovhcloud-cli/blob/main/internal/cmd/account.go#L81-L84

@amstuta amstuta linked an issue Feb 23, 2026 that may be closed by this pull request
1 task
@amstuta amstuta removed a link to an issue Feb 23, 2026
1 task
Signed-off-by: Adrien Pensart <adrien.pensart@corp.ovh.com>

// sshKeyCreationParameters holds the parameters for creating a new SSH key.
SSHKeyCreationParameters struct {
Name string `json:"name"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both should also have the omitempty tag so that common.CreateResource works correctly

Signed-off-by: Adrien Pensart <adrien.pensart@corp.ovh.com>
@amstuta amstuta merged commit 1fcaf43 into main Feb 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants