Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1576 from WindowsAzure/release

Release 0.6.15
  • Loading branch information...
commit c94a1be606ba44c319af112a8ef579861a957065 2 parents df72ec5 + 0036c3e
@ogail ogail authored
Showing with 21,199 additions and 4,229 deletions.
  1. +38 −0 ChangeLog.txt
  2. +10 −3 README.md
  3. +2 −2 WindowsAzurePowershell/setup/azurecmd.wxs
  4. +0 −13 WindowsAzurePowershell/src/ConsoleAppUtils/ConsoleApplicationStandardOutputEvents.cs
  5. +1 −0  WindowsAzurePowershell/src/Local.testsettings
  6. +4 −0 WindowsAzurePowershell/src/Management.ScenarioTest/CloudServiceTests/PublishAzureServiceScenarioTests.cs
  7. +2 −0  WindowsAzurePowershell/src/Management.ScenarioTest/CloudServiceTests/RemoveAzureServiceScenarioTests.cs
  8. +2 −0  WindowsAzurePowershell/src/Management.ScenarioTest/CloudServiceTests/StartAzureServiceScenarioTests.cs
  9. +2 −0  WindowsAzurePowershell/src/Management.ScenarioTest/CloudServiceTests/StopAzureServiceScenarioTests.cs
  10. +10 −0 WindowsAzurePowershell/src/Management.ScenarioTest/Common/Constants.cs
  11. +3 −1 WindowsAzurePowershell/src/Management.ScenarioTest/Management.ScenarioTest.csproj
  12. +2 −2 WindowsAzurePowershell/src/Management.ScenarioTest/Properties/AssemblyInfo.cs
  13. +1 −1  WindowsAzurePowershell/src/Management.ScenarioTest/Resources/Storage/StorageContainer.ps1
  14. +92 −6 WindowsAzurePowershell/src/Management.ScenarioTest/Resources/Websites/WebsitesTests.ps1
  15. +1 −1  WindowsAzurePowershell/src/Management.ScenarioTest/ServiceManagement/VMProvisionScenarioTests.cs
  16. +41 −1 WindowsAzurePowershell/src/Management.ScenarioTest/WebsitesTests/WebsitesTests.cs
  17. +47 −66 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/AddAzureVhdSASUriTest.cs
  18. +11 −13 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/AddAzureVhdTest.cs
  19. +14 −6 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/AzureVhdTest.cs
  20. +23 −0 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/ACLAction.cs
  21. +102 −45 ...ePowershell/src/Management.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AzureEndPointConfigInfo.cs
  22. +25 −0 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SetACLConfig.cs
  23. +49 −8 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs
  24. +507 −337 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/FunctionalTest.cs
  25. +27 −9 ...wershell/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureEndpointCmdletInfo.cs
  26. +26 −0 ...ershell/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureAclConfigCmdletInfo.cs
  27. +6 −1 ...rshell/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureDeploymentCmdletInfo.cs
  28. +79 −0 ...ershell/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureAclConfigCmdletInfo.cs
  29. +4 −18 ...wershell/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureEndpointCmdletInfo.cs
  30. +74 −0 .../Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureLoadBalancedEndpointCmdletInfo.cs
  31. +1 −1  ...owershell/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureServiceCmdletInfo.cs
  32. +22 −2 ...urePowershell/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/StopAzureVMCmdletInfo.cs
  33. +2 −0  ...rshell/src/Management.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellScript.cs
  34. +325 −0 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/LBandEndPointACLsTest.cs
  35. +32 −0 ...ment.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceDiagnosticsExtensionCmdletInfo.cs
  36. +35 −0 ...nt.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceRemoteDesktopExtensionCmdletInfo.cs
  37. +56 −0 ...erviceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceDiagnosticsExtensionConfigCmdletInfo.cs
  38. +59 −0 ...viceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceRemoteDesktopExtensionConfigCmdletInfo.cs
  39. +41 −0 ...t.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceDiagnosticsExtensionCmdletInfo.cs
  40. +44 −0 ...ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceRemoteDesktopExtensionCmdletInfo.cs
  41. +56 −0 ...ment.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceDiagnosticsExtensionCmdletInfo.cs
  42. +64 −0 ...nt.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceRemoteDesktopExtensionCmdletInfo.cs
  43. +43 −26 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/SaveAzureVhdTest.cs
  44. +1,151 −829 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs
  45. +1,216 −1,094 ...sAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs
  46. +245 −190 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/ServiceManagementTest.cs
  47. +594 −0 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/StopAzureVMTest.cs
  48. +234 −24 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/Utilities.cs
  49. +36 −2 WindowsAzurePowershell/src/Management.ServiceManagement.Test/Management.ServiceManagement.Test.csproj
  50. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement.Test/Properties/AssemblyInfo.cs
  51. +9 −0 WindowsAzurePowershell/src/Management.ServiceManagement.Test/Properties/Resource.Designer.cs
  52. +6 −2 WindowsAzurePowershell/src/Management.ServiceManagement.Test/Properties/Resource.resx
  53. +15 −0 WindowsAzurePowershell/src/Management.ServiceManagement.Test/Resources/HelloNoDiag.cscfg
  54. BIN  WindowsAzurePowershell/src/Management.ServiceManagement.Test/Resources/HelloNoDiag.cspkg
  55. BIN  WindowsAzurePowershell/src/Management.ServiceManagement.Test/Resources/RDPTest.exe
  56. BIN  WindowsAzurePowershell/src/Management.ServiceManagement.Test/Resources/clxtshar.dll
  57. +18 −0 WindowsAzurePowershell/src/Management.ServiceManagement.Test/Resources/da.xml
  58. +2 −0  WindowsAzurePowershell/src/Management.ServiceManagement.Test/Resources/nodiagpackage.csv
  59. +0 −20 WindowsAzurePowershell/src/Management.ServiceManagement.Test/Resources/pstestcert.cer
  60. BIN  WindowsAzurePowershell/src/Management.ServiceManagement.Test/Resources/pstestcert.pfx
  61. BIN  WindowsAzurePowershell/src/Management.ServiceManagement.Test/Resources/tclient.dll
  62. BIN  WindowsAzurePowershell/src/Management.ServiceManagement.Test/Resources/tclientmanagedex.dll
  63. +3 −3 ...wershell/src/Management.ServiceManagement.Test/UnitTests/Cmdlets/IaaS/PersistenVMs/GetAzureWinRMUriTests.cs
  64. BIN  WindowsAzurePowershell/src/Management.ServiceManagement.Test/lib/Security.Cryptography.dll
  65. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/AffinityGroups/GetAzureAffinityGroup.cs
  66. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/AffinityGroups/NewAzureAffinityGroup.cs
  67. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/AffinityGroups/RemoveAzureAffinityGroup.cs
  68. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/AffinityGroups/SetAzureAffinityGroup.cs
  69. +3 −2 WindowsAzurePowershell/src/Management.ServiceManagement/Certificates/AddAzureCertificate.cs
  70. +3 −2 WindowsAzurePowershell/src/Management.ServiceManagement/Certificates/GetAzureCertificate.cs
  71. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/Certificates/RemoveAzureCertificate.cs
  72. +3 −2 WindowsAzurePowershell/src/Management.ServiceManagement/Common/ValidateDeploymentUpgradeTypeAttribute.cs
  73. +2 −1  WindowsAzurePowershell/src/Management.ServiceManagement/Common/ValidateVMSizeAttribute.cs
  74. +109 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/BaseAzureServiceDiagnosticsExtension.cs
  75. +212 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/BaseAzureServiceExtensionCmdlet.cs
  76. +64 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/BaseAzureServiceRemoteDesktopExtension.cs
  77. +28 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/DiagnosticsExtensionContext.cs
  78. +271 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/ExtensionConfigurationBuilder.cs
  79. +31 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/ExtensionConfigurationInput.cs
  80. +270 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/ExtensionManager.cs
  81. +50 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/ExtensionRole.cs
  82. +95 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/GetAzureServiceDiagnosticsExtension.cs
  83. +95 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/GetAzureServiceRemoteDesktopExtension.cs
  84. +120 −0 ...owsAzurePowershell/src/Management.ServiceManagement/Extensions/NewAzureServiceDiagnosticsExtensionConfig.cs
  85. +119 −0 ...sAzurePowershell/src/Management.ServiceManagement/Extensions/NewAzureServiceRemoteDesktopExtensionConfig.cs
  86. +28 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/RemoteDesktopExtensionContext.cs
  87. +114 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/RemoveAzureServiceDiagnosticsExtension.cs
  88. +114 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/RemoveAzureServiceRemoteDesktopExtension.cs
  89. +144 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/SetAzureServiceDiagnosticsExtension.cs
  90. +144 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Extensions/SetAzureServiceRemoteDesktopExtension.cs
  91. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement/Helpers/CertUtils.cs
  92. +3 −4 WindowsAzurePowershell/src/Management.ServiceManagement/Helpers/Disks.cs
  93. +3 −2 WindowsAzurePowershell/src/Management.ServiceManagement/Helpers/PersistentVMHelper.cs
  94. +8 −7 WindowsAzurePowershell/src/Management.ServiceManagement/Helpers/WinRmConfigurationBuilder.cs
  95. +3 −3 WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/GetAzureDeployment.cs
  96. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/GetAzureLocation.cs
  97. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/GetAzureOSVersion.cs
  98. +5 −4 WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/GetAzureRole.cs
  99. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/GetAzureService.cs
  100. +8 −7 WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/MoveAzureDeployment.cs
  101. +101 −14 WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/NewAzureDeployment.cs
  102. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/NewAzureService.cs
  103. +4 −3 WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/RemoveAzureDeployment.cs
  104. +5 −4 WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/ResetAzureRoleInstance.cs
  105. +85 −14 WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/SetAzureDeployment.cs
  106. +4 −3 WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/SetAzureRole.cs
  107. +5 −4 WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/SetAzureService.cs
  108. +3 −3 WindowsAzurePowershell/src/Management.ServiceManagement/HostedServices/SetAzureWalkUpgradeDomain.cs
  109. +0 −4 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/AvailabilitySets/SetAzureAvailabilitySet.cs
  110. +2 −6 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/CertProvisioning/NewAzureSSHKey.cs
  111. +3 −3 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/DiskRepository/AddAzureDisk.cs
  112. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/DiskRepository/GetAzureDisk.cs
  113. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/DiskRepository/GetAzureVMImage.cs
  114. +3 −3 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/DiskRepository/RemoveAzureDisk.cs
  115. +2 −3 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImage.cs
  116. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/DiskRepository/UpdateAzureDisk.cs
  117. +0 −1  WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/DiskRepository/UpdateAzureVMImage.cs
  118. +5 −4 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Disks/AddAzureDataDisk.cs
  119. +3 −2 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Disks/RemoveAzureDataDisk.cs
  120. +3 −2 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Disks/SetAzureDataDisk.cs
  121. +3 −2 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Disks/SetAzureOSDisk.cs
  122. +107 −126 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Endpoints/AddAzureEndpoint.cs
  123. +91 −0 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Endpoints/GetAzureAclConfig.cs
  124. +4 −3 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Endpoints/GetAzureEndpoint.cs
  125. +42 −0 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Endpoints/NewAzureAclConfig.cs
  126. +78 −0 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Endpoints/RemoveAzureAclConfig.cs
  127. +3 −2 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Endpoints/RemoveAzureEndpoint.cs
  128. +138 −0 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Endpoints/SetAzureAclConfig.cs
  129. +34 −133 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Endpoints/SetAzureEndpoint.cs
  130. +207 −0 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Endpoints/SetAzureLoadBalancedEndpoint.cs
  131. +8 −7 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/IaaSDeploymentManagementCmdletBase.cs
  132. +7 −4 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Network/GatewayCmdletBase.cs
  133. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Network/GetAzureSubnet.cs
  134. +7 −7 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Network/GetAzureVNetConfig.cs
  135. +6 −6 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Network/GetAzureVNetSite.cs
  136. +4 −3 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/Network/SetAzureVNetConfig.cs
  137. +5 −4 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/AddAzureProvisioningConfig.cs
  138. +7 −6 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/GetAzureRemoteDesktopFile.cs
  139. +8 −7 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/GetAzureVM.cs
  140. +6 −5 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/GetAzureWinRMUri.cs
  141. +24 −24 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/NewAzureQuickVM.cs
  142. +19 −19 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/NewAzureVM.cs
  143. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/NewAzureVMConfig.cs
  144. +4 −4 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/RemoveAzureVM.cs
  145. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/RestartAzureVM.cs
  146. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/SaveAzureVMImage.cs
  147. +0 −1  WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/SetAzureVMSize.cs
  148. +3 −3 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/StartAzureVM.cs
  149. +58 −3 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/StopAzureVM.cs
  150. +5 −5 WindowsAzurePowershell/src/Management.ServiceManagement/IaaS/PersistentVMs/UpdateAzureVM.cs
  151. +53 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Management.ServiceManagement.csproj
  152. +3,357 −249 ...owershell/src/Management.ServiceManagement/Microsoft.WindowsAzure.Management.ServiceManagement.dll-Help.xml
  153. +4 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Model/InputEndpointContext.cs
  154. +105 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Model/NetworkAclObject.cs
  155. +59 −0 WindowsAzurePowershell/src/Management.ServiceManagement/Model/NetworkAclRule.cs
  156. +40 −38 WindowsAzurePowershell/src/Management.ServiceManagement/Model/PSSyncOutputEvents.cs
  157. +4 −3 WindowsAzurePowershell/src/Management.ServiceManagement/Model/VirtualNetworkConfigContext.cs
  158. +4 −3 WindowsAzurePowershell/src/Management.ServiceManagement/Model/VirtualNetworkSupportedDevicesContext.cs
  159. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement/Properties/AssemblyInfo.cs
  160. +1,305 −72 WindowsAzurePowershell/src/Management.ServiceManagement/Properties/Resources.Designer.cs
  161. +532 −104 WindowsAzurePowershell/src/Management.ServiceManagement/Properties/Resources.resx
  162. +3 −2 WindowsAzurePowershell/src/Management.ServiceManagement/StorageServices/AddAzureVhdCommand.cs
  163. +0 −1  WindowsAzurePowershell/src/Management.ServiceManagement/StorageServices/CloudPageBlobObjectFactory.cs
  164. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/StorageServices/GetAzureStorageAccount.cs
  165. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/StorageServices/GetAzureStorageKey.cs
  166. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement/StorageServices/NewAzureStorageAccount.cs
  167. +2 −2 WindowsAzurePowershell/src/Management.ServiceManagement/StorageServices/RemoveAzureStorageAccount.cs
  168. +1 −1  WindowsAzurePowershell/src/Management.ServiceManagement/StorageServices/SaveAzureVhdCommand.cs
  169. +2 −1  WindowsAzurePowershell/src/Management.ServiceManagement/StorageServices/StorageCredentialsFactory.cs
  170. +2 −2 WindowsAzurePowershell/src/Management.SqlDatabase.Test/Properties/AssemblyInfo.cs
  171. +31 −31 WindowsAzurePowershell/src/Management.SqlDatabase.Test/Resources/MockSessions.xml
  172. +2 −2 WindowsAzurePowershell/src/Management.SqlDatabase/Properties/AssemblyInfo.cs
  173. +624 −5 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Server/ServerContextInternal.cs
  174. +77 −16 WindowsAzurePowershell/src/Management.SqlDatabase/Services/Server/ServerDataService.csdl
  175. +2 −2 WindowsAzurePowershell/src/Management.Storage.MsTest2/Properties/AssemblyInfo.cs
  176. +2 −2 WindowsAzurePowershell/src/Management.Storage.MsTestLib/Properties/AssemblyInfo.cs
  177. +3 −3 WindowsAzurePowershell/src/Management.Storage.MsTestLib/TestConfig.cs
  178. +1 −1  WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Agent.cs
  179. +5 −4 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/CLICommonBVT.cs
  180. +4 −2 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTP/AnonymousBVT.cs
  181. +4 −5 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTP/ConnectionStringBVT.cs
  182. +4 −5 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTP/EnvConnectionStringBVT.cs
  183. +5 −3 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTP/NameKeyContextBVT.cs
  184. +52 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTP/SecondaryEndPointBVT.cs
  185. +39 −2 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTPS/AnonymousBVT.cs
  186. +3 −3 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTPS/ConnectionStringBVT.cs
  187. +3 −6 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTPS/EnvConnectionStringBVT.cs
  188. +31 −5 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTPS/NameKeyContextBVT.cs
  189. +52 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTPS/SecondaryEndPointBVT.cs
  190. +3 −5 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/HTTPS/SubScriptionBVT.cs
  191. +7 −15 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/BVT/StorageBVT.cs
  192. +270 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/CLIBlobFunc.cs
  193. +492 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/CLIContainerFunc.cs
  194. +259 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/CLIContextFunc.cs
  195. +418 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/CLIQueueFunc.cs
  196. +375 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/CLITableFunc.cs
  197. +22 −21 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Common/TestBase.cs
  198. +491 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Blob/GetBlob.cs
  199. +346 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Blob/GetBlobContent.cs
  200. +128 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Blob/GetContainer.cs
  201. +332 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Blob/GetCopyState.cs
  202. +61 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Blob/NewContainer.cs
  203. +300 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Blob/RemoveBlob.cs
  204. +63 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Blob/RemoveContainer.cs
  205. +417 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Blob/SetBlobContent.cs
  206. +48 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Blob/SetContainerAcl.cs
  207. +389 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Blob/StartCopy.cs
  208. +191 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Blob/StopCopy.cs
  209. +78 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Queue/GetQueue.cs
  210. +63 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Queue/RemoveQueue.cs
  211. +259 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/StorageContext.cs
  212. +89 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Functional/Table/RemoveTable.cs
  213. +217 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/GB18030Test/BlobContentTest.cs
  214. +23 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Management.Storage.ScenarioTest.csproj
  215. +15 −4 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/PowerShellAgent.cs
  216. +2 −2 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Properties/AssemblyInfo.cs
  217. +24 −51 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/TestData.xml
  218. +15 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Util/CloudBlobUtil.cs
  219. +42 −10 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Util/FileUtil.cs
  220. +66 −0 WindowsAzurePowershell/src/Management.Storage.ScenarioTest/Utility.cs
  221. +2 −2 WindowsAzurePowershell/src/Management.Storage.StorageTestLib/Properties/AssemblyInfo.cs
  222. +1 −0  WindowsAzurePowershell/src/Management.Storage.StorageTestLib/TestConstants.cs
  223. +6 −0 WindowsAzurePowershell/src/Management.Storage.Test/Common/Cmdlet/NewAzureStorageContextTest.cs
  224. +1 −0  WindowsAzurePowershell/src/Management.Storage.Test/Management.Storage.Test.csproj
  225. +2 −2 WindowsAzurePowershell/src/Management.Storage.Test/Properties/AssemblyInfo.cs
  226. +30 −4 WindowsAzurePowershell/src/Management.Storage/Blob/StorageDataMovementCmdletBase.cs
  227. +63 −26 WindowsAzurePowershell/src/Management.Storage/Common/Cmdlet/NewAzureStorageContext.cs
  228. +1 −1  WindowsAzurePowershell/src/Management.Storage/Management.Storage.csproj
  229. +183 −55 WindowsAzurePowershell/src/Management.Storage/Microsoft.WindowsAzure.Management.Storage.dll-Help.xml
  230. +2 −2 WindowsAzurePowershell/src/Management.Storage/Properties/AssemblyInfo.cs
  231. +24 −6 WindowsAzurePowershell/src/Management.Storage/Resources.Designer.cs
  232. +19 −12 WindowsAzurePowershell/src/Management.Storage/Resources.resx
  233. +82 −80 WindowsAzurePowershell/src/Management.Test.Utilities/CloudService/SimpleServiceManagement.cs
  234. +3 −3 WindowsAzurePowershell/src/Management.Test.Utilities/Common/AzureAssert.cs
  235. +4 −3 WindowsAzurePowershell/src/Management.Test.Utilities/Common/FileSystemHelper.cs
  236. +1 −1  WindowsAzurePowershell/src/Management.Test.Utilities/Common/RemoveAzurePublishSettings.cs
  237. +2 −2 WindowsAzurePowershell/src/Management.Test.Utilities/Properties/AssemblyInfo.cs
  238. +2 −5 WindowsAzurePowershell/src/Management.Test.Utilities/Websites/WebsitesTestBase.cs
  239. +11 −11 WindowsAzurePowershell/src/Management.Test/Common/CmdletSubscriptionExtensionsTest.cs
  240. +0 −39 WindowsAzurePowershell/src/Management.Test/Common/GeneralTest.cs
  241. +137 −53 ...sAzurePowershell/src/Management.Test/Common/{GlobalComponentsTests.cs → GlobalSettingsManagerTests.cs}
Sorry, we could not display the entire diff because too many files (318) changed.
View
38 ChangeLog.txt
@@ -1,3 +1,41 @@
+2013.06.03 Version 0.6.15
+* Introduced the environment concept to support differnt Windows Azure environments
+ * Get-AzureEnvironment cmdlet to return all the out-of-box Windows Azure environments
+ * -Environment parameter in the following cmdlets to specify which environment to target
+ * Get-AzurePublishSettingsFile
+ * Show-AzurePortal
+* Windows Azure Web Site application diagnostics cmdlets
+ * Enable-AzureWebsiteApplicationDiagnostic
+ * Disable-AzureWebsiteApplicationDiagnostic
+* Stop-AzureVM
+ * Changed the behavior to deprovision the VM after stopping it
+ * -StayProvisioned parameter to keep the VM provisioned after stopping it
+* Windows Azure Cloud Services remote desktop extension cmdlets
+ * New-AzureServiceRemoteDesktopExtensionConfig
+ * Get-AzureServiceRemoteDesktopExtension
+ * Set-AzureServiceRemoteDesktopExtension
+ * Remove-AzureServiceRemoteDesktopExtension
+* Windows Azure Cloud Services diagnostics extension cmdlets
+ * New-AzureServiceDiagnosticsExtensionConfig
+ * Get-AzureServiceDiagnosticsExtension
+ * Set-AzureServiceDiagnosticsExtension
+ * Remove-AzureServiceDiagnosticsExtension
+* Windows Azure Virtual Machine endpoint enhancements
+ * Cmdlets to create ACL configration objects
+ * New-AzureVMAclConfig
+ * Get-AzureVMAclConfig
+ * Set-AzureVMAclConfig
+ * Remove-AzureVMAclConfig
+ * -ACL parameter to support ACL in
+ * Add-AzureEndpoint
+ * Set-AzureEndpoint
+ * -DirectServerReturn prameter in
+ * Add-AzureEndpoint
+ * Set-AzureEndpoint
+ * Set-AzureLoadBalancedEndpoint cmdlet to modify load balanced endpoints
+* Bug fixes
+ * Fixed New-AzureSqlDatabaseServerContext model mismatch warning
+
2013.05.08 Version 0.6.14
* Windows Azure Storage Table cmdlets
* Get-AzureStorageTable
View
13 README.md
@@ -9,20 +9,27 @@ For documentation on how to build and deploy applications to Windows Azure pleas
* Account
* Get and import Azure publish settings
+* Environment
+ * Get the differnet out-of-box Windows Azure environments (like AzureCloud and AzureChinaCloud)
+ * Get Azure publish settings for a particular environment
* Subscription
* Manage Azure subscription
* Manage AffinityGroup
* Website
* Manage website, such as CRUD, start and stop.
* Diagnostics
+ * Configure site and application diagnostics
* Log streaming
* Save log
-* Cloud service
+* Cloud Services
* Create scaffolding for cloud service and role. Role support includes Node.js, PHP, Django and Cache.
* Manage cloud service and role, such as CRUD, start and stop.
* Enable/Disable remote desktop.
* Start/Stop Azure emulator.
* Manage certificate.
+ * Manage cloud service extensions
+ * Remote desktoo
+ * Diagnostics
* Storage
* Manage storage account and access key.
* Manage storage container and blob.
@@ -37,7 +44,7 @@ For documentation on how to build and deploy applications to Windows Azure pleas
* Manage VM, such as CRUD, import/export and start/stop/restart.
* Manage VM image, such as CRUD.
* Manage disk, such as CRUD.
- * Manage VM endpoint, such as CRUD.
+ * Manage VM endpoint, such as CRUD and ACL.
* Get/Set VM sub net.
* Manage certificate and SSH key.
* PowerShell remoting
@@ -123,7 +130,7 @@ To get the source code of the SDK via git just type:
4. You are now ready to publish to the cloud service. Go ahead and register for a Windows Azure account and make sure you have your credentials handy.
-5. Get your account's publish settings and save them to a file by typing ```Get-AzurePublishSettingsFile```
+5. Get your account's publish settings and save them to a file by typing ```Get-AzurePublishSettingsFile```. It will by default target the public Azure. If you want to target environment like Azure in China, use `Get-AzureEnvironment` to see the environments we support and use `Get-AzurePublishSettingsFile -Environment` to get the publish settings for the paticular environment.
6. Now import the settings
View
4 WindowsAzurePowershell/setup/azurecmd.wxs
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <?define productName="Windows Azure PowerShell - May 2013" ?>
+ <?define productName="Windows Azure PowerShell - June 2013" ?>
<?define sourceDir="$(var.SolutionDir)..\..\Package\$(var.Configuration)" ?>
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
- <?define version="0.6.14" ?>
+ <?define version="0.6.15" ?>
<?define azureSdkVersion="1.8" ?>
<?define versionedStartMenuFolder="Windows Azure" ?>
View
13 WindowsAzurePowershell/src/ConsoleAppUtils/ConsoleApplicationStandardOutputEvents.cs
@@ -134,19 +134,6 @@ override public void LogProgress(string fmt, params object[] args)
}
}
- public void ShowBanner(string title,string version)
- {
- FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(
- System.Reflection.Assembly.GetExecutingAssembly().Location);
- if (version == null)
- version = versionInfo.FileVersion;
-
- LogMessage("Windows(R) Azure(TM) {0} version {1}",title, version );
- LogMessage("for Microsoft(R) .NET Framework 3.5");
- LogMessage(versionInfo.LegalCopyright);
- LogMessage("");
- }
-
public void CommandUnknown(string commandName)
{
LogError("Command {0} is unknown.", commandName);
View
1  WindowsAzurePowershell/src/Local.testsettings
@@ -21,6 +21,7 @@
<DeploymentItem filename="Management.ServiceManagement.Test\VhdFiles\fixed_50_child01.vhd" />
</Deployment>
<Execution>
+ <Timeouts testTimeout="3000000" />
<TestTypeSpecific>
<UnitTestRunConfig testTypeId="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b">
<AssemblyResolution>
View
4 WindowsAzurePowershell/src/Management.ScenarioTest/CloudServiceTests/PublishAzureServiceScenarioTests.cs
@@ -37,6 +37,8 @@ public override void TestSetup()
[TestMethod]
[TestCategory(Category.All)]
[TestCategory(Category.CloudService)]
+ [TestCategory(Category.OneSDK)]
+ [TestCategory(Category.CIT)]
public void TestPublishAzureCacheService()
{
RunPowerShellTest("Test-PublishCacheService");
@@ -45,6 +47,8 @@ public void TestPublishAzureCacheService()
[TestMethod]
[TestCategory(Category.All)]
[TestCategory(Category.CloudService)]
+ [TestCategory(Category.OneSDK)]
+ [TestCategory(Category.CIT)]
public void TestUpdateAzureCacheService()
{
RunPowerShellTest("Test-UpdateCacheService");
View
2  WindowsAzurePowershell/src/Management.ScenarioTest/CloudServiceTests/RemoveAzureServiceScenarioTests.cs
@@ -77,6 +77,8 @@ public void TestRemoveAzureServiceWhatIfWithInvalidName()
[TestMethod]
[TestCategory(Category.All)]
[TestCategory(Category.CloudService)]
+ [TestCategory(Category.OneSDK)]
+ [TestCategory(Category.CIT)]
public void TestRemoveAzureServicePipedFromGetAzureService()
{
RunPowerShellTest("Test-RemoveAzureServicePipedFromGetAzureService");
View
2  WindowsAzurePowershell/src/Management.ScenarioTest/CloudServiceTests/StartAzureServiceScenarioTests.cs
@@ -53,6 +53,8 @@ public void TestStartAzureServiceWithNonExistingService()
[TestMethod]
[TestCategory(Category.All)]
[TestCategory(Category.CloudService)]
+ [TestCategory(Category.OneSDK)]
+ [TestCategory(Category.CIT)]
public void TestStartAzureServiceWithProductionDeployment()
{
RunPowerShellTest("Test-StartAzureServiceWithProductionDeployment");
View
2  WindowsAzurePowershell/src/Management.ScenarioTest/CloudServiceTests/StopAzureServiceScenarioTests.cs
@@ -53,6 +53,8 @@ public void TestStopAzureServiceWithNonExistingService()
[TestMethod]
[TestCategory(Category.All)]
[TestCategory(Category.CloudService)]
+ [TestCategory(Category.OneSDK)]
+ [TestCategory(Category.CIT)]
public void TestStopAzureServiceWithProductionDeployment()
{
RunPowerShellTest("Test-StopAzureServiceWithProductionDeployment");
View
10 WindowsAzurePowershell/src/Management.ScenarioTest/Common/Constants.cs
@@ -3,6 +3,8 @@ namespace Microsoft.WindowsAzure.Management.ScenarioTest.Common
{
public class Category
{
+ // Project
+
public const string All = "All";
public const string ServiceBus = "ServiceBus";
@@ -18,5 +20,13 @@ public class Category
public const string Store = "Store";
public const string ServiceManagement = "ServiceManagement";
+
+ // Owners
+
+ public const string OneSDK = "OneSDK";
+
+ // Acceptance type
+
+ public const string CIT = "CIT";
}
}
View
4 WindowsAzurePowershell/src/Management.ScenarioTest/Management.ScenarioTest.csproj
@@ -165,7 +165,9 @@
<None Include="Resources\CloudService\Cache\mc.tgz">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Include="packages.config" />
+ <None Include="packages.config">
+ <SubType>Designer</SubType>
+ </None>
<Resource Include="Resources\ServiceManagement\VMProvisionTests.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
View
4 WindowsAzurePowershell/src/Management.ScenarioTest/Properties/AssemblyInfo.cs
@@ -41,5 +41,5 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.6.14")]
-[assembly: AssemblyFileVersion("0.6.14")]
+[assembly: AssemblyVersion("0.6.15")]
+[assembly: AssemblyFileVersion("0.6.15")]
View
2  WindowsAzurePowershell/src/Management.ScenarioTest/Resources/Storage/StorageContainer.ps1
@@ -104,7 +104,7 @@ Tests using New-AzureStorageContainer with invalid container name
function Test-NewExistsAzureStorageContainerWithInvalidContainerName
{
$invalidName = "a";
- Assert-Throws {New-AzureStorageContainer $invalidName} "Container name '$invalidName' is invalid."
+ Assert-Throws {New-AzureStorageContainer $invalidName}
}
<#
View
98 WindowsAzurePowershell/src/Management.ScenarioTest/Resources/Websites/WebsitesTests.ps1
@@ -220,7 +220,7 @@ function Test-GetAzureWebsite
# Setup
$name = Get-WebsiteName
New-AzureWebsite $name
- Enable-AzureWebsiteDiagnostic -Name $name -Type Application -Output FileSystem -LogLevel Error
+ Enable-AzureWebsiteApplicationDiagnostic -Name $name -Type Application -Output FileSystem -LogLevel Error
#Test
$config = Get-AzureWebsite -Name $name
@@ -308,11 +308,11 @@ function Test-RestartAzureWebsite
Assert-AreEqual "Running" $website.State
}
-########################################################################### Enable-AzureWebsiteDiagnostic Scenario Tests ###########################################################################
+########################################################################### Enable-AzureWebsiteApplicationDiagnostic Scenario Tests ###########################################################################
<#
.SYNOPSIS
-Tests Enable-AzureWebsiteDiagnostic with storage table
+Tests Enable-AzureWebsiteApplicationDiagnostic with storage table
#>
function Test-EnableApplicationDiagnosticOnTableStorage
{
@@ -325,7 +325,7 @@ function Test-EnableApplicationDiagnosticOnTableStorage
New-AzureStorageAccount -ServiceName $storageName -Location $defaultLocation
# Test
- Enable-AzureWebsiteDiagnostic -Name $name -Type Application -Output StorageTable -LogLevel Warning -StorageAccountName $storageName
+ Enable-AzureWebsiteApplicationDiagnostic -Name $name -Storage -LogLevel Warning -StorageAccountName $storageName
# Assert
$website = Get-AzureWebsite $name
@@ -339,7 +339,7 @@ function Test-EnableApplicationDiagnosticOnTableStorage
<#
.SYNOPSIS
-Tests Enable-AzureWebsiteDiagnostic with file system
+Tests Enable-AzureWebsiteApplicationDiagnostic with file system
#>
function Test-EnableApplicationDiagnosticOnFileSystem
{
@@ -348,10 +348,96 @@ function Test-EnableApplicationDiagnosticOnFileSystem
New-AzureWebsite $name
# Test
- Enable-AzureWebsiteDiagnostic -Name $name -Type Application -Output FileSystem -LogLevel Warning
+ Enable-AzureWebsiteApplicationDiagnostic -Name $name -File -LogLevel Warning
# Assert
$website = Get-AzureWebsite $name
Assert-True { $website.AzureDriveTraceEnabled }
Assert-AreEqual Warning $website.AzureDriveTraceLevel
+}
+
+<#
+.SYNOPSIS
+Tests Enable-AzureWebsiteApplicationDiagnostic when updating a log level and expects to pass.
+#>
+function Test-UpdateTheDiagnositicLogLevel
+{
+ # Setup
+ $name = Get-WebsiteName
+ New-AzureWebsite $name
+ Enable-AzureWebsiteApplicationDiagnostic -Name $name -File -LogLevel Verbose
+
+ # Test
+ Enable-AzureWebsiteApplicationDiagnostic -Name $name -File -LogLevel Warning
+
+ # Assert
+ $website = Get-AzureWebsite $name
+ Assert-True { $website.AzureDriveTraceEnabled }
+ Assert-AreEqual Warning $website.AzureDriveTraceLevel
+}
+
+########################################################################### Disable-AzureWebsiteApplicationDiagnostic Scenario Tests ###########################################################################
+
+<#
+.SYNOPSIS
+Tests Disable-AzureWebsiteApplicationDiagnostic with storage table
+#>
+function Test-DisableApplicationDiagnosticOnTableStorage
+{
+ # Setup
+ $name = Get-WebsiteName
+ $storageName = $(Get-WebsiteName).ToLower()
+ $locations = Get-AzureLocation
+ $defaultLocation = $locations[0].Name
+ New-AzureWebsite $name
+ New-AzureStorageAccount -ServiceName $storageName -Location $defaultLocation
+ Enable-AzureWebsiteApplicationDiagnostic -Name $name -Storage -LogLevel Warning -StorageAccountName $storageName
+
+ # Test
+ Disable-AzureWebsiteApplicationDiagnostic -Name $name -Storage
+
+ # Assert
+ $website = Get-AzureWebsite $name
+ Assert-False { $website.AzureTableTraceEnabled }
+ Assert-AreEqual Warning $website.AzureTableTraceLevel
+ Assert-NotNull $website.AppSettings["CLOUD_STORAGE_ACCOUNT"]
+
+ # Cleanup
+ Remove-AzureStorageAccount $storageName
+}
+
+<#
+.SYNOPSIS
+Tests Disable-AzureWebsiteApplicationDiagnostic with file system
+#>
+function Test-DisableApplicationDiagnosticOnFileSystem
+{
+ # Setup
+ $name = Get-WebsiteName
+ New-AzureWebsite $name
+ Enable-AzureWebsiteApplicationDiagnostic -Name $name -File -LogLevel Warning
+
+ # Test
+ Disable-AzureWebsiteApplicationDiagnostic -Name $name -File
+
+ # Assert
+ $website = Get-AzureWebsite $name
+ Assert-False { $website.AzureDriveTraceEnabled }
+ Assert-AreEqual Warning $website.AzureDriveTraceLevel
+}
+
+########################################################################### Get-AzureWebsiteLocation Scenario Tests ###########################################################################
+
+<#
+.SYNOPSIS
+Tests Get-AzureWebsiteLocation and expects to return valid websites.
+#>
+function Test-GetAzureWebsiteLocation
+{
+ # Test
+ $locations = Get-AzureWebsiteLocation;
+
+ # Assert
+ Assert-NotNull { $locations }
+ Assert-True { $locations.Count -gt 0 }
}
View
2  WindowsAzurePowershell/src/Management.ScenarioTest/ServiceManagement/VMProvisionScenarioTests.cs
@@ -47,7 +47,7 @@ public void NewWindowsAzureQuickVM()
ServiceManagementCmdletTestHelper vmPowershellCmdlets = new ServiceManagementCmdletTestHelper();
string imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows", "testvmimage" }, false);
- string locationName = vmPowershellCmdlets.GetAzureLocationName(new[] { Resource.Location }, false);
+ string locationName = vmPowershellCmdlets.GetAzureLocationName(new[] { Resource.Location });
string newAzureQuickVMName = Utilities.GetUniqueShortName("PSTestVM");
string newAzureQuickVMSvcName = Utilities.GetUniqueShortName("PSTestService");
View
42 WindowsAzurePowershell/src/Management.ScenarioTest/WebsitesTests/WebsitesTests.cs
@@ -181,7 +181,7 @@ public void TestRestartAzureWebsite()
#endregion
- #region Enable-AzureWebsiteDiagnostic Scenario Tests
+ #region Enable-AzureWebsiteApplicationDiagnostic Scenario Tests
[TestMethod]
[TestCategory(Category.All)]
@@ -199,6 +199,46 @@ public void TestEnableApplicationDiagnosticOnFileSystem()
RunPowerShellTest("Test-EnableApplicationDiagnosticOnFileSystem");
}
+ [TestMethod]
+ [TestCategory(Category.All)]
+ [TestCategory(Category.Websites)]
+ public void TestUpdateTheDiagnositicLogLevel()
+ {
+ RunPowerShellTest("Test-UpdateTheDiagnositicLogLevel");
+ }
+
+ #endregion
+
+ #region Disable-AzureWebsiteApplicationDiagnostic Scenario Tests
+
+ [TestMethod]
+ [TestCategory(Category.All)]
+ [TestCategory(Category.Websites)]
+ public void TestDisableApplicationDiagnosticOnTableStorage()
+ {
+ RunPowerShellTest("Test-DisableApplicationDiagnosticOnTableStorage");
+ }
+
+ [TestMethod]
+ [TestCategory(Category.All)]
+ [TestCategory(Category.Websites)]
+ public void TestDisableApplicationDiagnosticOnFileSystem()
+ {
+ RunPowerShellTest("Test-DisableApplicationDiagnosticOnFileSystem");
+ }
+
+ #endregion
+
+ #region Get-AzureWebsiteLocation Scenario Tests
+
+ [TestMethod]
+ [TestCategory(Category.All)]
+ [TestCategory(Category.Websites)]
+ public void TestGetAzureWebsiteLocation()
+ {
+ RunPowerShellTest("Test-GetAzureWebsiteLocation");
+ }
+
#endregion
}
}
View
113 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/AddAzureVhdSASUriTest.cs
@@ -40,32 +40,18 @@ public void Initialize()
Assert.Inconclusive("No Subscription is selected!");
}
- pass = true;
+ pass = false;
testStartTime = DateTime.Now;
storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccount);
-
- // Remove all subscriptions. SAS Uri should work without a subscription.
- try
- {
- vmPowershellCmdlets.RunPSScript("Get-AzureSubscription | Remove-AzureSubscription -Force");
- }
- catch
- {
- Console.WriteLine("Subscriptions cannot be removed");
- }
- // Check if all subscriptions are removed.
try
{
- vmPowershellCmdlets.GetAzureSubscription();
- Assert.Fail("Subscription was not removed!");
+ vmPowershellCmdlets.RunPSScript("Get-AzureStorageContainer -Name " + vhdContainerName);
}
- catch (Exception e)
+ catch
{
- if(e is AssertFailedException)
- {
- throw;
- }
+ // Create a container.
+ vmPowershellCmdlets.RunPSScript("New-AzureStorageContainer -Name " + vhdContainerName);
}
}
@@ -93,8 +79,10 @@ public void UploadDiskSasUri()
string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i);
try
{
- Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2);
+ Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2);
+ vmPowershellCmdlets.RemoveAzureSubscriptions();
var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2);
+ ReImportSubscription();
Console.WriteLine("Finished uploading: {0}", destinationSasUri2);
// Verify the upload.
@@ -128,14 +116,15 @@ public void UploadDiskSasUri()
Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds);
System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0} {1},{2}", testName, vhdName, (testEndTime - testStartTime).TotalSeconds) });
+ pass = true;
}
private string CreateSasUriWithPermission(string vhdName, int p)
{
// Set the destination
- string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
- string vhdDestUri = blobUrlRoot + vhdBlobName;
-
+ string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
+ string httpsBlobUrlRoot = string.Format("https:{0}", blobUrlRoot.Substring(blobUrlRoot.IndexOf('/')));
+ string vhdDestUri = httpsBlobUrlRoot + vhdBlobName;
var destinationBlob2 = new CloudPageBlob(new Uri(vhdDestUri), new StorageCredentials(storageAccountKey.StorageAccountName, storageAccountKey.Primary));
var policy2 = new SharedAccessBlobPolicy()
@@ -173,9 +162,12 @@ public void UploadDiskOverwriteSasUri()
string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i);
try
{
- Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2);
+ Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2);
+
+ vmPowershellCmdlets.RemoveAzureSubscriptions();
vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2);
var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2, true);
+ ReImportSubscription();
Console.WriteLine("Finished uploading: {0}", destinationSasUri2);
// Verify the upload.
@@ -205,6 +197,7 @@ public void UploadDiskOverwriteSasUri()
}
DateTime testEndTime = DateTime.Now;
+ pass = true;
Console.WriteLine("{0} test passed at {1}.", testName, testEndTime);
Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds);
@@ -236,9 +229,10 @@ public void UploadDiskOverwriteNonExistSasUri()
string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i);
try
{
- Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2);
- //vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUri2, vhdLocalPath.FullName));
+ Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2);
+ vmPowershellCmdlets.RemoveAzureSubscriptions();
var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2, true);
+ ReImportSubscription();
Console.WriteLine("Finished uploading: {0}", destinationSasUri2);
// Verify the upload.
@@ -272,6 +266,7 @@ public void UploadDiskOverwriteNonExistSasUri()
Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds);
System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) });
+ pass = true;
}
/// <summary>
@@ -297,7 +292,8 @@ public void UploadDiskSecondWithoutOverwriteSasUri()
string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i);
try
{
- Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2);
+ Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2);
+ vmPowershellCmdlets.RemoveAzureSubscriptions();
var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2);
try
@@ -313,6 +309,7 @@ public void UploadDiskSecondWithoutOverwriteSasUri()
}
// Verify the upload.
+ ReImportSubscription();
AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUri2, vhdLocalPath, vhdUploadContext, md5hash);
Console.WriteLine("Test success with permission: {0}", i);
}
@@ -331,6 +328,7 @@ public void UploadDiskSecondWithoutOverwriteSasUri()
}
}
+ pass = true;
DateTime testEndTime = DateTime.Now;
Console.WriteLine("{0} test passed at {1}.", testName, testEndTime);
Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds);
@@ -362,8 +360,10 @@ public void UploadDiskThreadNumberSasUri()
string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i);
try
{
- Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2);
+ Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2);
+ vmPowershellCmdlets.RemoveAzureSubscriptions();
var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2, 16);
+ ReImportSubscription();
Console.WriteLine("uploading completed: {0}", vhdName);
// Verify the upload.
@@ -397,6 +397,7 @@ public void UploadDiskThreadNumberSasUri()
Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds);
System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) });
+ pass = true;
}
/// <summary>
@@ -423,13 +424,15 @@ public void UploadDiskThreadNumberOverwriteSasUri()
string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i);
try
{
- Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2);
+ Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2);
+ vmPowershellCmdlets.RemoveAzureSubscriptions();
vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2);
Console.WriteLine("uploaded: {0}", vhdName);
var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2, 16, true);
Console.WriteLine("uploading overwrite completed: {0}", vhdName);
// Verify the upload.
+ ReImportSubscription();
AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUri2, vhdLocalPath, vhdUploadContext, md5hash);
Console.WriteLine("Test success with permission: {0}", i);
}
@@ -448,6 +451,7 @@ public void UploadDiskThreadNumberOverwriteSasUri()
}
}
+ pass = true;
DateTime testEndTime = DateTime.Now;
Console.WriteLine("{0} test passed at {1}.", testName, testEndTime);
Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds);
@@ -486,19 +490,23 @@ public void PatchFirstLevelDifferencingDiskSasUri()
string destinationSasUri3 = CreateSasUriWithPermission(childVhdName, i);
try
{
- Console.WriteLine("uploads {0} to {1}", baseVhdName, destinationSasUri2);
+ Console.WriteLine("uploads {0} to {1}", baseVhdName, destinationSasUri2);
+ vmPowershellCmdlets.RemoveAzureSubscriptions();
var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(baseVhdLocalPath, destinationSasUri2, true);
Console.WriteLine("uploading completed: {0}", baseVhdName);
// Verify the upload.
+ ReImportSubscription();
AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUri2, baseVhdLocalPath, vhdUploadContext, md5hashBase, false);
- Console.WriteLine("uploads {0} to {1}", childVhdName, destinationSasUri3);
+ Console.WriteLine("uploads {0} to {1}", childVhdName, destinationSasUri3);
+ vmPowershellCmdlets.RemoveAzureSubscriptions();
var patchVhdUploadContext = vmPowershellCmdlets.AddAzureVhd(childVhdLocalPath, destinationSasUri3, destinationSasUri2);
Console.WriteLine("uploading completed: {0}", childVhdName);
// Verify the upload.
+ ReImportSubscription();
AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUri3, childVhdLocalPath, patchVhdUploadContext, md5hash);
Console.WriteLine("Test success with permission: {0}", i);
}
@@ -510,6 +518,7 @@ public void PatchFirstLevelDifferencingDiskSasUri()
}
}
+ pass = true;
DateTime testEndTime = DateTime.Now;
Console.WriteLine("{0} test passed at {1}.", testName, testEndTime);
Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds);
@@ -533,7 +542,7 @@ public void PatchSasUriNormalBaseShouldFail()
Assert.IsTrue(File.Exists(baseVhdLocalPath.FullName), "VHD file not exist={0}", baseVhdLocalPath);
// Set the destination
- string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(baseVhdName)));
+ string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(baseVhdName)));
string vhdDestUri = blobUrlRoot + vhdBlobName;
// Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd.
@@ -610,17 +619,19 @@ public void PatchNormalSasUriBase()
string destinationSasUriParent = CreateSasUriWithPermission(baseVhdName, i); // the destination of the parent vhd is a Sas Uri
// Set the destination of child vhd
- string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(childVhdName)));
+ string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(childVhdName)));
string vhdDestUri = blobUrlRoot + vhdBlobName;
try
{
// Upload the parent vhd using Sas Uri
- Console.WriteLine("uploads {0} to {1}", baseVhdName, destinationSasUriParent);
+ Console.WriteLine("uploads {0} to {1}", baseVhdName, destinationSasUriParent);
+ vmPowershellCmdlets.RemoveAzureSubscriptions();
var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(baseVhdLocalPath, destinationSasUriParent, true);
Console.WriteLine("uploading completed: {0}", baseVhdName);
// Verify the upload.
+ ReImportSubscription();
AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUriParent, baseVhdLocalPath, vhdUploadContext, md5hashBase, false);
Console.WriteLine("uploads {0} to {1} with patching from {2}", childVhdName, vhdDestUri, destinationSasUriParent);
@@ -648,6 +659,7 @@ public void PatchNormalSasUriBase()
}
}
+ pass = true;
DateTime testEndTime = DateTime.Now;
Console.WriteLine("{0} test passed at {1}.", testName, testEndTime);
Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds);
@@ -655,42 +667,11 @@ public void PatchNormalSasUriBase()
System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) });
}
- //private void AssertUploadContextAndContentMD5UsingSaveVhd(string destination, FileInfo localFile, VhdUploadContext vhdUploadContext, string md5hash, bool deleteBlob = true, bool deleteLocal = true)
- //{
- // AssertUploadContext(destination, localFile, vhdUploadContext);
-
- // FileInfo downloadFile = new FileInfo(localFile.FullName + "_download.vhd");
-
- // BlobHandle blobHandle = getBlobHandle(destination);
-
- // Assert.IsTrue(VerifyMD5hash(blobHandle, md5hash));
- // SaveVhdAndAssertContent(blobHandle, downloadFile, true, deleteBlob, deleteLocal);
- //}
-
- //private BlobHandle getBlobHandle(string blob)
- //{
- // BlobUri blobPath;
- // Assert.IsTrue(BlobUri.TryParseUri(new Uri(blob), out blobPath));
- // return new BlobHandle(blobPath, storageAccountKey.Primary);
- //}
-
-
- //private void AssertUploadContext(string destination, FileInfo localFile, VhdUploadContext vhdUploadContext)
- //{
- // Assert.IsNotNull(vhdUploadContext);
- // Assert.AreEqual(new Uri(destination), vhdUploadContext.DestinationUri);
- // Assert.AreEqual(vhdUploadContext.LocalFilePath.FullName, localFile.FullName);
- //}
-
[TestCleanup]
public virtual void CleanUp()
{
Console.WriteLine("Test {0}", pass ? "passed" : "failed");
-
- // Re-import the subscription.
- vmPowershellCmdlets.ImportAzurePublishSettingsFile();
- vmPowershellCmdlets.SetDefaultAzureSubscription(Resource.DefaultSubscriptionName);
- vmPowershellCmdlets.SetAzureSubscription(defaultAzureSubscription.SubscriptionName, defaultAzureSubscription.CurrentStorageAccount);
+ ReImportSubscription();
}
}
}
View
24 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/AddAzureVhdTest.cs
@@ -42,10 +42,9 @@ public void Initialize()
pass = true;
testStartTime = DateTime.Now;
- storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccount);
+ storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccount);
}
-
/// <summary>
/// UploadDisk:
/// </summary>
@@ -66,7 +65,7 @@ public void UploadDisk()
// Set the destination
- string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
+ string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
string vhdDestUri = blobUrlRoot + vhdBlobName;
// Start uploading...
@@ -101,7 +100,7 @@ public void UploadDiskOverwrite()
// Set the destination
- string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
+ string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
string vhdDestUri = blobUrlRoot + vhdBlobName;
// Start uploading...
@@ -141,7 +140,7 @@ public void UploadDiskResume()
// Set the destination
- string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
+ string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
string vhdDestUri = blobUrlRoot + vhdBlobName;
// Start uploading...
@@ -190,7 +189,7 @@ public void UploadDiskOverwriteNonExist()
// Set the destination
- string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
+ string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
string vhdDestUri = blobUrlRoot + vhdBlobName;
// Start uploading...
@@ -215,7 +214,6 @@ public void UploadDiskOverwriteNonExist()
/// </summary>
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)]
- [Ignore]
public void UploadDiskSecondWithoutOverwrite()
{
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
@@ -231,7 +229,7 @@ public void UploadDiskSecondWithoutOverwrite()
// Set the destination
- string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
+ string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
string vhdDestUri = blobUrlRoot + vhdBlobName;
// Start uploading...
@@ -278,7 +276,7 @@ public void UploadDiskThreadNumber()
// Set the destination
- string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
+ string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
string vhdDestUri = blobUrlRoot + vhdBlobName;
// Start uploading...
@@ -315,7 +313,7 @@ public void UploadDiskThreadNumberOverwrite()
// Set the destination
- string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
+ string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
string vhdDestUri = blobUrlRoot + vhdBlobName;
// Start uploading...
@@ -354,7 +352,7 @@ public void PatchFirstLevelDifferencingDisk()
// Set the destination
- string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
+ string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
string vhdDestUri = blobUrlRoot + vhdBlobName;
// Start uploading...
@@ -372,7 +370,7 @@ public void PatchFirstLevelDifferencingDisk()
Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", childVhdLocalPath);
// Set the destination
- string childVhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(childVhdName)));
+ string childVhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(childVhdName)));
string childVhdDestUri = blobUrlRoot + childVhdBlobName;
// Start uploading the child vhd...
@@ -402,7 +400,7 @@ public void WrongProtocolShouldFail()
Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath);
// Set the destination
- string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
+ string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName)));
string badUrlRoot = string.Format(@"badprotocolhttp://{0}.blob.core.windows.net/", defaultAzureSubscription.CurrentStorageAccount);
string vhdDestUri = badUrlRoot + vhdBlobName;
View
20 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/AzureVhdTest.cs
@@ -28,8 +28,7 @@ public class AzureVhdTest : ServiceManagementTest
protected bool deleteLocalFileIfFailed = true;
protected bool deleteLocalFileIfPassed = true;
protected string perfFile = "perf.csv";
-
-
+
protected void SaveVhdAndAssertContent(BlobHandle destination, FileInfo localFile, int? numThread, string storageKey, bool overwrite, bool deleteBlob, bool deleteLocal)
{
try
@@ -98,10 +97,19 @@ private static string CalculateContentMd5(Stream stream)
}
protected bool VerifyMD5hash(BlobHandle blobHandle, string md5hash)
- {
- Console.WriteLine("MD5 hash of blob, {0}, is {1}", blobHandle.Blob.Uri.ToString(), blobHandle.Blob.Properties.ContentMD5);
- Console.WriteLine("MD5 hash of the local file: {0}", md5hash);
- return String.Equals(blobHandle.Blob.Properties.ContentMD5, md5hash);
+ {
+ string blobMd5 = blobHandle.Blob.Properties.ContentMD5;
+ Console.WriteLine("MD5 hash of the local file: {0}", md5hash);
+ if (string.IsNullOrEmpty(blobMd5))
+ {
+ Console.WriteLine("The blob does not have MD5 value!!!");
+ return false;
+ }
+ else
+ {
+ Console.WriteLine("MD5 hash of blob, {0}, is {1}.", blobHandle.Blob.Uri.ToString(), blobMd5);
+ return String.Equals(blobMd5, md5hash);
+ }
}
protected void AssertUploadContextAndContentMD5UsingSaveVhd
View
23 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/ACLAction.cs
@@ -0,0 +1,23 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+
+namespace Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests.ConfigDataInfo
+{
+ public enum ACLAction
+ {
+ Permit,
+ Deny
+ }
+}
View
147 ...wershell/src/Management.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AzureEndPointConfigInfo.cs
@@ -14,12 +14,11 @@
namespace Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests.ConfigDataInfo
{
- using System;
- using Microsoft.WindowsAzure.Management.ServiceManagement.Model;
+ using Microsoft.WindowsAzure.Management.ServiceManagement.Model;
public class AzureEndPointConfigInfo
- {
- public enum ParameterSet { NoLB, LoadBalanced, LoadBalancedProbe };
+ {
+ public enum ParameterSet { NoLB, LoadBalancedNoProbe, CustonProbe, DefaultProbe };
public ProtocolInfo EndpointProtocol { get; set; }
public int EndpointLocalPort { get; set; }
@@ -33,9 +32,17 @@ public enum ParameterSet { NoLB, LoadBalanced, LoadBalancedProbe };
public int? ProbeTimeout { get; set; }
public PersistentVM Vm { get; set; }
public ParameterSet ParamSet { get; set; }
+ public NetworkAclObject Acl { get; set; }
+ public bool DirectServerReturn { get; set; }
+ public object ServiceName { get; set; }
- public AzureEndPointConfigInfo(ProtocolInfo endpointProtocol, int endpointLocalPort,
- int endpointPublicPort, string endpointName)
+ public AzureEndPointConfigInfo()
+ {
+ }
+
+ //NoLB
+ public AzureEndPointConfigInfo(ParameterSet paramset, ProtocolInfo endpointProtocol, int endpointLocalPort,
+ int endpointPublicPort, string endpointName, NetworkAclObject aclObj = null, bool directServerReturn = false)
{
this.Initialize(
endpointProtocol,
@@ -48,44 +55,57 @@ public enum ParameterSet { NoLB, LoadBalanced, LoadBalancedProbe };
string.Empty,
null,
null,
- ParameterSet.NoLB);
+ paramset,
+ aclObj,
+ directServerReturn);
}
- public AzureEndPointConfigInfo(ProtocolInfo endpointProtocol, int endpointLocalPort,
- int endpointPublicPort, string endpointName, string lBSetName)
+ // ParameterSet.LoadBalancedNoProbe
+ public AzureEndPointConfigInfo(ParameterSet paramset, ProtocolInfo endpointProtocol, int endpointLocalPort,
+ int endpointPublicPort, string endpointName, string lBSetName, NetworkAclObject aclObj = null, bool directServerReturn = false)
{
- this.Initialize(
- endpointProtocol,
- endpointLocalPort,
- endpointPublicPort,
- endpointName,
- lBSetName,
- 0,
- ProtocolInfo.tcp,
- string.Empty,
- null,
- null,
- ParameterSet.LoadBalanced);
+ if ( (paramset == ParameterSet.LoadBalancedNoProbe) || (paramset == ParameterSet.DefaultProbe) )
+ {
+ this.Initialize(
+ endpointProtocol,
+ endpointLocalPort,
+ endpointPublicPort,
+ endpointName,
+ lBSetName,
+ 0,
+ ProtocolInfo.tcp,
+ string.Empty,
+ null,
+ null,
+ paramset,
+ aclObj,
+ directServerReturn);
+ }
}
- public AzureEndPointConfigInfo(ProtocolInfo endpointProtocol, int endpointLocalPort,
+ // CustoProbe
+ public AzureEndPointConfigInfo(ParameterSet paramset, ProtocolInfo endpointProtocol, int endpointLocalPort,
int endpointPublicPort, string endpointName, string lBSetName, int probePort,
- ProtocolInfo probeProtocol, string probePath, int? probeInterval, int? probeTimeout)
+ ProtocolInfo probeProtocol, string probePath, int? probeInterval, int? probeTimeout, NetworkAclObject aclObj = null, bool directServerReturn = false)
{
- this.Initialize(
- endpointProtocol,
- endpointLocalPort,
- endpointPublicPort,
- endpointName,
- lBSetName,
- probePort,
- probeProtocol,
- probePath,
- probeInterval,
- probeTimeout,
- ParameterSet.LoadBalancedProbe);
+
+ this.Initialize(
+ endpointProtocol,
+ endpointLocalPort,
+ endpointPublicPort,
+ endpointName,
+ lBSetName,
+ probePort,
+ probeProtocol,
+ probePath,
+ probeInterval,
+ probeTimeout,
+ paramset,
+ aclObj,
+ directServerReturn);
}
+
public AzureEndPointConfigInfo(AzureEndPointConfigInfo other)
{
this.Initialize(
@@ -99,13 +119,16 @@ public AzureEndPointConfigInfo(AzureEndPointConfigInfo other)
other.ProbePath,
other.ProbeInterval,
other.ProbeTimeout,
- other.ParamSet);
+ other.ParamSet,
+ other.Acl,
+ other.DirectServerReturn);
}
+
private void Initialize(ProtocolInfo protocol, int internalPort,
int? externalPort, string endpointName, string lBSetName, int probePort,
ProtocolInfo probeProtocol, string probePath,
- int? probeInterval, int? probeTimeout, ParameterSet paramSet)
+ int? probeInterval, int? probeTimeout, ParameterSet paramSet, NetworkAclObject aclObj, bool directServerReturn)
{
this.EndpointLocalPort = internalPort;
this.EndpointProtocol = protocol;
@@ -113,26 +136,59 @@ public AzureEndPointConfigInfo(AzureEndPointConfigInfo other)
this.EndpointName = endpointName;
this.LBSetName = lBSetName;
this.ProbePort = probePort;
- this.ProbeProtocol = probeProtocol;
- this.ProbePath = probePath;
+ this.ProbeProtocol = probeProtocol;
this.ProbeInterval = probeInterval;
this.ProbeTimeout = probeTimeout;
this.ParamSet = paramSet;
+ this.Acl = aclObj;
+ this.DirectServerReturn = directServerReturn;
+ if (this.ProbeProtocol.ToString().Equals("http"))
+ this.ProbePath = probePath;
}
public bool CheckInputEndpointContext(InputEndpointContext context)
{
- bool ret = context.Protocol == this.EndpointProtocol.ToString()
+ bool ret = false;
+
+ if (ParamSet == ParameterSet.NoLB)
+ {
+ ret = (context.Name == this.EndpointName);
+ }
+ else
+ {
+ ret = (context.LBSetName == this.LBSetName);
+ }
+
+ ret = ret && context.Protocol == this.EndpointProtocol.ToString()
&& context.LocalPort == this.EndpointLocalPort
- && context.Port == this.EndpointPublicPort
- && context.Name == this.EndpointName;
+ && context.Port == this.EndpointPublicPort
+ && context.EnableDirectServerReturn == this.DirectServerReturn;
- if (ParamSet == ParameterSet.LoadBalanced)
+ if(context.Acl == null)
{
- ret = ret && context.LBSetName == this.LBSetName;
+ if(this.Acl != null
+ && this.Acl != new NetworkAclObject())
+ {
+ ret = false;
+ }
}
+ else if (this.Acl != null)
+ {
+ foreach (var rule in this.Acl)
+ {
+ if(!context.Acl.Rules.Contains(rule))
+ {
+ ret = false;
+ }
+ }
+ }
+ else
+ {
+ ret = false;
+ }
+
- if (ParamSet == ParameterSet.LoadBalancedProbe)
+ if (ParamSet == ParameterSet.CustonProbe)
{
ret = ret && context.LBSetName == this.LBSetName
&& context.ProbePort == this.ProbePort
@@ -149,5 +205,6 @@ public bool CheckInputEndpointContext(InputEndpointContext context)
return ret;
}
+
}
}
View
25 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SetACLConfig.cs
@@ -0,0 +1,25 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+
+namespace Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests.ConfigDataInfo
+{
+ public enum SetACLConfig
+ {
+ AddRule,
+ SetRule,
+ RemoveRule
+ }
+
+}
View
57 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs
@@ -19,29 +19,29 @@ namespace Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTes
using System.Collections.Specialized;
using System.Diagnostics;
using System.IO;
- using System.Text.RegularExpressions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System.Management.Automation;
+ using Microsoft.WindowsAzure.Management.ServiceManagement.Test.Properties;
using Microsoft.WindowsAzure.Storage.Auth;
using Microsoft.WindowsAzure.Storage.Blob;
- using Microsoft.WindowsAzure.Management.ServiceManagement.Test.Properties;
public static class CredentialHelper
{
private static string EnvironmentPathFormat = "testcredentials-{0}";
private static string defaultCredentialFile = "default.publishsettings";
private static string TestEnvironmentVariable = "AZURE_TEST_ENVIRONMENT";
- private static string StorageAccountVariable = "AZURE_STORAGE_ACCOUNT";
- private static string StorageAccountKeyVariable = "AZURE_STORAGE_ACCESS_KEY";
- private static string CredentialBlobUriFormat = "https://{0}.blob.core.windows.net";
+ public static string StorageAccountVariable = "AZURE_STORAGE_ACCOUNT";
+ public static string StorageAccountKeyVariable = "AZURE_STORAGE_ACCESS_KEY";
+ private static string DefaultStorageAccountVariable = "AZURERT_DEFAULT_STORAGE_ACCOUNT";
+ private static string DefaultLocationVariable = "AZURERT_DEFAULT_LOCATION";
+ public static string CredentialBlobUriFormat = "https://{0}.blob.core.windows.net";
public static string CredentialImportFormat = "Import-AzurePublishSettingsFile '{0}'";
private static string publishSettingsFile = null;
private static string defaultSubscriptionName = null;
- private static string location = "West US";
+ private static string location = null;
+ private static string defaultStorageName = null;
private static CloudBlobContainer blobContainer;
- private static string downloadDirectoryPath = null;
private static Dictionary<string, string> environment = new Dictionary<string, string>();
public static Dictionary<string, string> PowerShellVariables { get; private set; }
@@ -62,6 +62,18 @@ public static void GetCredentialInfo(string downloadDirectoryPath)
string.Format(CredentialBlobUriFormat, storageAccount),
storageAccount, storageAccountKey);
+ if (environment.ContainsKey(DefaultStorageAccountVariable))
+ {
+ string.Format("Default storage account name define is {0}", DefaultStorageAccountVariable);
+ defaultStorageName = environment[DefaultStorageAccountVariable];
+ }
+
+ if(environment.ContainsKey(DefaultLocationVariable))
+ {
+ string.Format("Default location defindde is {0}", DefaultLocationVariable);
+ location = environment[DefaultLocationVariable];
+ }
+
publishSettingsFile = Path.Combine(downloadDirectoryPath, defaultCredentialFile);
Assert.IsTrue(File.Exists(publishSettingsFile), string.Format("Did not download file {0}", publishSettingsFile));
}
@@ -106,6 +118,14 @@ public static void GetTestSettings(string testSettings)
{
defaultSubscriptionName = Resource.DefaultSubscriptionName;
}
+ if (!string.IsNullOrWhiteSpace(Resource.Location))
+ {
+ location = Resource.Location;
+ }
+ if (!string.IsNullOrWhiteSpace(Resource.DefaultStorageAccountName))
+ {
+ defaultStorageName = Resource.DefaultStorageAccountName;
+ }
break;
case "UseDefaultsandOverride":
@@ -119,6 +139,14 @@ public static void GetTestSettings(string testSettings)
{
CredentialHelper.DefaultSubscriptionName = Resource.DefaultSubscriptionName;
}
+ if (!string.IsNullOrWhiteSpace(Resource.Location))
+ {
+ CredentialHelper.Location = Resource.Location;
+ }
+ if (!string.IsNullOrWhiteSpace(Resource.DefaultStorageAccountName))
+ {
+ CredentialHelper.defaultStorageName = Resource.DefaultStorageAccountName;
+ }
break;
}
@@ -165,5 +193,18 @@ public static string Location
}
}
+ public static string DefaultStorageName
+ {
+ get
+ {
+ return defaultStorageName;
+ }
+ set
+ {
+ defaultStorageName = value;
+ }
+ }
+
+
}
}
View
844 WindowsAzurePowershell/src/Management.ServiceManagement.Test/FunctionalTests/FunctionalTest.cs
@@ -14,18 +14,22 @@
namespace Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests
-{
- using System;
- using System.Collections.ObjectModel;
- using System.IO;
- using System.Management.Automation;
- using System.Reflection;
- using System.Security.Cryptography.X509Certificates;
- using System.Threading;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using Microsoft.WindowsAzure.Management.ServiceManagement.Model;
- using Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests.ConfigDataInfo;
- using Microsoft.WindowsAzure.Management.ServiceManagement.Test.Properties;
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using System.IO;
+ using System.Management.Automation;
+ using System.Reflection;
+ using System.Security.Cryptography.X509Certificates;
+ using System.Text;
+ using System.Threading;
+ using System.Xml;
+ using Microsoft.VisualStudio.TestTools.UnitTesting;
+ using Microsoft.WindowsAzure.Management.ServiceManagement.Extensions;
+ using Microsoft.WindowsAzure.Management.ServiceManagement.Model;
+ using Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests.ConfigDataInfo;
+ using Microsoft.WindowsAzure.Management.ServiceManagement.Test.Properties;
using Microsoft.WindowsAzure.ServiceManagement;
@@ -35,8 +39,7 @@ public class FunctionalTest : ServiceManagementTest
bool createOwnService = false;
private static string defaultService;
private static string defaultVm;
- private const string vhdBlob = "vhdstore/os.vhd";
- private string vhdName = "os.vhd";
+ private const string vhdName = "os.vhd";
private string serviceName;
private string vmName;
protected static string vhdBlobLocation;
@@ -61,32 +64,48 @@ public static void ClassInit(TestContext context)
Assert.IsNull(vmPowershellCmdlets.GetAzureVM(defaultVm, defaultService));
vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, defaultVm, defaultService, imageName, username, password, locationName);
- Console.WriteLine("Service Name: {0} is created.", defaultService);
-
-
- vhdBlobLocation = blobUrlRoot + vhdBlob;
- try
- {
- vmPowershellCmdlets.AddAzureVhd(new FileInfo(localFile), vhdBlobLocation);
+ Console.WriteLine("Service Name: {0} is created.", defaultService);
+
+
+ vhdBlobLocation = string.Format("{0}{1}/{2}", blobUrlRoot, vhdContainerName, vhdName);
+ if (string.IsNullOrEmpty(localFile))
+ {
+ try
+ {
+ CopyTestData(testDataContainer, osVhdName, vhdContainerName, vhdName);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.ToString());
+ Assert.Inconclusive("Upload vhd is not set!");
+ }
+ }
+ else
+ {
+ try
+ {
+ vmPowershellCmdlets.AddAzureVhd(new FileInfo(localFile), vhdBlobLocation);
+ }
+ catch (Exception e)
+ {
+ if (e.ToString().Contains("already exists"))
+ {
+ // Use the already uploaded vhd.
+ Console.WriteLine("Using already uploaded blob..");
+ }
+ else
+ {
+ throw;
+ }
+ }
}
- catch (Exception e)
- {
- if (e.ToString().Contains("already exists"))
- {
- // Use the already uploaded vhd.
- Console.WriteLine("Using already uploaded blob..");
- }
- else
- {
- throw;
- }
- }
}
[TestInitialize]
public void Initialize()
{
+ ReImportSubscription();
pass = false;
testStartTime = DateTime.Now;
@@ -105,7 +124,6 @@ public void ScriptTestSample()
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get,Set,Remove)-AzureAffinityGroup)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\affinityGroupData.csv", "affinityGroupData#csv", DataAccessMethod.Sequential)]
- [Ignore]
public void AzureAffinityGroupTest()
{
createOwnService = false;
@@ -113,12 +131,12 @@ public void AzureAffinityGroupTest()
string affinityName1 = Convert.ToString(TestContext.DataRow["affinityName1"]);
string affinityLabel1 = Convert.ToString(TestContext.DataRow["affinityLabel1"]);
- string location1 = Convert.ToString(TestContext.DataRow["location1"]);
+ string location1 = CheckLocation(Convert.ToString(TestContext.DataRow["location1"]));
string description1 = Convert.ToString(TestContext.DataRow["description1"]);
string affinityName2 = Convert.ToString(TestContext.DataRow["affinityName2"]);
string affinityLabel2 = Convert.ToString(TestContext.DataRow["affinityLabel2"]);
- string location2 = Convert.ToString(TestContext.DataRow["location2"]);
+ string location2 = CheckLocation(Convert.ToString(TestContext.DataRow["location2"]));
string description2 = Convert.ToString(TestContext.DataRow["description2"]);
try
@@ -190,18 +208,27 @@ private bool AffinityGroupVerify(AffinityGroupContext affContext, string name, s
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Remove)-AzureCertificate)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\certificateData.csv", "certificateData#csv", DataAccessMethod.Sequential)]
- [Ignore]
public void AzureCertificateTest()
{
createOwnService = false;
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
+ const string DefaultCertificateIssuer = "CN=Windows Azure Powershell Test";
+ const string DefaultFriendlyName = "PSTest";
+
// Certificate files to test
string cerFileName = Convert.ToString(TestContext.DataRow["cerFileName"]);
string pfxFileName = Convert.ToString(TestContext.DataRow["pfxFileName"]);
string password = Convert.ToString(TestContext.DataRow["password"]);
string thumbprintAlgorithm = Convert.ToString(TestContext.DataRow["algorithm"]);
-
+
+ // Create a certificate
+ X509Certificate2 certCreated = Utilities.CreateCertificate(DefaultCertificateIssuer, DefaultFriendlyName, password);
+ byte[] certData = certCreated.Export(X509ContentType.Pfx, password);
+ File.WriteAllBytes(pfxFileName, certData);
+ byte[] certData2 = certCreated.Export(X509ContentType.Cert);
+ File.WriteAllBytes(cerFileName, certData2);
+
// Install the .cer file to local machine.
StoreLocation certStoreLocation = StoreLocation.CurrentUser;
StoreName certStoreName = StoreName.My;
@@ -299,19 +326,25 @@ private void UninstallCert(X509Certificate2 cert, StoreLocation location, StoreN
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (New-AzureCertificateSetting)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\certificateData.csv", "certificateData#csv", DataAccessMethod.Sequential)]
- [Ignore]
public void AzureCertificateSettingTest()
{
createOwnService = true;
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
- // Install the .cer file to local machine.
+ const string DefaultCertificateIssuer = "CN=Windows Azure Powershell Test";
+ const string DefaultFriendlyName = "PSTest";
+
+ // Create a certificate
string cerFileName = Convert.ToString(TestContext.DataRow["cerFileName"]);
+ X509Certificate2 certCreated = Utilities.CreateCertificate(DefaultCertificateIssuer, DefaultFriendlyName, password);
+ byte[] certData2 = certCreated.Export(X509ContentType.Cert);
+ File.WriteAllBytes(cerFileName, certData2);
+
+ // Install the .cer file to local machine.
StoreLocation certStoreLocation = StoreLocation.CurrentUser;
StoreName certStoreName = StoreName.My;
X509Certificate2 installedCert = InstallCert(cerFileName, certStoreLocation, certStoreName);
-
-
+
PSObject certToUpload = vmPowershellCmdlets.RunPSScript(
String.Format("Get-Item cert:\\{0}\\{1}\\{2}", certStoreLocation.ToString(), certStoreName.ToString(), installedCert.Thumbprint))[0];
@@ -335,14 +368,11 @@ public void AzureCertificateSettingTest()
vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm });
-
PersistentVMRoleContext result = vmPowershellCmdlets.GetAzureVM(vmName, serviceName);
Console.WriteLine("{0} is created", result.Name);
pass = true;
-
-
}
catch (Exception e)
{
@@ -357,7 +387,6 @@ public void AzureCertificateSettingTest()
}
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Set,Remove)-AzureDataDisk)")]
- [Ignore]
public void AzureDataDiskTest()
{
createOwnService = false;
@@ -437,11 +466,6 @@ private void RemoveDisk(string diskName, int maxTry)
}
}
-
-
-
-
-
private bool CheckDataDisk(string vmName, string serviceName, AddAzureDataDiskConfig dataDiskInfo, HostCaching hc)
{
bool found = false;
@@ -460,20 +484,14 @@ private bool CheckDataDisk(string vmName, string serviceName, AddAzureDataDiskCo
return found;
}
-
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Update,Remove)-AzureDisk)")]
- [Ignore]
public void AzureDiskTest()
{
createOwnService = false;
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
-
-
-
- string mediaLocation = String.Format("{0}vhdstore/{1}", blobUrlRoot, vhdName);
+ string mediaLocation = String.Format("{0}{1}/{2}", blobUrlRoot, vhdContainerName, vhdName);
-
try
{
vmPowershellCmdlets.AddAzureDisk(vhdName, mediaLocation, vhdName, null);
@@ -520,14 +538,11 @@ public void AzureDiskTest()
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get,Set,Remove,Move)-AzureDeployment)")]
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)]
- [Ignore]
public void AzureDeploymentTest()
{
createOwnService = true;
StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
-
-
// Choose the package and config files from local machine
string packageName = Convert.ToString(TestContext.DataRow["packageName"]);
string configName = Convert.ToString(TestContext.DataRow["configName"]);
@@ -535,27 +550,22 @@ public void AzureDeploymentTest()
string upgradeConfigName = Convert.ToString(TestContext.DataRow["upgradeConfig"]);
string upgradeConfigName2 = Convert.ToString(TestContext.DataRow["upgradeConfig2"]);
-
var packagePath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + packageName);
var configPath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + configName);
var packagePath2 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + upgradePackageName);
var configPath2 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + upgradeConfigName);
var configPath3 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + upgradeConfigName2);
-
Assert.IsTrue(File.Exists(packagePath1.FullName), "file not exist={0}", packagePath1);
Assert.IsTrue(File.Exists(packagePath2.FullName), "file not exist={0}", packagePath2);
Assert.IsTrue(File.Exists(configPath1.FullName), "file not exist={0}", configPath1);
Assert.IsTrue(File.Exists(configPath2.FullName), "file not exist={0}", configPath2);
Assert.IsTrue(File.Exists(configPath3.FullName), "file not exist={0}", configPath3);
-
-
string deploymentName = "deployment1";
string deploymentLabel = "label1";
DeploymentInfoContext result;
-
try
{
serviceName = Utilities.GetUniqueShortName(serviceNamePrefix);
@@ -618,7 +628,6 @@ public void AzureDeploymentTest()
///
/// </summary>
[TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get)-AzureDns)")]
- [Ignore]
public void AzureDnsTest()
{
createOwnService = true;
@@ -664,183 +673,8 @@ public void AzureDnsTest()
}
}
-
- [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Set,Remove)-AzureEndpoint)")]
- [Ignore]
- public void AzureEndpointTest()
- {
- createOwnService = false;
- StartTest(MethodBase.GetCurrentMethod().Name, testStartTime);
-
- string ep1Name = "tcp1";
- int ep1LocalPort = 60010;
- int ep1PublicPort = 60011;
- string ep1LBSetName = "lbset1";
- int ep1ProbePort = 60012;
- string ep1ProbePath = string.Empty;
- int? ep1ProbeInterval = 7;
- int? ep1ProbeTimeout = null;
-
- string ep2Name = "tcp2";
- int ep2LocalPort = 60020;
- int ep2PublicPort = 60021;
- int ep2LocalPortChanged = 60030;
- int ep2PublicPortChanged = 60031;
- string ep2LBSetName = "lbset2";
- int ep2ProbePort = 60022;
- string ep2ProbePath = string.Empty;
- int? ep2ProbeInterval = null;
- int? ep2ProbeTimeout = 32;
-
-
- AzureEndPointConfigInfo ep1Info = new AzureEndPointConfigInfo(
- ProtocolInfo.tcp,
- ep1LocalPort,
- ep1PublicPort,
- ep1Name,
- ep1LBSetName,
- ep1ProbePort,
- ProtocolInfo.tcp,
- ep1ProbePath,
- ep1ProbeInterval,
- ep1ProbeTimeout);
-
- AzureEndPointConfigInfo ep2Info = new AzureEndPointConfigInfo(
- ProtocolInfo.tcp,
- ep2LocalPort,
- ep2PublicPort,
- ep2Name,
- ep2LBSetName,
- ep2ProbePort,
- ProtocolInfo.tcp,
- ep2ProbePath,
- ep2ProbeInterval,
- ep2ProbeTimeout);
-
- try
- {
- foreach (AzureEndPointConfigInfo.ParameterSet p in Enum.GetValues(typeof(AzureEndPointConfigInfo.ParameterSet)))
- {
- string pSetName = Enum.GetName(typeof(AzureEndPointConfigInfo.ParameterSet), p);
- Console.WriteLine("--Begin Endpoint Test with '{0}' parameter set.", pSetName);
-
- ep1Info.ParamSet = p;
- ep2Info.ParamSet = p;
- ep2Info.EndpointLocalPort = ep2LocalPort;
- ep2Info.EndpointPublicPort = ep2PublicPort;
-
- // Add two new endpoints
- Console.WriteLine("-----Add 2 new endpoints.");
- vmPowershellCmdlets.AddEndPoint(defaultVm, defaultService, new[] { ep1Info, ep2Info }); // Add-AzureEndpoint with Get-AzureVM and Update-AzureVm