Skip to content

Comments

Add missing dedicaated server methods#49

Merged
kzaitsev merged 2 commits intomasterfrom
missing-ds-methods
Feb 24, 2026
Merged

Add missing dedicaated server methods#49
kzaitsev merged 2 commits intomasterfrom
missing-ds-methods

Conversation

@kzaitsev
Copy link
Collaborator

@kzaitsev kzaitsev commented Feb 21, 2026

Add missing dedicated server update fields and extend host management API

Changes

pkg/types.go

  • Extended DedicatedServerUpdateInput with two new fields:
    • UserData *string — cloud-init user data, processed during next server initialization; pointer type allows explicit clearing via empty string while omitting the field when not provided
    • IPXEConfig *string — iPXE boot configuration (currently under development)
  • Added new input types:
    • HostRescueModeFeatureInputAuthMethods []string, SSHKeyFingerprints []string
    • PrivateIpxeBootFeatureInputIPXEConfig string
    • SSHKeyAttachInputSSHkeyFingerprints []string

pkg/hosts.go

  • Added HostsService interface methods and implementations for dedicated server feature management:
    • ActivateDisaggregatedPublicPortsFeature / DeactivateDisaggregatedPublicPortsFeature
    • ActivateDisaggregatedPrivatePortsFeature / DeactivateDisaggregatedPrivatePortsFeature
    • ActivateNoPublicIpAddressFeature / DeactivateNoPublicIpAddressFeature
    • ActivateNoPrivateIpFeature / DeactivateNoPrivateIpFeature
    • ActivateOobPublicAccessFeature / DeactivateOobPublicAccessFeature
    • ActivateNoPublicNetworkFeature / DeactivateNoPublicNetworkFeature
    • ActivateHostRescueModeFeature / DeactivateHostRescueModeFeature — rescue mode requires HostRescueModeFeatureInput (auth methods + optional SSH key fingerprints)
    • ActivatePrivateIpxeBootFeature / DeactivatePrivateIpxeBootFeature — requires PrivateIpxeBootFeatureInput (iPXE config string)
  • Added SSH key binding methods for dedicated servers:
    • ListDedicatedServerSSHKeys — returns all SSH keys attached to a server
    • AttachSSHKeysToDedicatedServer — attaches one or more keys via SSHKeyAttachInput
    • DetachSSHKeyFromDedicatedServer — detaches a single key by fingerprint

pkg/hosts_test.go / pkg/fixtures/

  • Added tests and fixtures for all new feature activate/deactivate methods and SSH key binding operations

@kzaitsev kzaitsev requested a review from olegy89 February 24, 2026 09:26
@kzaitsev kzaitsev merged commit 00757cf into master Feb 24, 2026
6 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