Skip to content

feat: Add savings plans#136

Merged
amstuta merged 1 commit intomainfrom
dev/aamstutz/savings-plans
Feb 4, 2026
Merged

feat: Add savings plans#136
amstuta merged 1 commit intomainfrom
dev/aamstutz/savings-plans

Conversation

@amstuta
Copy link
Collaborator

@amstuta amstuta commented Feb 3, 2026

Description

Add cloud savings-plan commands.

Fixes #116 (issue)

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have commented my code
  • I updated the documentation by running make doc
  • I ran go mod tidy
  • I have added tests that prove my fix is effective or that my feature works

@amstuta amstuta requested a review from a team as a code owner February 3, 2026 16:56
@amstuta amstuta requested a review from Copilot February 3, 2026 16:57
Copy link

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

This PR introduces comprehensive support for managing OVHcloud Savings Plans through the CLI, enabling users to subscribe to, manage, and monitor cost-saving commitments for their cloud resources.

Changes:

  • Adds a complete cloud savings-plan command suite with subcommands for listing, subscribing, simulating, terminating, and modifying savings plans
  • Implements intelligent offer lookup based on flavor and deployment type (1AZ/3AZ) with automatic filtering
  • Includes comprehensive test coverage for all savings plan operations with mocked API responses

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
internal/services/cloud/cloud_savings_plan.go Core implementation of savings plan operations including subscription, termination, and modification logic
internal/services/cloud/templates/cloud_savings_plan.tmpl Display template for rendering savings plan details in markdown format
internal/cmd/cloud_savings_plan.go Command structure and CLI interface for all savings plan commands
internal/cmd/cloud_savings_plan_test.go Comprehensive test suite covering all savings plan operations
internal/cmd/cmd_test.go Test infrastructure updates to capture stdout for better test debugging
internal/cmd/cloud_project.go Integration point registering savings plan commands with cloud command group
doc/*.md Auto-generated documentation for all savings plan commands and options

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

@amstuta amstuta force-pushed the dev/aamstutz/savings-plans branch 3 times, most recently from 9cec446 to e5de27a Compare February 3, 2026 17:12
Signed-off-by: Arthur Amstutz <arthur.amstutz@gmail.com>
Signed-off-by: Arthur Amstutz <arthur.amstutz@corp.ovh.com>
@amstuta amstuta force-pushed the dev/aamstutz/savings-plans branch from e5de27a to 443a2b4 Compare February 4, 2026 10:33
@amstuta amstuta merged commit 886e61a into main Feb 4, 2026
5 checks passed
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.

[Feature]: Savings Plan

3 participants