Skip to content

feat: add GRAPE provider#42

Merged
Amygos merged 5 commits intomasterfrom
grape
Mar 5, 2026
Merged

feat: add GRAPE provider#42
Amygos merged 5 commits intomasterfrom
grape

Conversation

@Amygos
Copy link
Copy Markdown
Member

@Amygos Amygos commented Mar 4, 2026

This pull request adds support for the Gigaset Redirect and Provisioning Environment (GRAPE) as a new provider in the Falconieri project. It introduces a new Go client library for GRAPE, updates configuration structures and templates, and enhances documentation to reflect the new provider. The changes ensure that GRAPE can be configured similarly to the existing YMCS provider, including support for Hawk authentication.

GRAPE provider integration:

  • Added a new GRAPE provider to the supported providers list and updated documentation in README.md to describe configuration parameters, environment variables, and provide example JSON configuration. [1] [2] [3] [4]
  • Updated Ansible deployment defaults and configuration templates to support GRAPE provider variables (grape_base_url, grape_client_id, etc.). [1] [2]

Configuration and code structure:

  • Refactored provider configuration structs in configuration/config.go to add Grape as a new provider and to distinguish between legacy and modern providers, updating environment variable parsing logic for GRAPE. [1] [2] [3]

GRAPE client implementation:

  • Introduced a new Go package (libs/grape/) implementing the GRAPE API client, including support for Hawk authentication (auth.go), client initialization and MAC normalization (client.go), device registration logic (devices.go), error handling (errors.go), and API types (types.go). [1] [2] [3] [4] [5]

These changes collectively enable Falconieri to provision devices using the Gigaset GRAPE API with secure authentication and configuration management.

NethServer/dev#7764

Replace occurrences of ProviderConf with LegacyProviderConf for older
providers in configuration. The YmcsConf struct is renamed to
ProviderConf, which now represents the new YMCS version introduced in
Falconieri.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new GRAPE (Gigaset Redirect and Provisioning Environment) provider to Falconieri, including a dedicated Go client library and the necessary configuration/docs/deployment updates so GRAPE can be configured similarly to YMCS.

Changes:

  • Added grape provider dispatch + provider implementation wired to a new libs/grape Hawk-auth client.
  • Extended configuration schema + env var parsing + Ansible templates/defaults to support GRAPE settings.
  • Updated README and added a GRAPE API manual to document configuration and usage.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
providers/grape.go New provider wrapper using a singleton GRAPE client and RegisterDevice.
methods/providerDispatch.go Routes /grape/... requests to the new GRAPE provider.
libs/grape/auth.go Implements Hawk request signing and request execution for GRAPE.
libs/grape/client.go Defines GRAPE client structure, HTTP client, MAC normalization.
libs/grape/devices.go Implements device registration + cached API discovery (settings/endpoints).
libs/grape/errors.go Introduces structured API error parsing/helpers.
libs/grape/types.go Adds GRAPE API response/request types.
libs/grape/API_MANUAL.md Adds a technical manual for the GRAPE client library.
configuration/config.go Refactors provider config structs and adds GRAPE env/config parsing.
deploy/ansible/roles/falconieri/templates/conf.json.tpl Adds GRAPE provider section to generated JSON config.
deploy/ansible/roles/falconieri/defaults/main.yml Adds GRAPE Ansible defaults.
README.md Documents GRAPE as a supported provider + config/env vars examples.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Claude
Copy link
Copy Markdown

Claude AI commented Mar 5, 2026

@Amygos I've opened a new pull request, #43, to work on those changes. Once the pull request is ready, I'll request review from you.

@Amygos
Copy link
Copy Markdown
Member Author

Amygos commented Mar 5, 2026

@codex[agent] open a new pull request to apply changes based on the comments in this thread

@Codex
Copy link
Copy Markdown

Codex AI commented Mar 5, 2026

@Amygos I've opened a new pull request, #44, to work on those changes. Once the pull request is ready, I'll request review from you.

@Amygos
Copy link
Copy Markdown
Member Author

Amygos commented Mar 5, 2026

@claude[agent] open a new pull request to apply changes based on the comments in this thread
All the changes must be applied in the form of fixup commits.

@Claude
Copy link
Copy Markdown

Claude AI commented Mar 5, 2026

@Amygos I've opened a new pull request, #45, to work on those changes. Once the pull request is ready, I'll request review from you.

Amygos added 4 commits March 5, 2026 11:49
Implement device registration functionality for the Gigaset Redirect and
Provisioning Environment (GRAPE) provisioning client library with proper
MAC address normalization and caching of provisioning server
identifiers. Include comprehensive error handling with structured API
error types and response parsing utilities.

- Add RegisterDevice method with provisioning server integration
- Implement caching for provisioning server IDs and endpoints URLs
- Define structured types for Grape API responses and device data
- Add error type with detailed HTTP status reporting capabilities
Introduce new GRAPE provider support in system configuration and
dispatch logic.
Add Grape provider to the list of supported providers and document
its configuration options for both JSON and environment variables.
@Amygos Amygos merged commit 3fe3515 into master Mar 5, 2026
2 checks passed
@Amygos Amygos deleted the grape branch March 5, 2026 10:50
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.

4 participants