From 771f9bf849cb45b68c08f59521ff8a6fc008fbef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Mon, 27 Apr 2020 13:59:20 +0200 Subject: [PATCH] azure: normalize the terms for Azure credentials The account field is actually a storage account and the secret key is actually a storage secret key. This is clearer to the user. --- internal/target/azure_target.go | 8 ++++---- internal/weldr/upload.go | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/internal/target/azure_target.go b/internal/target/azure_target.go index 09c32c651..458c9ae1e 100644 --- a/internal/target/azure_target.go +++ b/internal/target/azure_target.go @@ -1,10 +1,10 @@ package target type AzureTargetOptions struct { - Filename string `json:"filename"` - Account string `json:"account"` - AccessKey string `json:"accessKey"` - Container string `json:"container"` + Filename string `json:"filename"` + StorageAccount string `json:"storageAccount"` + StorageAccessKey string `json:"storageAccessKey"` + Container string `json:"container"` } func (AzureTargetOptions) isTargetOptions() {} diff --git a/internal/weldr/upload.go b/internal/weldr/upload.go index 812154611..fba7c3aee 100644 --- a/internal/weldr/upload.go +++ b/internal/weldr/upload.go @@ -36,9 +36,9 @@ type awsUploadSettings struct { func (awsUploadSettings) isUploadSettings() {} type azureUploadSettings struct { - Account string `json:"account"` - AccessKey string `json:"accessKey"` - Container string `json:"container"` + StorageAccount string `json:"storageAccount"` + StorageAccessKey string `json:"storageAccessKey"` + Container string `json:"container"` } func (azureUploadSettings) isUploadSettings() {} @@ -107,9 +107,9 @@ func targetsToUploadResponses(targets []*target.Target) []uploadResponse { case *target.AzureTargetOptions: upload.ProviderName = "azure" upload.Settings = &azureUploadSettings{ - Account: options.Account, - AccessKey: options.AccessKey, - Container: options.Container, + StorageAccount: options.StorageAccount, + StorageAccessKey: options.StorageAccessKey, + Container: options.Container, } uploads = append(uploads, upload) } @@ -140,10 +140,10 @@ func uploadRequestToTarget(u uploadRequest, imageType distro.ImageType) *target. case *azureUploadSettings: t.Name = "org.osbuild.azure" t.Options = &target.AzureTargetOptions{ - Filename: imageType.Filename(), - Account: options.Account, - AccessKey: options.AccessKey, - Container: options.Container, + Filename: imageType.Filename(), + StorageAccount: options.StorageAccount, + StorageAccessKey: options.StorageAccessKey, + Container: options.Container, } }