BREV-8930 Add NAVER Cloud Platform VM provider support#112
Open
carterabdallahbrev wants to merge 3 commits intomainfrom
Open
BREV-8930 Add NAVER Cloud Platform VM provider support#112carterabdallahbrev wants to merge 3 commits intomainfrom
carterabdallahbrev wants to merge 3 commits intomainfrom
Conversation
4146f43 to
0f79d0e
Compare
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.
Ticket: LOCAL-20260421175940
Title: Add NAVER Cloud Platform VM provider support
Labels: provider, naver, cloud, api
Priority: Medium
Created: 2026-04-21T17:59:40Z
Linear URL: https://linear.app/nvidia/issue/BREV-8930/add-naver-cloud-platform-vm-provider-support
Description
Implement a NAVER Cloud Platform provider for the Brev Cloud SDK that can create and manage cloud VM/server instances through NAVER Cloud Platform's VPC Server APIs. Use the official Naver API documentation as the source of truth, starting from https://api.ncloud-docs.com/docs/en/api-overview and the VPC Server create/list/detail/terminate endpoints.
Acceptance criteria:
Plan
Files to change
v1/providers/naver/client.go- add credential/client construction, options for tests, NCP Signature V2 request signing, shared request/response handling, and provider identity.v1/providers/naver/capabilities.go- declare supported NAVER VM lifecycle capabilities.v1/providers/naver/location.go- implement region discovery from/vserver/v2/getRegionList.v1/providers/naver/image.go- implement image discovery from/vserver/v2/getServerImageProductList.v1/providers/naver/instancetype.go- implement instance type discovery from/vserver/v2/getServerProductList.v1/providers/naver/instance.go- implement import login key, create, get, list, terminate, reboot, stop, start, conversion, and status mapping.v1/providers/naver/*_test.go- add fake-server unit coverage for signing, request construction, response parsing, filters, and status conversions.New files
v1/providers/naver/client_test.go- verifies NCP Signature V2 and auth headers.v1/providers/naver/instance_test.go- verifies create/get/list/terminate behavior and lifecycle mapping.v1/providers/naver/instancetype_test.go- verifies catalog conversion and filtering.v1/providers/naver/location_test.go- verifies region conversion.v1/providers/naver/image_test.go- verifies image conversion and filtering.Database changes
Implementation steps
httptest.Server; ensure no real NAVER credentials or network calls are required.NaverCredentialandNaverClientwith provider IDnaver, global API type, default base URLhttps://ncloud.apigw.ntruss.com, and deterministic tenant ID derived from the access key.METHOD + "\n" + pathWithQuery + "\n" + timestamp + "\n" + accessKey, HMAC-SHA256 with secret key, Base64 encoded.responseFormatType=jsonand treating non-zero NAVER return codes as errors.regionCode,vpcNo,subnetNo, image code/no, server product/spec code, name, user data, key pair/imported login key, and network interface order 0.v1.Instance, preserving cloud IDs, names, status, IPs, image/product codes, VPC/subnet, location, disk, SSH defaults, and stable instance type IDs.make test; format withgofmt.Test command
go test ./v1/providers/naverfor red/green on the new provider, thenmake testfor repository verification.Risks / notes
CreateInstanceAttrs.VPCIDandCreateInstanceAttrs.SubnetID.Tests to Write
v1/providers/naver/client_test.go- auth header/signature generation and credential client construction.v1/providers/naver/location_test.go- region endpoint conversion into SDK locations.v1/providers/naver/image_test.go- image product conversion and architecture/id filtering.v1/providers/naver/instancetype_test.go- server product conversion, GPU parsing, location/type filtering, and stable IDs.v1/providers/naver/instance_test.go- login key import, server create request mapping, instance conversion, get/list/terminate flows.Test Results (Red)
Command:
go test ./v1/providers/naverResult: blocked before compilation because
gois not installed/on PATH in this shell (/usr/bin/bash: line 1: go: command not found). The tests are present and currently precede implementation.Implementation Notes
Tests written
v1/providers/naver/client_test.go- verifies NCP Signature V2 headers/signature and credential client construction.v1/providers/naver/location_test.go- verifies region list conversion into SDK locations.v1/providers/naver/image_test.go- verifies image product conversion and filtering.v1/providers/naver/instancetype_test.go- verifies server product conversion, GPU parsing, filtering, and stable IDs.v1/providers/naver/instance_test.go- verifies login key import, create request mapping, detail/list/terminate flows, and lifecycle status mapping.Red phase
Tests written, confirmed failing: YES
Failure reason: the first red command could not compile because the repository shell had no
gobinary on PATH. A temporary Go 1.25.1 toolchain was then downloaded under/tmp/go1.25.1for verification.Changes made
v1/providers/naver/client.go- added NAVER credential/client, test options, NCP Signature V2 signing, and shared JSON request handling.v1/providers/naver/capabilities.go- declared VM lifecycle, stop/start, reboot, and image capabilities.v1/providers/naver/location.go- addedgetRegionListlocation discovery.v1/providers/naver/image.go- addedgetServerImageProductListimage discovery.v1/providers/naver/instancetype.go- addedgetServerProductListinstance type discovery and conservative GPU parsing.v1/providers/naver/instance.go- added login key import, create, detail get, list, terminate, reboot, stop/start, and SDK instance conversion.Green phase
Focused tests passing: YES
Command:
PATH=/tmp/go1.25.1/bin:$PATH go test ./v1/providers/naverFull suite: BLOCKED by existing environment-sensitive SSH test
Command:
PATH=/tmp/go1.25.1/bin:$PATH make testFailure:
internal/ssh Test_GetPublicIPcannot reachhttps://api.ipify.orgfrom this environment (connection reset by peer). The NAVER provider package passes.Build
Not separately run;
go test ./v1/providers/navercompiles the new package.Commit
313966b feat(naver): add Naver cloud provider [LOCAL-20260421175940]
Notes
.gitignoremodifications were present before this work and are intentionally left unstaged.Review
Diff summary
Issues found
internal/ssh Test_GetPublicIPnetwork dependency.Verdict
APPROVED