Skip to content

Commit

Permalink
eventhub types change
Browse files Browse the repository at this point in the history
  • Loading branch information
jananivMS committed Apr 13, 2020
1 parent 3cffd0c commit 00c1cad
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions api/v1alpha1/eventhub_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ type Destination struct {
// Name - Name for capture destination
// +kubebuilder:validation:Enum=EventHubArchive.AzureBlockBlob;EventHubArchive.AzureDataLake
Name string `json:"name,omitempty"`
// EventHubStorageAccount - Details of the storage account
EventHubStorageAccount EventHubStorageAccount `json:"eventHubStorageAccount,omitempty"`
// StorageAccount - Details of the storage account
StorageAccount EventHubStorageAccount `json:"storageAccount,omitempty"`
}

//CaptureDescription defines the properties required for eventhub capture
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/eventhub_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ var _ = Describe("Eventhub", func() {
ArchiveNameFormat: "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}",
BlobContainer: "foo-blob-container",
Name: "EventHubArchive.AzureBlockBlob",
EventHubStorageAccount: EventHubStorageAccount{
StorageAccount: EventHubStorageAccount{
ResourceGroup: "foo-resource-group",
AccountName: "fooaccountname",
},
Expand Down
2 changes: 1 addition & 1 deletion controllers/eventhub_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func TestEventHubControllerCreateAndDeleteCapture(t *testing.T) {
ArchiveNameFormat: "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}",
BlobContainer: bcName,
Name: "EventHubArchive.AzureBlockBlob",
EventHubStorageAccount: azurev1alpha1.EventHubStorageAccount{
StorageAccount: azurev1alpha1.EventHubStorageAccount{
ResourceGroup: rgName,
AccountName: saName,
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/resourcemanager/eventhubs/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ func getCaptureDescriptionPtr(captureDescription azurev1alpha1.CaptureDescriptio
// add capture details
var capturePtr *model.CaptureDescription

storage := captureDescription.Destination.EventHubStorageAccount
storage := captureDescription.Destination.StorageAccount
storageAccountResourceID := fmt.Sprintf(storageAccountResourceFmt, config.SubscriptionID(), storage.ResourceGroup, storage.AccountName)

if captureDescription.Enabled {
Expand Down
2 changes: 1 addition & 1 deletion pkg/resourcemanager/mock/eventhubs/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func getCaptureDescriptionPtr(captureDescription azurev1alpha1.CaptureDescriptio
// add capture details
var capturePtr *eventhub.CaptureDescription

storage := captureDescription.Destination.EventHubStorageAccount
storage := captureDescription.Destination.StorageAccount
storageAccountResourceID := fmt.Sprintf(storageAccountResourceFmt, config.SubscriptionID(), storage.ResourceGroup, storage.AccountName)

if captureDescription.Enabled {
Expand Down

0 comments on commit 00c1cad

Please sign in to comment.