Skip to content

Commit 2ecce6e

Browse files
authored
feat(BREV-8931): Move to String over Cloud Enum in Shadeform (brevdev#113)
* feat(BREV-8931): Bump shadeform API, move from cloud enum to strings * fmt
1 parent ecfee0e commit 2ecce6e

44 files changed

Lines changed: 6181 additions & 372 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

v1/providers/shadeform/configuration.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
package v1
22

3-
import (
4-
openapi "github.com/brevdev/cloud/v1/providers/shadeform/gen/shadeform"
5-
)
6-
73
type Configuration struct {
8-
AllowedInstanceTypes map[openapi.Cloud]map[string]bool
4+
AllowedInstanceTypes map[string]map[string]bool
95
}
106

11-
func (c *Configuration) isAllowed(cloud openapi.Cloud, shadeInstanceType string) bool {
7+
func (c *Configuration) isAllowed(cloud string, shadeInstanceType string) bool {
128
allowedClouds, found := c.AllowedInstanceTypes[cloud]
139
if !found {
1410
return false

v1/providers/shadeform/gen/shadeform/.openapi-generator/FILES

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.gitignore
2+
.openapi-generator-ignore
23
.travis.yml
34
README.md
45
api/openapi.yaml
@@ -11,7 +12,15 @@ docs/Alert.md
1112
docs/AutoDelete.md
1213
docs/Availability.md
1314
docs/BootTime.md
14-
docs/Cloud.md
15+
docs/Cluster.md
16+
docs/ClusterAvailability.md
17+
docs/ClusterInfoResponse.md
18+
docs/ClusterRegionInfo.md
19+
docs/ClusterType.md
20+
docs/ClusterTypesResponse.md
21+
docs/ClustersResponse.md
22+
docs/CreateClusterRequest.md
23+
docs/CreateClusterResponse.md
1524
docs/CreateRequest.md
1625
docs/CreateResponse.md
1726
docs/CreateVolumeRequest.md
@@ -58,7 +67,15 @@ model_alert.go
5867
model_auto_delete.go
5968
model_availability.go
6069
model_boot_time.go
61-
model_cloud.go
70+
model_cluster.go
71+
model_cluster_availability.go
72+
model_cluster_info_response.go
73+
model_cluster_region_info.go
74+
model_cluster_type.go
75+
model_cluster_types_response.go
76+
model_clusters_response.go
77+
model_create_cluster_request.go
78+
model_create_cluster_response.go
6279
model_create_request.go
6380
model_create_response.go
6481
model_create_volume_request.go
@@ -96,4 +113,5 @@ model_volume_types_inner.go
96113
model_volumes_response.go
97114
model_volumes_types_response.go
98115
response.go
116+
test/api_default_test.go
99117
utils.go

v1/providers/shadeform/gen/shadeform/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ All URIs are relative to *https://api.shadeform.ai/v1*
7979

8080
Class | Method | HTTP request | Description
8181
------------ | ------------- | ------------- | -------------
82+
*DefaultAPI* | [**Clusters**](docs/DefaultAPI.md#clusters) | **Get** /clusters | /clusters
83+
*DefaultAPI* | [**ClustersCreate**](docs/DefaultAPI.md#clusterscreate) | **Post** /clusters/create | /clusters/create
84+
*DefaultAPI* | [**ClustersDelete**](docs/DefaultAPI.md#clustersdelete) | **Post** /clusters/{id}/delete | /clusters/{id}/delete
85+
*DefaultAPI* | [**ClustersInfo**](docs/DefaultAPI.md#clustersinfo) | **Get** /clusters/{id}/info | /clusters/{id}/info
86+
*DefaultAPI* | [**ClustersTypes**](docs/DefaultAPI.md#clusterstypes) | **Get** /clusters/types | /clusters/types
8287
*DefaultAPI* | [**Instances**](docs/DefaultAPI.md#instances) | **Get** /instances | /instances
8388
*DefaultAPI* | [**InstancesCreate**](docs/DefaultAPI.md#instancescreate) | **Post** /instances/create | /instances/create
8489
*DefaultAPI* | [**InstancesDelete**](docs/DefaultAPI.md#instancesdelete) | **Post** /instances/{id}/delete | /instances/{id}/delete
@@ -112,7 +117,15 @@ Class | Method | HTTP request | Description
112117
- [AutoDelete](docs/AutoDelete.md)
113118
- [Availability](docs/Availability.md)
114119
- [BootTime](docs/BootTime.md)
115-
- [Cloud](docs/Cloud.md)
120+
- [Cluster](docs/Cluster.md)
121+
- [ClusterAvailability](docs/ClusterAvailability.md)
122+
- [ClusterInfoResponse](docs/ClusterInfoResponse.md)
123+
- [ClusterRegionInfo](docs/ClusterRegionInfo.md)
124+
- [ClusterType](docs/ClusterType.md)
125+
- [ClusterTypesResponse](docs/ClusterTypesResponse.md)
126+
- [ClustersResponse](docs/ClustersResponse.md)
127+
- [CreateClusterRequest](docs/CreateClusterRequest.md)
128+
- [CreateClusterResponse](docs/CreateClusterResponse.md)
116129
- [CreateRequest](docs/CreateRequest.md)
117130
- [CreateResponse](docs/CreateResponse.md)
118131
- [CreateVolumeRequest](docs/CreateVolumeRequest.md)

0 commit comments

Comments
 (0)