Skip to content

Commit

Permalink
minor bug fixes throughout for ssl enablement
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Conway <richard@elastacloud.com>
  • Loading branch information
azurecoder committed Apr 7, 2013
1 parent 55f4cd4 commit a059f91
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Elastacloud.AzureManagement.Fluent/Clients/IStorageClient.cs
Expand Up @@ -22,6 +22,10 @@ public interface IStorageClient
/// </summary>
void CreateNewStorageAccount(string name, string location = "North Europe");
/// <summary>
/// Create the storage account if an account by the same name doesn't exist
/// </summary>
void CreateStorageAccountIfNotExists(string name, string location = "North Europe");
/// <summary>
/// Deletes a storage account if it exists
/// </summary>
void DeleteStorageAccount(string name);
Expand Down
11 changes: 11 additions & 0 deletions Elastacloud.AzureManagement.Fluent/Clients/StorageClient.cs
Expand Up @@ -41,6 +41,17 @@ public void CreateNewStorageAccount(string name, string location = "North Europe
create.Execute();
}

/// <summary>
/// Create the storage account if an account by the same name doesn't exist
/// </summary>
public void CreateStorageAccountIfNotExists(string name, string location = "North Europe")
{
if (GetStorageAccountList().All(a => a.Name != name))
{
CreateNewStorageAccount(name, location);
}
}

public void DeleteStorageAccount(string name)
{
var delete = new DeleteStorageAccountCommand(name)
Expand Down
Expand Up @@ -45,7 +45,8 @@ public class DeploymentTransaction : IServiceTransaction
public DeploymentTransaction(DeploymentManager manager)
{
_manager = manager;
_blobClient = new BlobClient(_manager.SubscriptionId, Constants.DefaultBlobContainerName, _manager.StorageAccountName, _manager.StorageAccountKey);
_blobClient = new BlobClient(_manager.SubscriptionId, Constants.DefaultBlobContainerName,
_manager.StorageAccountName, _manager.ManagementCertificate);
}

#region Implementation of IServiceTransaction
Expand Down

0 comments on commit a059f91

Please sign in to comment.