Skip to content

Implement SGCP DNS alias management and resource driver#1065

Open
cgalibern wants to merge 19 commits into
opensvc:mainfrom
cgalibern:sgcp-dns
Open

Implement SGCP DNS alias management and resource driver#1065
cgalibern wants to merge 19 commits into
opensvc:mainfrom
cgalibern:sgcp-dns

Conversation

@cgalibern

Copy link
Copy Markdown
Contributor

Description of Changes

This pull request introduces the resipsgcp_dnsalias driver to manage DNS aliases using the SGCP API. Key updates include:

  1. DNS Alias Resource Driver:

    • Implements create, update, delete, and status operations via the SGCP API.
    • Adds a T struct with keywords, including uuid, name, target, zone_id, secret, and endpoint.
    • Provides methods: Configure, Start, Stop, Status, Label, CanInstall, and Boot.
    • Integrates the alias manager for create and delete operations, with usage of the common SGCP HTTP client.
  2. Code Refinements & Enhancements:

    • Refactored methods, streamlined alias management, and clarified error handling.
    • Added consistent receiver naming in the sgcpdnshelper package.
    • Expanded functions for alias queries and API call statistics tracking.
  3. Testing & Utilities:

    • Rewrote and added unit tests for creation, updates, deletion, and error scenarios.
    • Introduced a reusable helper AuthInfoFromPath for authentication.
    • Renamed and relocated test-related packages for clarity and functionality alignment.

This update ensures robust DNS alias management via the SGCP framework, aligning with the patterns established in existing resource drivers.

PaulJouvanceau and others added 18 commits July 8, 2026 11:27
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.
…package for test simplification

Signed-off-by: Cyril Galibern <cyril.galibern@opensvc.com>
Signed-off-by: Cyril Galibern <cyril.galibern@opensvc.com>
…n-memory DB for SGCP alias management

Signed-off-by: Cyril Galibern <cyril.galibern@opensvc.com>
…nd error handling

Signed-off-by: Cyril Galibern <cyril.galibern@opensvc.com>
… updated functionality

Signed-off-by: Cyril Galibern <cyril.galibern@opensvc.com>
… and API abstraction

Signed-off-by: Cyril Galibern <cyril.galibern@opensvc.com>
…ions and enhanced test cases

Api test is not expected here

Signed-off-by: Cyril Galibern <cyril.galibern@opensvc.com>
Signed-off-by: Cyril Galibern <cyril.galibern@opensvc.com>
…anagement REST API endpoints for SGCP scenarios

Signed-off-by: Cyril Galibern <cyril.galibern@opensvc.com>
Signed-off-by: Cyril Galibern <cyril.galibern@opensvc.com>
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