public static void ClassClean() { if (deleteUploadedBlob) { Utilities.GetBlobHandle(vhdBlobLocation, storageAccountKey.Primary).Blob.Delete(); } }
public void Initialize() { pass = true; testStartTime = DateTime.Now; storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccountName); // Set the source blob blobHandle = Utilities.GetBlobHandle(vhdBlobLocation, storageAccountKey.Primary); }
protected static void DownloadVhds() { storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccountName); foreach (var vhdFile in VhdFiles) { string vhdBlobLocation = string.Format("{0}{1}/{2}", blobUrlRoot, VhdFilesContainerName, vhdFile); var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdFile); if (!File.Exists(vhdLocalPath.FullName)) { // Set the source blob BlobHandle blobHandle = Utilities.GetBlobHandle(vhdBlobLocation, storageAccountKey.Primary); SaveVhd(blobHandle, vhdLocalPath, storageAccountKey.Primary); } } }