Skip to content

Commit 3af4dd8

Browse files
committed
PR feedback
1 parent 805f52d commit 3af4dd8

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/Sql/Sql/ChangeLog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
## Upcoming Release
2121
* Updated cmdlets with plural nouns to singular, and deprecated plural names.
2222
* Enhanced process of multiple columns classification.
23-
* Include sku properties (sku name, family, capacity) in resposne from Get-AzSqlServerServiceObjective and format as table by default.
23+
* Include sku properties (sku name, family, capacity) in response from Get-AzSqlServerServiceObjective and format as table by default.
2424

2525
## Version 1.8.0
2626
* Support Database Data Classification.

src/Sql/Sql/ServiceObjective/Cmdlet/GetAzureSqlServerServiceObjective.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected override IEnumerable<AzureSqlServerServiceObjectiveModel> GetEntity()
4444
{
4545
ICollection<AzureSqlServerServiceObjectiveModel> results = null;
4646

47-
if (this.MyInvocation.BoundParameters.ContainsKey("ServiceObjectiveName"))
47+
if (this.MyInvocation.BoundParameters.ContainsKey("ServiceObjectiveName") && !WildcardPattern.ContainsWildcardCharacters(ServiceObjectiveName))
4848
{
4949
results = ModelAdapter.GetServiceObjective(
5050
this.ResourceGroupName,

src/Sql/Sql/ServiceObjective/Service/AzureSqlServerServiceObjectiveAdapter.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ public List<AzureSqlServerServiceObjectiveModel> GetServiceObjective(string reso
6868
var capabilities = CapabilitiesCommunicator.Get(server.Location);
6969

7070
return (
71-
from sv in FilterByName(capabilities.SupportedServerVersions, server.Version)
72-
from e in sv.SupportedEditions
73-
from slo in FilterByName(e.SupportedServiceLevelObjectives, serviceObjectiveName)
74-
select CreateServiceObjectiveModelFromResponse(e, slo, resourceGroupName, serverName)).ToList();
71+
from serverVersion in FilterByName(capabilities.SupportedServerVersions, server.Version)
72+
from edition in serverVersion.SupportedEditions
73+
from serviceObjective in FilterByName(edition.SupportedServiceLevelObjectives, serviceObjectiveName)
74+
select CreateServiceObjectiveModelFromResponse(edition, serviceObjective, resourceGroupName, serverName)).ToList();
7575
}
7676

7777
/// <summary>
@@ -86,10 +86,10 @@ public List<AzureSqlServerServiceObjectiveModel> ListServiceObjectives(string re
8686
var capabilities = CapabilitiesCommunicator.Get(server.Location);
8787

8888
return (
89-
from sv in FilterByName(capabilities.SupportedServerVersions, server.Version)
90-
from e in sv.SupportedEditions
91-
from slo in e.SupportedServiceLevelObjectives
92-
select CreateServiceObjectiveModelFromResponse(e, slo, resourceGroupName, serverName)).ToList();
89+
from serverVersion in FilterByName(capabilities.SupportedServerVersions, server.Version)
90+
from edition in serverVersion.SupportedEditions
91+
from serviceObjective in edition.SupportedServiceLevelObjectives
92+
select CreateServiceObjectiveModelFromResponse(edition, serviceObjective, resourceGroupName, serverName)).ToList();
9393
}
9494

9595
/// <summary>

0 commit comments

Comments
 (0)