Skip to content

Commit 68966fa

Browse files
committed
Merge branch 'master' into az-shared-props
2 parents 7bbff4a + e6743bf commit 68966fa

File tree

116 files changed

+23824
-11034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+23824
-11034
lines changed

documentation/migration-guides/Az.1.0.0-migration-guide.md

+29-29
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This document describes the changes between the 6.x versions of AzureRM and Az v
3535
In AzureRM, cmdlets used either 'AzureRM' or 'Azure' as a noun prefix. Az simplifies and normalizes cmndlet names, so that all cmdlets use 'Az' as their cmdlet noun prefix.
3636
For example:
3737
```powershell
38-
Get-AzureRMVM
38+
Get-AzureRmVM
3939
Get-AzureKeyVaultSecret
4040
```
4141

@@ -60,14 +60,14 @@ Enable-AzureRmAlias
6060
Get-AzureRmStorageAccount | Get-AzureStorageContainer | Get-AzureStorageBlob
6161
```
6262

63-
Running ```Enable-AzureRmAlias -Scope CurrentUser``` will enable the aliases for all powershell sessions you open, so that after executing this cmdlet, a script like this would not need to be changed at all:
63+
Running ```Enable-AzureRmAlias -Scope CurrentUser``` will enable the aliases for all PowerShell sessions you open, so that after executing this cmdlet, a script like this would not need to be changed at all:
6464
```powershell
6565
Get-AzureRmStorageAccount | Get-AzureStorageContainer | Get-AzureStorageBlob
6666
```
6767

68-
For complete details on the usage of the alias cmdlets, execute ```Get-Help -Online Enable-AzureRmAlias``` from the powershell prompt.
68+
For complete details on the usage of the alias cmdlets, execute ```Get-Help Enable-AzureRmAlias -Online``` from the PowerShell prompt.
6969

70-
```Disable-AzureRmAlias``` removes AzureRM cmdlet aliases created by ```Enable-AzureRmAlias```. For complete details, execute ```Get-Help -Online Disable-AzureRmAlias``` from the powershell prompt.
70+
```Disable-AzureRmAlias``` removes AzureRM cmdlet aliases created by ```Enable-AzureRmAlias```. For complete details, execute ```Get-Help Disable-AzureRmAlias -Online``` from the PowerShell prompt.
7171

7272
### Module Name Changes
7373
- The module names have changed from `AzureRM.*` to `Az.*`, except for the following modules:
@@ -122,7 +122,7 @@ Az.Compute\Get-AzVM
122122
```
123123

124124
### Migrating Module Manifest Dependencies
125-
Modules that express dependencies on AzureRM modules through a module manifest (.psd1) file will need to updated the module names in their 'RequiredModules' section
125+
Modules that express dependencies on AzureRM modules through a module manifest (.psd1) file will need to update the module names in their 'RequiredModules' section
126126

127127
```powershell
128128
RequiredModules = @(@{ModuleName="AzureRM.Profile"; ModuleVersion="5.8.2"})
@@ -131,7 +131,7 @@ RequiredModules = @(@{ModuleName="AzureRM.Profile"; ModuleVersion="5.8.2"})
131131
Should be changed to
132132

133133
```powershell
134-
RequiredModules = @(@{ModuleName="Az.Profile"; ModuleVersion="1.0.0"})
134+
RequiredModules = @(@{ModuleName="Az.Accounts"; ModuleVersion="1.0.0"})
135135
```
136136

137137
### Removed modules
@@ -141,14 +141,14 @@ RequiredModules = @(@{ModuleName="Az.Profile"; ModuleVersion="1.0.0"})
141141

142142
The tooling for these services are no longer actively supported. Customers are encouraged to move to alternative services as soon as it is convenient.
143143

144-
### Windows PowerShell 5.1 and .NET 4.7.2
145-
- Using Az with Windows PowerShell 5.1 requires the installation of .NET 4.7.2. However, using Az with PowerShell Core does not require .NET 4.7.2.
144+
### Windows PowerShell 5.1 and .NET Framework 4.7.2
145+
- Using Az with Windows PowerShell 5.1 requires the installation of .NET Framework 4.7.2. However, using Az with PowerShell Core does not require .NET Framework 4.7.2.
146146

147147
### Temporary removal of User login using PSCredential
148148
- Due to changes in the authentication flow for .NET Standard, we are temporarily removing user login via PSCredential. This capability will be re-introduced in the 1/15/2019 release for Windows PowerShell 5.1. This is duscussed in detail in [this issue.](https://github.com/Azure/azure-powershell/issues/7430)
149149

150150
### Default Device Code login instead of Web Browser prompt
151-
- Due to changes in the authentication flow for .NET Standard, we are using device login as the default login flow during interactive login. Web browser based login will be re-introduced for Windows PowerShell 5.1 as the default in the 1/15/2019 release. At that time, users will be able to choose device login using a Switch parameter.
151+
- Due to changes in the authentication flow for .NET Standard, we are using device login as the default login flow during interactive login. Web browser based login will be re-introduced for Windows PowerShell 5.1 as the default in the 1/15/2019 release. At that time, users will be able to choose device login using a switch parameter.
152152

153153
## Module breaking changes
154154

@@ -171,17 +171,17 @@ The tooling for these services are no longer actively supported. Customers are
171171
- Removed `GetSkusWithAccountParamSetName` parameter set from `Get-AzCognitiveServicesAccountSkus` cmdlet. You must get Skus by Account Type and Location, instead of using ResourceGroupName and Account Name.
172172

173173
### Az.Compute (previously AzureRM.Compute)
174-
- `IdentityIds` are removed from `Identity` property in `PSVirtualMachine` and `PSVirtualMachineScaleSet` objects
174+
- `IdentityIds` are removed from `Identity` property in `PSVirtualMachine` and `PSVirtualMachineScaleSet` objects.
175175
Scripts should no longer use the value of this field to make processing decisions.
176176
- The type of `InstanceView` property of `PSVirtualMachineScaleSetVM` object is changed from `VirtualMachineInstanceView` to `VirtualMachineScaleSetVMInstanceView`
177177
- `AutoOSUpgradePolicy` and `AutomaticOSUpgrade` properties are removed from `UpgradePolicy` property
178178
- The type of `Sku` property in `PSSnapshotUpdate` object is changed from `DiskSku` to `SnapshotSku`
179-
- `VmScaleSetVMParameterSet` is removed from `Add-AzVMDataDisk` cmdlet, you cna no longer add a data disk individually to a ScaleSet VM.
179+
- `VmScaleSetVMParameterSet` is removed from `Add-AzVMDataDisk` cmdlet, you can no longer add a data disk individually to a ScaleSet VM.
180180

181181
### Az.DataFactory (previously AzureRM.DataFactories and AzureRM.DataFactoryV2)
182182
- The `GatewayName` parameter has become mandatory in the `New-AzDataFactoryEncryptValue` cmdlet
183183
- Removed `New-AzDataFactoryGatewayKey` cmdlet
184-
- Removed `LinkedServiceName` parameter from `Get-AzDataFactoryV2ActivityRun` cmdlet
184+
- Removed `LinkedServiceName` parameter from `Get-AzDataFactoryV2ActivityRun` cmdlet.
185185
Scripts should no longer use the value of this field to make processing decisions.
186186

187187
### Az.DataLakeAnalytics (previously AzureRM.DataLakeAnalytics)
@@ -208,8 +208,8 @@ The tooling for these services are no longer actively supported. Customers are
208208
uses the ```PSDatalakeStoreAccount``` returned from ```Get-AzDataLakeStoreAccount``` should not reference these properties.
209209

210210
### Az.KeyVault (previously AzureRM.KeyVault)
211-
- The `PurgeDisabled` property was removed from the `PSKeyVaultKeyAttributes`, `PSKeyVaultKeyIdentityItem`, and `PSKeyVaultSecretAttributes` objects
212-
Scripts shoudl no longer reference the ```PurgeDisabled``` property to make processing decisions.
211+
- The `PurgeDisabled` property was removed from the `PSKeyVaultKeyAttributes`, `PSKeyVaultKeyIdentityItem`, and `PSKeyVaultSecretAttributes` objects.
212+
Scripts should no longer reference the ```PurgeDisabled``` property to make processing decisions.
213213

214214
### Az.Media (previously AzureRM.Media)
215215
- Remove deprecated `Tags` property alias from `New-AzMediaService` cmdlet
@@ -223,7 +223,7 @@ uses the ```PSDatalakeStoreAccount``` returned from ```Get-AzDataLakeStoreAccoun
223223
New-AzMMediaService -Tag @{TagName="TagValue"}
224224
```
225225
### Az.Monitor (previously AzureRM.Insights)
226-
- Removed plural names `Categories` and `Timegrains` parameter in favor of singular parameter names from `Set-AzDiagnosticSetting` cmdlet
226+
- Removed plural names `Categories` and `Timegrains` parameter in favor of singular parameter names from `Set-AzDiagnosticSetting` cmdlet.
227227
Scripts using
228228
```powershell
229229
Set-AzureRmDiagnosticSetting -Timegrains PT1M -Categories Category1, Category2
@@ -238,7 +238,7 @@ uses the ```PSDatalakeStoreAccount``` returned from ```Get-AzDataLakeStoreAccoun
238238
- Removed deprecated `EnableVmProtection` property from `PSVirtualNetwork` object
239239
- Removed deprecated `Set-AzVirtualNetworkGatewayVpnClientConfig` cmdlet
240240

241-
Scripts shoudl no longer make processing decisions based on the values fo these fields.
241+
Scripts should no longer make processing decisions based on the values for these fields.
242242

243243
### Az.OperationalInsights (previously AzureRM.OperationalInsights)
244244
- Default parameter set for `Get-AzOperationalInsightsDataSource` is removed, and `ByWorkspaceNameByKind` has become the default parameter set
@@ -254,28 +254,28 @@ Scripts shoudl no longer make processing decisions based on the values fo these
254254
```
255255

256256
### Az.RecoveryServices (previously AzureRM.RecoveryServices, AzureRM.RecoveryServices.Backup, and AzureRM.RecoveryServices.SiteRecovery)
257-
- Removed `Encryption` parameter from `New/Set-AzRecoveryServicesAsrPolicy` cmdlet
257+
- Removed `Encryption` parameter from `New/Set-AzRecoveryServicesAsrPolicy` cmdlets
258258
- `TargetStorageAccountName` parameter is now mandatory for managed disk restores in `Restore-AzRecoveryServicesBackupItem` cmdlet
259259
- Removed `StorageAccountName` and `StorageAccountResourceGroupName` parameters in `Restore-AzRecoveryServicesBackupItem` cmdlet
260260
- Removed `Name`parameter in `Get-AzRecoveryServicesBackupContainer` cmdlet
261261

262262
### Az.Resources (previously AzureRM.Resources)
263-
- Removed `Sku` parameter from `New/Set-AzPolicyAssignment` cmdlet
264-
- Removed `Password` parameter from `New-AzADServicePrincipal` and `New-AzADSpCredential` cmdlet
263+
- Removed `Sku` parameter from `New/Set-AzPolicyAssignment` cmdlets
264+
- Removed `Password` parameter from `New-AzADServicePrincipal` and `New-AzADSpCredential` cmdlets.
265265
Passwords are automatically generated, scripts that provided the password:
266266
```powershell
267267
New-AzAdSpCredential -ObjectId 1f99cf81-0146-4f4e-beae-2007d0668476 -Password $secPassword
268268
```
269269

270-
Should be changed to retriedve the password from the output:
270+
Should be changed to retrieve the password from the output:
271271
```powershell
272272
$credential = New-AzAdSpCredential -ObjectId 1f99cf81-0146-4f4e-beae-2007d0668476
273273
$secPassword = $credential.Secret
274274
```
275275

276276
### Az.ServiceFabric (previously AzureRM.ServiceFabric)
277277
- The following cmdlet return types have been changed:
278-
- The property `SerivceTypeHealthPolicies` of type `ApplicationHealthPolicy` has been removed.
278+
- The property `ServiceTypeHealthPolicies` of type `ApplicationHealthPolicy` has been removed.
279279
- The property `ApplicationHealthPolicies` of type `ClusterUpgradeDeltaHealthPolicy` has been removed.
280280
- The property `OverrideUserUpgradePolicy` of type `ClusterUpgradePolicy` has been removed.
281281
- These changes affect the following cmdlets:
@@ -302,8 +302,8 @@ Scripts shoudl no longer make processing decisions based on the values fo these
302302
- Removed deprecated parameter `PrivilegedLogin` from `Set-AzSqlDatabaseDataMaskingPolicy` cmdlet
303303

304304
### Az.Storage (previously Azure.Storage and AzureRM.Storage)
305-
- To support creating an Oauth storage context with only the storage account name, the default parameter set has been changed to `OAuthParameterSet`
306-
- Example: `$ctx = New-AzureStorageContext -StorageAccountName $accountName`
305+
- To support creating an OAuth storage context with only the storage account name, the default parameter set has been changed to `OAuthParameterSet`
306+
- Example: `$ctx = New-AzStorageContext -StorageAccountName $accountName`
307307
- The `Location` parameter has become mandatory in the `Get-AzStorageUsage` cmdlet
308308
- The Storage API methods now use the Task-based Asynchronous Pattern (TAP), instead of synchronous API calls.
309309
#### 1. Blob Snapshot
@@ -315,7 +315,7 @@ $b.ICloudBlob.Snapshot()
315315

316316
##### After:
317317
```powershell
318-
$b = Get-AzureStorageBlob -Container $containerName -Blob $blobName -Context $ctx
318+
$b = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $ctx
319319
$task = $b.ICloudBlob.SnapshotAsync()
320320
$task.Wait()
321321
$snapshot = $task.Result
@@ -330,7 +330,7 @@ $snapshot = $Share.Snapshot()
330330
##### After:
331331
```powershell
332332
333-
$Share = Get-AzureStorageShare -Name $containerName -Context $ctx
333+
$Share = Get-AzStorageShare -Name $containerName -Context $ctx
334334
$task = $Share.SnapshotAsync()
335335
$task.Wait()
336336
$snapshot = $task.Result
@@ -344,7 +344,7 @@ $b.ICloudBlob.Undelete()
344344
```
345345
##### After:
346346
```powershell
347-
$b = Get-AzureStorageBlob -Container $containerName -Blob $blobName -IncludeDeleted -Context $ctx
347+
$b = Get-AzStorageBlob -Container $containerName -Blob $blobName -IncludeDeleted -Context $ctx
348348
$task = $b.ICloudBlob.UndeleteAsync()
349349
$task.Wait()
350350
```
@@ -361,14 +361,14 @@ $pageBlob.ICloudBlob.SetPremiumBlobTier("P4")
361361

362362
##### After:
363363
```powershell
364-
$blockBlob = Get-AzureStorageBlob -Container $containerName -Blob $blockBlobName -Context $ctx
364+
$blockBlob = Get-AzStorageBlob -Container $containerName -Blob $blockBlobName -Context $ctx
365365
$task = $blockBlob.ICloudBlob.SetStandardBlobTierAsync("hot")
366366
$task.Wait()
367367
368-
$pageBlob = Get-AzureStorageBlob -Container $containerName -Blob $pageBlobName -Context $ctx
368+
$pageBlob = Get-AzStorageBlob -Container $containerName -Blob $pageBlobName -Context $ctx
369369
$task = $pageBlob.ICloudBlob.SetPremiumBlobTierAsync("P4")
370370
$task.Wait()
371371
```
372372

373373
### Az.Websites (previously AzureRM.Websites)
374-
- Removed deprecated properties from the `PSAppServicePlan`, `PSCertificate`, `PSCloningInfo`, and `PSSite` objects
374+
- Removed deprecated properties from the `PSAppServicePlan`, `PSCertificate`, `PSCloningInfo`, and `PSSite` objects

src/ResourceManager/DataMigration/Commands.DataMigration.Test/Commands.DataMigration.Test.Netcore.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</PropertyGroup>
2525

2626
<ItemGroup>
27-
<PackageReference Include="Microsoft.Azure.Management.DataMigration" Version="0.5.0-preview" />
27+
<PackageReference Include="Microsoft.Azure.Management.DataMigration" Version="0.6.0-preview" />
2828
</ItemGroup>
2929

3030
<ItemGroup>

src/ResourceManager/DataMigration/Commands.DataMigration.Test/ScenarioTests/Common.ps1

+25
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,31 @@ function Create-Project($rg, $service, $targetPlatform)
108108
return $project
109109
}
110110

111+
function Create-ProjectMongoDbMongoDb($rg, $service)
112+
{
113+
$ProjectName = Get-ProjectName
114+
$sourceConnInfo = New-SourceMongoDbConnectionInfo
115+
$targetConnInfo = New-TargetMongoDbConnectionInfo
116+
117+
$project = New-AzureRmDataMigrationProject -ResourceGroupName $rg.ResourceGroupName -ServiceName $service.Name -ProjectName $ProjectName -Location $rg.Location -SourceType MongoDb -TargetType MongoDb -SourceConnection $sourceConnInfo -TargetConnection $targetConnInfo
118+
119+
return $project
120+
}
121+
122+
function New-SourceMongoDbConnectionInfo
123+
{
124+
$sourceConn = [Microsoft.Azure.Commands.DataMigrationConfig]::GetConfigString("MONGODB_SOURCE_CONNECTIONSTRING")
125+
$connectioninfo = New-AzureRmDmsConnInfo -ServerType MongoDb -ConnectionString $sourceConn
126+
return $connectioninfo
127+
}
128+
129+
function New-TargetMongoDbConnectionInfo
130+
{
131+
$cosmosConn = [Microsoft.Azure.Commands.DataMigrationConfig]::GetConfigString("COSMOSDB_TARGET_CONNECTIONSTRING")
132+
$connectioninfo = New-AzureRmDmsConnInfo -ServerType MongoDb -ConnectionString $cosmosConn
133+
return $connectioninfo
134+
}
135+
111136
function getDmsAssetName($prefix)
112137
{
113138
$assetName = [Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::GetAssetName("testName",$prefix+"-PsTestRun")

src/ResourceManager/DataMigration/Commands.DataMigration.Test/ScenarioTests/ServiceTests.cs

+22
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,27 @@ public void TestMigrateSqlSqlDBSync()
147147
{
148148
DataMigrationTestController.NewInstance.RunPsTest(_logger, "Test-MigrateSqlSqlDBSync");
149149
}
150+
151+
[Fact]
152+
[Trait(Category.AcceptanceType, Category.CheckIn)]
153+
public void TestConnectToSourceMongoDb()
154+
{
155+
DataMigrationTestController.NewInstance.RunPsTest(_logger, "Test-ConnectToSourceMongoDb");
156+
}
157+
158+
159+
[Fact]
160+
[Trait(Category.AcceptanceType, Category.CheckIn)]
161+
public void TestConnectToTargetCosmosDb()
162+
{
163+
DataMigrationTestController.NewInstance.RunPsTest(_logger, "Test-ConnectToTargetCosmosDb");
164+
}
165+
166+
[Fact]
167+
[Trait(Category.AcceptanceType, Category.CheckIn)]
168+
public void TestMigrateMongoDb()
169+
{
170+
DataMigrationTestController.NewInstance.RunPsTest(_logger, "Test-MigrateMongoDb");
171+
}
150172
}
151173
}

0 commit comments

Comments
 (0)