Skip to content

Commit 7e23e2c

Browse files
jiawangjiawang
authored andcommitted
minor update based on cmdlet review comments (indentation, example, remove unneeded)
1 parent 25cf206 commit 7e23e2c

File tree

4 files changed

+7
-22
lines changed

4 files changed

+7
-22
lines changed

src/ResourceManager/Sql/ChangeLog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21-
22-
## Version 3.4.1
2321
* Adding support for list and cancel the asynchronous updateslo operation on the database
2422
- update existing cmdlet Get-AzureRmSqlDatabaseActivity to return DB updateslo operation status.
2523
- add new cmdlet Stop-AzureRmSqlDatabaseActivity for cancel the asynchronous updateslo operation on the database.
2624

25+
## Version 3.4.1
26+
2727
## Version 3.4.0
2828
* Adding support for Virtual Network Rules
2929
- Adding Get-AzureRmSqlServerVirtualNetworkRule cmdlet which gets the virtual network rules by a specific rule name or a list of virtual network rules in an Azure Sql server.

src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/DatabaseCrudTests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,13 +345,13 @@ function Test-CancelDatabaseOperationInternal ($location = "westcentralus")
345345
# Setup
346346
$rg = Create-ResourceGroupForTest
347347
$server = Create-ServerForTest $rg $location
348-
348+
349349
$databaseName = Get-DatabaseName
350350
$db = New-AzureRmSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName `
351351
-Edition Standard -MaxSizeBytes 250GB -RequestedServiceObjectiveName S0
352352
Assert-AreEqual $db.DatabaseName $databaseName
353353

354-
# Database will be Standard s0 with maxsize: 268435456000 (250GB)
354+
# Database will be Standard s0 with maxsize: 268435456000 (250GB)
355355

356356
try
357357
{
@@ -370,11 +370,11 @@ function Test-CancelDatabaseOperationInternal ($location = "westcentralus")
370370
$dbactivityId = $dbactivity.OperationId
371371
try
372372
{
373-
$dbactivityCancel = Stop-AzureRmSqlDatabaseActivity -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName -OperationId $dbactivityId
373+
$dbactivityCancel = Stop-AzureRmSqlDatabaseActivity -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName -OperationId $dbactivityId
374374
}
375375
Catch
376376
{
377-
$ErrorMessage = $_.Exception.Message
377+
$ErrorMessage = $_.Exception.Message
378378
Assert-AreEqual True $ErrorMessage.Contains("Cannot cancel database management operation '" + $dbactivityId + "' in the current state")
379379
}
380380
}

src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet/StopAzureSqlDatabaseActivity.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,5 @@ protected override IEnumerable<AzureSqlDatabaseActivityModel> PersistChanges(IEn
5050
{
5151
return ModelAdapter.CancelDatabaseActivity(this.ResourceGroupName, this.ServerName, this.ElasticPoolName, this.DatabaseName, this.OperationId);
5252
}
53-
54-
/// <summary>
55-
/// Entry point for the cmdlet
56-
/// </summary>
57-
public override void ExecuteCmdlet()
58-
{
59-
if (!ShouldProcess(
60-
string.Format(CultureInfo.InvariantCulture, Properties.Resources.StopDatabaseActivityDescription, this.DatabaseName, this.ServerName),
61-
string.Format(CultureInfo.InvariantCulture, Properties.Resources.StopDatabaseActivityWarning, this.DatabaseName, this.ServerName),
62-
Properties.Resources.ShouldProcessCaption))
63-
{
64-
return;
65-
}
66-
67-
base.ExecuteCmdlet();
68-
}
6953
}
7054
}

src/ResourceManager/Sql/Commands.Sql/help/Stop-AzureRmSqlDatabaseActivity.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ The **Stop-AzureRmSqlDatabaseActivity** cmdlet cancels the asynchronous updatesl
2727
### Example 1: Cancel the asynchronous updateslo operation on the database
2828
```
2929
PS C:\>Stop-AzureRmSqlDatabaseActivity -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -OperationId af97005d-9243-4f8a-844e-402d1cc855f5
30+
3031
OperationId : af97005d-9243-4f8a-844e-402d1cc855f5
3132
ServerName : Server01
3233
DatabaseName : Database01

0 commit comments

Comments
 (0)