Skip to content

Commit 203fe52

Browse files
authored
Merge branch 'master' into master
2 parents 8b20511 + d47d4e3 commit 203fe52

File tree

231 files changed

+31232
-19275
lines changed

Some content is hidden

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

231 files changed

+31232
-19275
lines changed

src/Accounts/Accounts/Az.Accounts.psd1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ RequiredAssemblies = '.\Microsoft.Azure.PowerShell.Authentication.Abstractions.d
6464
'.\Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll',
6565
'.\Microsoft.Azure.PowerShell.Clients.Monitor.dll',
6666
'.\Microsoft.Azure.PowerShell.Clients.Network.dll',
67+
'.\Microsoft.Azure.PowerShell.Clients.PolicyInsights.dll',
6768
'.\Microsoft.Azure.PowerShell.Clients.ResourceManager.dll',
6869
'.\Microsoft.Azure.PowerShell.Common.dll',
6970
'.\Microsoft.Azure.PowerShell.Storage.dll',

src/Accounts/Accounts/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Update common packages to include new PolicyInsights library
22+
* Fix bug where incorrect endpoint was being used in some cases for data plane cmdlets in Windows PowerShell
2123

2224
## Version 1.5.3
2325
* Fix bug with incorrect URL being used in some cases for Functions calls

src/Accounts/Authenticators/InteractiveUserAuthenticator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public async override Task<IAccessToken> Authenticate(IAzureAccount account, IAz
3030
{
3131
var auth = new AuthenticationContext(AuthenticationHelpers.GetAuthority(environment, tenant), environment?.OnPremise ?? true, tokenCache as TokenCache ?? TokenCache.DefaultShared);
3232
var response = await auth.AcquireTokenAsync(
33-
environment.ActiveDirectoryServiceEndpointResourceId,
33+
environment.GetEndpoint(resourceId),
3434
AuthenticationHelpers.PowerShellClientId,
3535
new Uri(AuthenticationHelpers.PowerShellRedirectUri),
3636
new PlatformParameters(AuthenticationHelpers.GetPromptBehavior(promptBehavior), new ConsoleParentWindow()),

src/Advisor/Advisor/Az.Advisor.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 5/15/2019
6+
# Generated on: 6/21/2019
77
#
88

99
@{
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.1.1'
15+
ModuleVersion = '1.0.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core', 'Desktop'
@@ -109,7 +109,7 @@ PrivateData = @{
109109
# IconUri = ''
110110

111111
# ReleaseNotes of this module
112-
ReleaseNotes = '* Updated utils to be extensible for future changes'
112+
ReleaseNotes = '* GA release of Az.Advisor'
113113

114114
# Prerelease string of this module
115115
# Prerelease = ''

src/Advisor/Advisor/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
-->
2121
## Upcoming Release
2222

23+
## Version 1.0.0
24+
* GA release of Az.Advisor
25+
2326
## Version 0.1.1
2427
* Updated utils to be extensible for future changes
2528

src/Advisor/Advisor/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
[assembly: CLSCompliant(false)]
2626
[assembly: Guid("860B550A-20CE-4FB1-BAE7-EF10E9221BCE")]
2727

28-
[assembly: AssemblyVersion("0.1.1")]
29-
[assembly: AssemblyFileVersion("0.1.1")]
28+
[assembly: AssemblyVersion("1.0.0")]
29+
[assembly: AssemblyFileVersion("1.0.0")]

src/ApiManagement/ApiManagement.ServiceManagement.Test/ScenarioTests/ApiManagementTests.ps1

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,58 @@ function SubscriptionOldModel-CrudTest {
11301130
Assert-AreEqual $patchedSk $sub.SecondaryKey
11311131
Assert-AreEqual $newSubscriptionState $sub.State
11321132
Assert-AreEqual $patchedExpirationDate $sub.ExpirationDate
1133+
1134+
# Get subscriptions by product id
1135+
$productSubs = Get-AzApiManagementSubscription -Context $context -ProductId $subs[0].ProductId
1136+
1137+
Assert-AreEqual 2 $productSubs.Count
1138+
for ($i = 0; $i -lt $productSubs.Count; $i++)
1139+
{
1140+
Assert-NotNull $productSubs[$i]
1141+
Assert-NotNull $productSubs[$i].SubscriptionId
1142+
Assert-NotNull $productSubs[$i].Scope
1143+
Assert-NotNull $productSubs[$i].State
1144+
Assert-NotNull $productSubs[$i].CreatedDate
1145+
Assert-NotNull $productSubs[$i].PrimaryKey
1146+
Assert-NotNull $productSubs[$i].SecondaryKey
1147+
1148+
Assert-AreEqual $subs[0].ProductId $productSubs[$i].ProductId
1149+
}
1150+
1151+
# Get subscriptions by user id
1152+
$userSubs = Get-AzApiManagementSubscription -Context $context -UserId $subs[0].UserId
1153+
1154+
Assert-AreEqual 3 $userSubs.Count
1155+
for ($i = 0; $i -lt $userSubs.Count; $i++)
1156+
{
1157+
Assert-NotNull $userSubs[$i]
1158+
Assert-NotNull $userSubs[$i].SubscriptionId
1159+
Assert-NotNull $userSubs[$i].Scope
1160+
Assert-NotNull $userSubs[$i].State
1161+
Assert-NotNull $userSubs[$i].CreatedDate
1162+
Assert-NotNull $userSubs[$i].PrimaryKey
1163+
Assert-NotNull $userSubs[$i].SecondaryKey
1164+
1165+
Assert-AreEqual $subs[0].UserId $userSubs[$i].UserId
1166+
}
1167+
1168+
# get Subscriptions by User and Product
1169+
$productUserSubs = Get-AzApiManagementSubscription -Context $context -UserId $subs[0].UserId -ProductId $subs[0].ProductId
1170+
1171+
Assert-AreEqual 2 $productUserSubs.Count
1172+
for ($i = 0; $i -lt $productUserSubs.Count; $i++)
1173+
{
1174+
Assert-NotNull $productUserSubs[$i]
1175+
Assert-NotNull $productUserSubs[$i].SubscriptionId
1176+
Assert-NotNull $productUserSubs[$i].Scope
1177+
Assert-NotNull $productUserSubs[$i].State
1178+
Assert-NotNull $productUserSubs[$i].CreatedDate
1179+
Assert-NotNull $productUserSubs[$i].PrimaryKey
1180+
Assert-NotNull $productUserSubs[$i].SecondaryKey
1181+
1182+
Assert-AreEqual $subs[0].UserId $productUserSubs[$i].UserId
1183+
Assert-AreEqual $subs[0].ProductId $productUserSubs[$i].ProductId
1184+
}
11331185
}
11341186
finally {
11351187
# remove created subscription
@@ -1221,6 +1273,18 @@ function SubscriptionNewModel-CrudTest {
12211273
Assert-AreEqual 1 $sub.UserId
12221274
Assert-NotNull $sub.OwnerId
12231275

1276+
# get subscription by apiId
1277+
$sub = Get-AzApiManagementSubscription -Context $context -Scope $allApisScope
1278+
1279+
Assert-AreEqual $newSubscriptionId $sub.SubscriptionId
1280+
Assert-AreEqual $patchedName $sub.Name
1281+
Assert-AreEqual $patchedPk $sub.PrimaryKey
1282+
Assert-AreEqual $patchedSk $sub.SecondaryKey
1283+
Assert-AreEqual $newSubscriptionState $sub.State
1284+
Assert-AreEqual $patchedExpirationDate $sub.ExpirationDate
1285+
Assert-NotNull $sub.UserId
1286+
Assert-AreEqual 1 $sub.UserId
1287+
Assert-NotNull $sub.OwnerId
12241288
}
12251289
finally {
12261290
# remove created subscription
@@ -2886,7 +2950,8 @@ function ApiVersionSet-CrudTest {
28862950
# there should be no API Version sets initially
28872951
Assert-AreEqual 0 $apiversionsets.Count
28882952

2889-
# create new api
2953+
# create new api and apiVersionSet
2954+
$swaggerApiId1 = getAssetName
28902955
$newApiVersionSetId = getAssetName
28912956
try {
28922957
$newVersionSetName = getAssetName
@@ -2921,8 +2986,24 @@ function ApiVersionSet-CrudTest {
29212986
Assert-AreEqual $description $newApiVersionSet.Description
29222987
Assert-AreEqual Header $newApiVersionSet.VersioningScheme
29232988
Assert-AreEqual $versionHeaderName $newApiVersionSet.VersionHeaderName
2989+
2990+
# now import an api into the ApiVersionSet
2991+
$swaggerPath = Join-Path (Join-Path "$TestOutputRoot" "Resources") "SwaggerPetStoreV2.json"
2992+
$path1 = "swaggerapifromFile"
2993+
$apiVersion = "2"
2994+
2995+
$api = Import-AzApiManagementApi -Context $context -ApiId $swaggerApiId1 -SpecificationPath $swaggerPath -SpecificationFormat Swagger -Path $path1 -ApiVersion $apiVersion -ApiVersionSetId $newApiVersionSetId
2996+
Assert-NotNull $api
2997+
Assert-AreEqual $apiVersion $api.ApiVersion
2998+
Assert-AreEqual $swaggerApiId1 $api.ApiId
2999+
Assert-AreEqual $path1 $api.Path
3000+
Assert-AreEqual $newApiVersionSet.Id $api.ApiVersionSetId
29243001
}
29253002
finally {
3003+
# remove created api
3004+
$removed = Remove-AzApiManagementApi -Context $context -ApiId $swaggerApiId1 -PassThru
3005+
Assert-True { $removed }
3006+
29263007
# remove created api version set
29273008
$removed = Remove-AzApiManagementApiVersionSet -Context $context -ApiVersionSetId $newApiVersionSetId -PassThru
29283009
Assert-True { $removed }

0 commit comments

Comments
 (0)