예제 #1
0
 public static void ClassClean()
 {
     if (deleteUploadedBlob)
     {
         Utilities.GetBlobHandle(vhdBlobLocation, storageAccountKey.Primary).Blob.Delete();
     }
 }
예제 #2
0
        public void Initialize()
        {
            pass              = true;
            testStartTime     = DateTime.Now;
            storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccountName);

            // Set the source blob
            blobHandle = Utilities.GetBlobHandle(vhdBlobLocation, storageAccountKey.Primary);
        }
예제 #3
0
        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);
                }
            }
        }