Skip to content

Commit

Permalink
Added cloud-director as a future provider, currently unsupported (#1441)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Noble <[email protected]>
  • Loading branch information
AverageMarcus authored Oct 15, 2024
1 parent 1eb6972 commit b403b64
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
14 changes: 12 additions & 2 deletions sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.8.0] - 2024-10-15

## [Unreleased]
### Added

- Add Cloud Director provider to the list of supported providers.

### Changed

- Made the `getProviderDirectory` function more dynamic and less hardcoded for most cases.

## [0.7.0] - 2024-10-15

### Added

- Add Azure provider to the list of supported providers.
- Add VSphere provider to the list of supported providers.

## [0.6.0] - 2024-07-26

Expand Down
6 changes: 6 additions & 0 deletions sdk/api/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ const (

// ProviderVsphere represents the new Vsphere provider which is implemented with Cluster API.
ProviderVsphere Provider = "vsphere"

// ProviderCloudDirector represents the new VCD provider which is implemented with Cluster API.
ProviderCloudDirector Provider = "cloud-director"
)

var SupportedProviders = []Provider{
ProviderAws,
ProviderAzure,
ProviderVsphere,

// Not yet supported:
// ProviderCloudDirector,
}

type Provider string
Expand Down
14 changes: 8 additions & 6 deletions sdk/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ const (

func getProviderDirectory(provider Provider) (string, error) {
switch provider {
case "":
return "", microerror.Maskf(InvalidProviderError, "no provider supplied")

// Providers that use a different path name to their provider name
case ProviderAws:
return "capa", nil
case ProviderAzure:
return "azure", nil
case ProviderVsphere:
return "vsphere", nil
}

return "", microerror.Maskf(InvalidProviderError, "unknown provider: %s", provider)
// By default, the value of the provider is used as the path
default:
return string(provider), nil
}
}

0 comments on commit b403b64

Please sign in to comment.