feat(cloud): netcup adapter — adopt & install, since netcup has no order API - #968
Merged
Conversation
…der API
netcup sells servers as monthly contracts through checkout, not as API
resources: the retired SOAP webservice had no order method and the REST API
that replaced it on 2026-04-30 has 63 endpoints, none of which create or
delete a server.
So provision adopts — it takes a server already on the account with no OS
installed and installs one via POST /servers/{id}/image, which carries
hostname, sshKeyIds and a first-boot customScript, so one call lands a fully
configured box. destroy throws rather than powering off, because reporting
success while the contract keeps billing is worse than failing.
Adoption is deliberately timid, since installing an image wipes the target
disk: never a server with a template, never a disabled one, and never a guess
between multiple candidates without an adoptPrefix.
18 adapter tests, registry test updated.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
ThreatCrush Security Scan84 finding(s) HIGH/CRITICAL: 24 | MEDIUM: 51 | LOW: 9
…and 34 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
@profullstack/sh1pt-cloud-netcup, the 15th cloud adapter, driving netcup's SCP REST API.netcup retired its SOAP webservice on 2026-04-30 and replaced it with a REST API at
https://www.servercontrolpanel.de/scp-core/api/v1, OAuth2 via Keycloak, with a public OpenAPI spec. This adapter is written against that spec — all 63 endpoints were enumerated rather than inferred.The thing that makes this adapter different
netcup has no order endpoint and no cancel endpoint. Servers are monthly contracts bought through checkout, not API resources. There is no
POST /serversand no delete anywhere in the spec. So two verbs are redefined rather than faked:provisionadopts. It finds a server already on the account with no OS installed and installs one viaPOST /servers/{serverId}/image, which carrieshostname,sshKeyIdsand a first-bootcustomScript. One call can land a fully configured box.destroythrows, naming the Customer Control Panel. Powering the server off would report success while the contract kept billing — a worse failure than an honest error.Guardrails
Installing an image wipes the target disk, so adoption is deliberately timid:
template(an OS is installed)disabledserveradoptPrefixconfiguredWhen nothing is adoptable,
provisionfails with the plan matching the spec and a link to buy it, then adopts it on the next run.Notes
quotereads a price list compiled into the adapter — netcup publishes no pricing endpoint. netcup bills monthly; thehourlyfield is derived only to satisfy theQuoteshape.client_credentialsandpasswordgrants are supported. The SCPuserIdis not the CCP customer number, which the README calls out.Testing
18 adapter tests covering auth, the adopt rules, the refusal paths, image selection, hostname normalization and error extraction.
tsc --noEmitclean. The 26-test registry suite passes withnetcupadded.Transport was smoke-tested against the live API without credentials: the token endpoint accepts the
client_credentialsgrant shape, and/serversreturns errors in amessagefield, which is whatextractErrorMessagereads first.🤖 Generated with Claude Code