Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Removes bucketName fields from Protocol #41

Merged
merged 2 commits into from
May 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions apis/objectstorage.k8s.io/v1alpha1/azure_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ package v1alpha1
import osspec "sigs.k8s.io/container-object-storage-interface-spec"

type AzureProtocol struct {
ContainerName string `json:"containerName,omitempty"`
StorageAccount string `json:"storageAccount,omitempty"`
}

func (azure *AzureProtocol) ConvertToExternal() *osspec.Protocol_AzureBlob {
return &osspec.Protocol_AzureBlob{
AzureBlob: &osspec.AzureBlob{
ContainerName: azure.ContainerName,
StorageAccount: azure.StorageAccount,
},
}
Expand All @@ -37,6 +35,5 @@ func (azure *AzureProtocol) ConvertToExternal() *osspec.Protocol_AzureBlob {
func ConvertFromAzureExternal(ext *osspec.AzureBlob) *AzureProtocol {
return &AzureProtocol{
StorageAccount: ext.StorageAccount,
ContainerName: ext.ContainerName,
}
}
3 changes: 0 additions & 3 deletions apis/objectstorage.k8s.io/v1alpha1/gcs_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ package v1alpha1
import osspec "sigs.k8s.io/container-object-storage-interface-spec"

type GCSProtocol struct {
BucketName string `json:"bucketName,omitempty"`
PrivateKeyName string `json:"privateKeyName,omitempty"`
ProjectID string `json:"projectID,omitempty"`
ServiceAccount string `json:"serviceAccount,omitempty"`
Expand All @@ -30,7 +29,6 @@ type GCSProtocol struct {
func (gcs *GCSProtocol) ConvertToExternal() *osspec.Protocol_Gcs {
return &osspec.Protocol_Gcs{
Gcs: &osspec.GCS{
BucketName: gcs.BucketName,
PrivateKeyName: gcs.PrivateKeyName,
ProjectId: gcs.ProjectID,
ServiceAccount: gcs.ServiceAccount,
Expand All @@ -40,7 +38,6 @@ func (gcs *GCSProtocol) ConvertToExternal() *osspec.Protocol_Gcs {

func ConvertFromGCSExternal(ext *osspec.GCS) *GCSProtocol {
return &GCSProtocol{
BucketName: ext.BucketName,
PrivateKeyName: ext.PrivateKeyName,
ProjectID: ext.ProjectId,
ServiceAccount: ext.ServiceAccount,
Expand Down
Loading