Skip to content

Commit 869662b

Browse files
authored
Merge branch 'master' into xscl11.1
2 parents 15558b5 + c653793 commit 869662b

File tree

8 files changed

+49
-13
lines changed

8 files changed

+49
-13
lines changed

src/EventGrid/EventGrid.Test/EventGrid.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<PackageReference Include="Microsoft.Azure.Management.EventHub" Version="2.5.0" />
1616
<PackageReference Include="Microsoft.Azure.Management.Relay" Version="2.0.2" />
1717
<PackageReference Include="Microsoft.Azure.Management.ServiceBus" Version="2.1.0" />
18-
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="13.1.0" />
18+
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="13.2.0" />
1919
</ItemGroup>
2020

2121
</Project>

src/Storage/Storage.Management.Test/ScenarioTests/StorageBlobTests.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ function Test-StorageBlobContainer
7373
Assert-AreEqual $publicAccess $container.PublicAccess
7474
Assert-AreEqual $metadata.Count $container.Metadata.Count
7575

76-
$containers = Get-AzRmStorageContainer -ResourceGroupName $rgname -StorageAccountName $stoname
76+
$job = Get-AzRmStorageContainer -ResourceGroupName $rgname -StorageAccountName $stoname -AsJob
77+
$job | Wait-Job
78+
$containers = $job.Output
7779
Assert-AreEqual 2 $containers.Count
7880
Assert-AreEqual $containerName $containers[1].Name
7981
Assert-AreEqual $containerName2 $containers[0].Name

src/Storage/Storage.Management.Test/Storage.Management.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="13.1.0" />
14+
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="13.2.0" />
1515
</ItemGroup>
1616

1717
</Project>

src/Storage/Storage.Management/Blob/GetAzureStorageContainer.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Microsoft.Azure.Commands.Management.Storage.Models;
1616
using Microsoft.Azure.Management.Storage;
1717
using Microsoft.Azure.Management.Storage.Models;
18+
using Microsoft.Rest.Azure;
1819
using System;
1920
using System.Collections.Generic;
2021
using System.Management.Automation;
@@ -68,6 +69,9 @@ public class GetAzureStorageContainerCommand : StorageBlobBaseCmdlet
6869
ValueFromPipelineByPropertyName = true)]
6970
public string Name { get; set; }
7071

72+
[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")]
73+
public SwitchParameter AsJob { get; set; }
74+
7175
public override void ExecuteCmdlet()
7276
{
7377
base.ExecuteCmdlet();
@@ -88,10 +92,15 @@ public override void ExecuteCmdlet()
8892
}
8993
else
9094
{
91-
var container = this.StorageClient.BlobContainers.List(
92-
this.ResourceGroupName,
93-
this.StorageAccountName);
94-
WriteContainerList(container);
95+
IPage<ListContainerItem> containerlistResult = this.StorageClient.BlobContainers.List(
96+
this.ResourceGroupName,
97+
this.StorageAccountName);
98+
WriteContainerList(containerlistResult);
99+
while (containerlistResult.NextPageLink != null)
100+
{
101+
containerlistResult = this.StorageClient.BlobContainers.ListNext(containerlistResult.NextPageLink);
102+
WriteContainerList(containerlistResult);
103+
}
95104
}
96105
}
97106
}

src/Storage/Storage.Management/ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
-->
2020
## Upcoming Release
2121
* Upgrade Storage Client Library to 11.1.0
22+
* List containers with Management plane API, will list with NextPageLink
23+
- Get-AzRmStorageContainer
24+
* List Storage accounts from subscription, will list with NextPageLink
25+
- Get-AzStorageAccount
2226

2327
## Version 1.7.0
2428
* Updated example in reference documentation for `Get-AzStorageAccountKey`

src/Storage/Storage.Management/Storage.Management.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<RootNamespace>$(LegacyAssemblyPrefix)$(PsModuleName)</RootNamespace>
1515
</PropertyGroup>
1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="13.1.0" />
17+
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="13.2.0" />
1818
<PackageReference Include="Microsoft.Azure.Storage.Blob" Version="11.1.0" />
1919
<PackageReference Include="Microsoft.Azure.Storage.File" Version="11.1.0" />
2020
<PackageReference Include="Microsoft.Azure.Storage.Queue" Version="11.1.0" />

src/Storage/Storage.Management/StorageAccount/GetAzureStorageAccount.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Microsoft.Azure.Commands.Management.Storage.Models;
1616
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1717
using Microsoft.Azure.Management.Storage;
18+
using Microsoft.Rest.Azure;
1819
using System.Management.Automation;
1920

2021
namespace Microsoft.Azure.Commands.Management.Storage
@@ -57,9 +58,14 @@ public override void ExecuteCmdlet()
5758

5859
if (string.IsNullOrEmpty(this.ResourceGroupName))
5960
{
60-
var storageAccounts = this.StorageClient.StorageAccounts.List();
61-
61+
IPage<Microsoft.Azure.Management.Storage.Models.StorageAccount> storageAccounts = this.StorageClient.StorageAccounts.List();
6262
WriteStorageAccountList(storageAccounts);
63+
64+
while (storageAccounts.NextPageLink != null)
65+
{
66+
storageAccounts = this.StorageClient.StorageAccounts.ListNext(storageAccounts.NextPageLink);
67+
WriteStorageAccountList(storageAccounts);
68+
}
6369
}
6470
else if (string.IsNullOrEmpty(this.Name))
6571
{

src/Storage/Storage.Management/help/Get-AzRmStorageContainer.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
external help file: Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll-Help.xml
33
Module Name: Az.Storage
44
online version: https://docs.microsoft.com/en-us/powershell/module/az.storage/get-azrmstoragecontainer
@@ -14,13 +14,13 @@ Gets or lists Storage blob containers
1414

1515
### AccountName (Default)
1616
```
17-
Get-AzRmStorageContainer [-ResourceGroupName] <String> [-StorageAccountName] <String> [-Name <String>]
17+
Get-AzRmStorageContainer [-ResourceGroupName] <String> [-StorageAccountName] <String> [-Name <String>] [-AsJob]
1818
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
1919
```
2020

2121
### AccountObject
2222
```
23-
Get-AzRmStorageContainer -StorageAccount <PSStorageAccount> [-Name <String>]
23+
Get-AzRmStorageContainer -StorageAccount <PSStorageAccount> [-Name <String>] [-AsJob]
2424
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2525
```
2626

@@ -53,6 +53,21 @@ This command gets a Storage blob container with Storage account object and conta
5353

5454
## PARAMETERS
5555

56+
### -AsJob
57+
Run cmdlet in the background
58+
59+
```yaml
60+
Type: System.Management.Automation.SwitchParameter
61+
Parameter Sets: (All)
62+
Aliases:
63+
64+
Required: False
65+
Position: Named
66+
Default value: None
67+
Accept pipeline input: False
68+
Accept wildcard characters: False
69+
```
70+
5671
### -DefaultProfile
5772
The credentials, account, tenant, and subscription used for communication with azure.
5873

0 commit comments

Comments
 (0)