7241: Do not bother trying to add a volume if credential args are missing/empty.
authorTom Clegg <tom@curoverse.com>
Fri, 25 Sep 2015 19:31:27 +0000 (15:31 -0400)
committerTom Clegg <tom@curoverse.com>
Fri, 25 Sep 2015 19:31:55 +0000 (15:31 -0400)
services/keepstore/azure_blob_volume.go

index 8f93c18fd811ebc2b6ed385a7be805d5b4ace942..d45db9be1266fccc8d29e62d9800e417c07e5c8d 100644 (file)
@@ -40,6 +40,9 @@ func (s *azureVolumeAdder) Set(containerName string) error {
        if containerName == "" {
                return errors.New("no container name given")
        }
+       if azureStorageAccountName == "" || azureStorageAccountKeyFile == "" {
+               return errors.New("-azure-storage-account-name and -azure-storage-account-key-file arguments must given before -azure-storage-container-volume")
+       }
        accountKey, err := readKeyFromFile(azureStorageAccountKeyFile)
        if err != nil {
                return err