Skip to content

feat(ip): implement SGCP DNS alias resource driver#1064

Closed
PaulJouvanceau wants to merge 1 commit into
opensvc:mainfrom
PaulJouvanceau:sgcp
Closed

feat(ip): implement SGCP DNS alias resource driver#1064
PaulJouvanceau wants to merge 1 commit into
opensvc:mainfrom
PaulJouvanceau:sgcp

Conversation

@PaulJouvanceau

Copy link
Copy Markdown
Contributor

No description provided.

Add the resipsgcp_dnsalias driver to manage DNS aliases via the SGCP API.
This driver supports create, update, delete, and status operations, following
the same pattern as the existing resfssgcp_nfs driver.

- Add T struct with keywords: uuid, name, target, zone_id, secret, endpoint
- Implement Configure, Start, Stop, Status, Label, CanInstall, Boot methods
- Use sgcp.DNSAPI for API calls, with authentication via token factory
- Add aliasManager to handle createOrUpdate and delete logic
- Add unit tests covering creation, update, deletion, status, and error cases
- Add manifest.go to register driver and keywords

The driver integrates with the SGCP configuration (sgcp.yaml) and uses
the common http client cache and token factory from the sgcp package.
Comment thread drivers/resipsgcp_dnsalias/main.go
Comment thread drivers/resipsgcp_dnsalias/main.go
Comment thread drivers/resipsgcp_dnsalias/main.go
Comment thread drivers/resipsgcp_dnsalias/main.go
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
api, server := newTestDNSAPI(t, func(w http.ResponseWriter, r *http.Request) (int, interface{}) {
if r.Method == http.MethodGet && r.URL.Path == "/aliases" {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

use the value from sgcp.yaml ("/alias")

@cgalibern

Copy link
Copy Markdown
Contributor

replaced by #1065

1 similar comment
@cgalibern

Copy link
Copy Markdown
Contributor

replaced by #1065

@cgalibern cgalibern closed this Jul 10, 2026
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