Skip to content

Commit c747383

Browse files
authored
Merge pull request #7 from Azure/preview
Sync
2 parents 7d78cf6 + 05f335a commit c747383

File tree

263 files changed

+182463
-104236
lines changed

Some content is hidden

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

263 files changed

+182463
-104236
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33

44
# Include the build.
55
!src/Package/Release/ResourceManager/**/*
6-
!src/Package/Debug/ResourceManager/**/*
6+
!src/Package/Debug/ResourceManager/**/*
7+
!tools/InstallationTests/NetcoreTests/**/*

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ services:
1313
before_install:
1414
- sudo apt-get update
1515
- sudo apt-get install docker-ce
16+
- curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
17+
- curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
18+
- sudo apt-get update
19+
- sudo apt-get install -y powershell
20+
- sudo pwsh -NonInteractive -NoLogo -NoProfile -Command "Install-Module platyPS -Force -Confirm:\$false -Scope CurrentUser"
1621

1722
script:
1823
- dotnet msbuild build.proj /t:BuildNetcore /p:Configuration=$CONFIG

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ FROM microsoft/powershell
22

33
ARG CONFIG=Release
44

5-
COPY src/Package/${CONFIG}/ResourceManager /usr/local/share/powershell/Modules
5+
COPY src/Package/${CONFIG}/ResourceManager/AzureResourceManager /usr/local/share/powershell/Modules
6+
COPY tools/InstallationTests/NetcoreTests /azpstests

TestMappings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
"src/ResourceManager/DataLakeStore/": [
4545
".\\src\\ResourceManager\\DataLakeStore\\Commands.DataLakeStore.Test\\bin\\Debug\\Microsoft.Azure.Commands.DataLake.Test.dll"
4646
],
47+
"src/ResourceManager/DataMigration/": [
48+
".\\src\\ResourceManager\\DataMigration\\Commands.DataMigration.Test\\bin\\Debug\\Microsoft.Azure.Commands.DataMigration.Test.dll"
49+
],
4750
"src/ResourceManager/DevTestLabs/": [],
4851
"src/ResourceManager/Dns/": [
4952
".\\src\\ResourceManager\\Dns\\Commands.Dns.Test\\bin\\Debug\\Microsoft.Azure.Commands.Dns.Test.dll"

build.proj

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
<NuGetLocalBuildTaskPackages>-PackagesDirectory $(LibraryToolsFolder)\BuildPackagesTask\packages</NuGetLocalBuildTaskPackages>
150150

151151
<PowerShellCommand Condition=" '$(PowerShellCommand)' == '' ">C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</PowerShellCommand>
152+
<PowerShellCoreCommand Condition=" '$(PowerShellCoreCommand)' == '' ">pwsh</PowerShellCoreCommand>
152153
</PropertyGroup>
153154

154155
<!--
@@ -271,54 +272,54 @@
271272

272273
<!-- Delete powershell runtime files -->
273274
<ItemGroup>
274-
<RedundantDlls Include="$(PackageDirectory)\**\netcoreapp2.0\publish\Microsoft.Powershell.*.dll" />
275-
<RedundantDlls Include="$(PackageDirectory)\**\netcoreapp2.0\publish\System*.dll"
276-
Exclude="$(PackageDirectory)\**\netcoreapp2.0\publish\System.Security.Cryptography.ProtectedData.dll" />
277-
<RedundantDlls Include="$(PackageDirectory)\**\netcoreapp2.0\publish\Microsoft.VisualBasic.dll" />
278-
<RedundantDlls Include="$(PackageDirectory)\**\netcoreapp2.0\publish\Microsoft.CSharp.dll" />
279-
<RedundantDlls Include="$(PackageDirectory)\**\netcoreapp2.0\publish\Microsoft.CodeAnalysis.dll" />
280-
<RedundantDlls Include="$(PackageDirectory)\**\netcoreapp2.0\publish\Microsoft.CodeAnalysis.CSharp.dll" />
275+
<RedundantDlls Include="$(PackageDirectory)\**\publish\Microsoft.Powershell.*.dll" />
276+
<RedundantDlls Include="$(PackageDirectory)\**\publish\System*.dll"
277+
Exclude="$(PackageDirectory)\**\publish\System.Security.Cryptography.ProtectedData.dll" />
278+
<RedundantDlls Include="$(PackageDirectory)\**\publish\Microsoft.VisualBasic.dll" />
279+
<RedundantDlls Include="$(PackageDirectory)\**\publish\Microsoft.CSharp.dll" />
280+
<RedundantDlls Include="$(PackageDirectory)\**\publish\Microsoft.CodeAnalysis.dll" />
281+
<RedundantDlls Include="$(PackageDirectory)\**\publish\Microsoft.CodeAnalysis.CSharp.dll" />
281282
</ItemGroup>
282283

283284
<Delete Files="@(RedundantDlls->'%(FullPath)')"/>
284285

285-
<!-- Copy content of the publish folder one folders up -->
286+
<!-- Copy content of the publish folder one folder up. -->
286287
<ItemGroup>
287-
<PackageContent Include="$(PackageDirectory)\**\netcoreapp2.0\publish\*.*" />
288+
<PackageContent Include="$(PackageDirectory)\**\publish\*.*" />
288289
<SourceFile Include="@(PackageContent)">
289290
<DestinationFolder>$([System.IO.Path]::Combine('%(RelativeDir)', '..', '%(FileName)%(Extension)'))</DestinationFolder>
290291
</SourceFile>
291292
</ItemGroup>
292293

293294
<Copy SourceFiles="@(SourceFile->'%(FullPath)')" DestinationFiles="@(SourceFile->'%(DestinationFolder)')" SkipUnchangedFiles="true"/>
294295

295-
<!-- Move PSD1 files one folders up -->
296-
<ItemGroup>
297-
<psdFiles Include="$(PackageDirectory)\**\netcoreapp2.0\*.psd1" />
298-
<psdFilesTarget Include="@(psdFiles)">
299-
<DestinationFolder>$([System.IO.Path]::Combine('%(RelativeDir)', '..', '%(FileName)%(Extension)'))</DestinationFolder>
300-
</psdFilesTarget>
301-
</ItemGroup>
302-
303-
<Move SourceFiles="@(psdFilesTarget->'%(FullPath)')" DestinationFiles="@(psdFilesTarget->'%(DestinationFolder)')"/>
304-
305296
<!-- Delete build artifacts -->
306297
<ItemGroup>
307-
<GetAllFiles Include="$(PackageDirectory)\**\netcoreapp2.0\publish\*.*" />
298+
<GetAllFiles Include="$(PackageDirectory)\**\publish\*.*" />
308299
<Artifacts Include="@(GetAllFiles->'%(RootDir)%(Directory)'->Distinct())" />
309300
</ItemGroup>
310301

311302
<RemoveDir Directories="%(Artifacts.Identity)" ContinueOnError="true" />
312303

313304
<ItemGroup>
314-
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureRM.Resources.Netcore\AzureRM.Tags.Netcore.psd1" />
315-
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureRM.Websites.Netcore\AzureRM.Resources.Netcore.psd1" />
316-
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureRM.Websites.Netcore\AzureRM.Tags.Netcore.psd1" />
317-
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureRM.Network.Netcore\AzureRM.Resources.Netcore.psd1" />
318-
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureRM.Network.Netcore\AzureRM.Tags.Netcore.psd1" />
305+
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureResourceManager\AzureRM.Resources.Netcore\AzureRM.Tags.Netcore.psd1" />
306+
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureResourceManager\AzureRM.Websites.Netcore\AzureRM.Resources.Netcore.psd1" />
307+
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureResourceManager\AzureRM.Websites.Netcore\AzureRM.Tags.Netcore.psd1" />
308+
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureResourceManager\AzureRM.Network.Netcore\AzureRM.Resources.Netcore.psd1" />
309+
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureResourceManager\AzureRM.Network.Netcore\AzureRM.Tags.Netcore.psd1" />
319310
</ItemGroup>
320311

321312
<Delete Files="@(ExtraPsdFiles->'%(FullPath)')"/>
313+
314+
<!-- Update module manifests. -->
315+
<Exec Command="&quot;$(PowerShellCoreCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\UpdateModules.ps1 $(Configuration) AzureRM.Netcore -Profile Latest &quot; " Condition="'$(Latest)' == 'true' and '$(CodeSign)' == 'false'"/>
316+
317+
<!-- Generate the help. -->
318+
<Exec Command="&quot;$(PowerShellCoreCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\GenerateHelp.ps1 -GenerateMamlHelp -BuildConfig $(Configuration) &quot;" ContinueOnError="true" Condition=" '$(SkipHelp)' == 'false' and '$(Latest)' == 'true'"/>
319+
320+
<!-- Cleanup extraneous files. -->
321+
<Exec Command="&quot;$(PowerShellCoreCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\CleanupBuild.ps1 -BuildConfig $(Configuration) &quot;" />
322+
322323
<CallTarget Targets="CodeSignBinaries" Condition=" '$(CodeSign)' == 'true' " />
323324
</Target>
324325

@@ -368,7 +369,6 @@
368369
<Output TaskParameter="Path" PropertyName="WindowsSdkPath"/>
369370
</GetFrameworkSdkPath>
370371

371-
372372
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM.Netcore\AzureRM.Netcore.psd1"
373373
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" Condition= " '$(NetCore)' == 'true' "/>
374374

@@ -531,6 +531,9 @@
531531
<!-- Run checkin tests for each pull request -->
532532
<Target Name="Test" DependsOnTargets="BeforeRunTests">
533533
<Message Importance="high" Text="Running check in tests..." />
534+
<!-- Run Pester tests -->
535+
<Exec Command="&quot;$(PowerShellCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;$(MSBuildProjectDirectory)\tools\Modules\Run-UnitTests.ps1&quot;"
536+
ContinueOnError="ErrorAndContinue"/>
534537
<CallTarget Targets="InvokeXUnit"/>
535538
</Target>
536539

setup/azurecmdfiles.wxi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,23 @@
516516
<File Id="fil509D1E7494560B2BB3462B8FAD7954CF" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DataLakeStore\Microsoft.Azure.Management.DataLake.Store.dll" />
517517
</Component>
518518
</Directory>
519+
<Directory Id="dir737D4AB8FD306B33AFF72CE69894AEC6" Name="AzureRM.DataMigration">
520+
<Component Id="cmpF537AF8D3332C6ECBEC0516187F2220F" Guid="*">
521+
<File Id="fil38B67D67DD39331782A801AB1268A382" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DataMigration\AzureRM.DataMigration.psd1" />
522+
</Component>
523+
<Component Id="cmp62BC16A48F4AAB22EAFDB6EA8C458B36" Guid="*">
524+
<File Id="filB3373AF76FB37D674E8110F7B07D406B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DataMigration\AzureRM.DataMigration.psm1" />
525+
</Component>
526+
<Component Id="cmpB20E0977CD0B2DFD15CEFF2F07F39AB9" Guid="*">
527+
<File Id="filBFF0F6B3EE0CADBC6E8D145D70B031BB" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DataMigration\Microsoft.Azure.Commands.DataMigration.dll" />
528+
</Component>
529+
<Component Id="cmp8D46A82F0869AFC4C01CACAC464F81E9" Guid="*">
530+
<File Id="fil6EA1FAE6CF33BFDC7C44362C0A050A09" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DataMigration\Microsoft.Azure.Commands.DataMigration.dll-Help.xml" />
531+
</Component>
532+
<Component Id="cmp636578DE56B109ECA4CF967ED6BE2823" Guid="*">
533+
<File Id="fil9172B5B303F5B98071CEC5BDA731C87B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DataMigration\Microsoft.Azure.Management.DataMigration.dll" />
534+
</Component>
535+
</Directory>
519536
<Directory Id="dir58E771D29F659E11F33C1EBA94EBEC2D" Name="AzureRM.DevTestLabs">
520537
<Component Id="cmpB88BB2B8DA875D258057401A820E82D6" Guid="*">
521538
<File Id="filE1512C82B1E6F38CDFD909FFD8C61C64" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\AzureRM.DevTestLabs.psd1" />
@@ -3282,6 +3299,11 @@
32823299
<ComponentRef Id="cmp3E5522CBA7172D5BE69D628639359496" />
32833300
<ComponentRef Id="cmp001FEDC74DD7D918EFE88F2EB8E4285C" />
32843301
<ComponentRef Id="cmp3C96010EFA751762A76B66B811613835" />
3302+
<ComponentRef Id="cmpF537AF8D3332C6ECBEC0516187F2220F" />
3303+
<ComponentRef Id="cmp62BC16A48F4AAB22EAFDB6EA8C458B36" />
3304+
<ComponentRef Id="cmpB20E0977CD0B2DFD15CEFF2F07F39AB9" />
3305+
<ComponentRef Id="cmp8D46A82F0869AFC4C01CACAC464F81E9" />
3306+
<ComponentRef Id="cmp636578DE56B109ECA4CF967ED6BE2823" />
32853307
<ComponentRef Id="cmpB88BB2B8DA875D258057401A820E82D6" />
32863308
<ComponentRef Id="cmp727F3C3BF9F149CC43CD2F72DB01F9AF" />
32873309
<ComponentRef Id="cmpCF89ADAF131C4033F0441CD44BD5AFF9" />

src/ResourceManager/AnalysisServices/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription
2122

2223
## Version 0.6.1
2324
* Remove validate set of location into dynamic lookup so that all clouds are supported.

src/ResourceManager/ApiManagement/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
## Current Release
21+
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
22+
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription
2123

2224
## Version 5.0.1
2325
* Fixed assembly loading issue that caused some cmdlets to fail when executing

src/ResourceManager/ApplicationInsights/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
## Current Release
21+
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
22+
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription
2123

2224
## Version 0.1.0
2325
* Add commands to get/create/remove applicaiton insights resource

src/ResourceManager/ApplicationInsights/Commands.ApplicationInsights/ApplicationInsights/ApplicationInsightsBaseCmdlet.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,11 @@ public IApplicationInsightsManagementClient AppInsightsManagementClient
9999
{
100100
if (appInsightsManagementClientWrapper == null)
101101
{
102-
appInsightsManagementClientWrapper = new ApplicationInsightsManagementClientWrapper(DefaultProfile.DefaultContext)
103-
{
104-
VerboseLogger = WriteVerboseWithTimestamp,
105-
ErrorLogger = WriteErrorWithTimestamp
106-
};
102+
appInsightsManagementClientWrapper = new ApplicationInsightsManagementClientWrapper(DefaultProfile.DefaultContext);
107103
}
108104

105+
this.appInsightsManagementClientWrapper.VerboseLogger = WriteVerboseWithTimestamp;
106+
this.appInsightsManagementClientWrapper.ErrorLogger = WriteErrorWithTimestamp;
109107
return appInsightsManagementClientWrapper.appInsightsManagementClient;
110108
}
111109

src/ResourceManager/Automation/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
## Current Release
21+
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
22+
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription
2123

2224
## Version 4.1.1
2325
* Update to Import-AzureRMAutomationRunbook

src/ResourceManager/AzureBackup/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
## Current Release
21+
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
22+
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription
2123

2224
## Version 4.0.1
2325
* Fixed assembly loading issue that caused some cmdlets to fail when executing

src/ResourceManager/AzureBatch/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
## Current Release
21+
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
22+
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription
2123

2224
## Version 4.0.3
2325
* Fixed a bug where account operations without a resource group failed to auto-detect the resource group.

src/ResourceManager/AzureBatch/Commands.Batch/BatchCmdletBase.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ public BatchClient BatchClient
3434
if (batchClient == null)
3535
{
3636
batchClient = new BatchClient(DefaultContext);
37-
batchClient.VerboseLogger = WriteVerboseWithTimestamp;
3837
}
38+
39+
this.batchClient.VerboseLogger = WriteVerboseWithTimestamp;
3940
return batchClient;
4041
}
4142

src/ResourceManager/Cdn/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
## Current Release
21+
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
22+
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription
2123

2224
## Version 4.0.0
2325
* Add support for online help

src/ResourceManager/CognitiveServices/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
## Current Release
21+
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
22+
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription
2123

2224
## Version 0.9.0
2325
* Add support for online help

src/ResourceManager/CognitiveServices/Commands.Management.CognitiveServices/CognitiveServicesAccount/CognitiveServicesAccountBaseCmdlet.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,11 @@ public ICognitiveServicesManagementClient CognitiveServicesClient
8585
{
8686
if (cognitiveServicesClientWrapper == null)
8787
{
88-
cognitiveServicesClientWrapper = new CognitiveServicesManagementClientWrapper(DefaultProfile.DefaultContext)
89-
{
90-
VerboseLogger = WriteVerboseWithTimestamp,
91-
ErrorLogger = WriteErrorWithTimestamp
92-
};
88+
cognitiveServicesClientWrapper = new CognitiveServicesManagementClientWrapper(DefaultProfile.DefaultContext);
9389
}
9490

91+
this.cognitiveServicesClientWrapper.VerboseLogger = WriteVerboseWithTimestamp;
92+
this.cognitiveServicesClientWrapper.ErrorLogger = WriteErrorWithTimestamp;
9593
return cognitiveServicesClientWrapper.CognitiveServicesManagementClient;
9694
}
9795

src/ResourceManager/Common/Commands.Common.Strategies/Commands.Common.Strategies.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
<Reference Include="System.Xml" />
5656
</ItemGroup>
5757
<ItemGroup>
58-
<Compile Include="IReportProgress.cs" />
5958
<Compile Include="IResourceConfig.cs" />
6059
<Compile Include="IResourceConfigVisitor.cs" />
6160
<Compile Include="IResourceStrategy.cs" />
6261
<Compile Include="IShouldProcess.cs" />
62+
<Compile Include="ITaskProgress.cs" />
6363
<Compile Include="ProgressMap.cs" />
6464
<Compile Include="TimeSlot.cs" />
6565
<Compile Include="StateOperationContext.cs" />

src/ResourceManager/Common/Commands.Common.Strategies/IReportProgress.cs

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
namespace Microsoft.Azure.Commands.Common.Strategies
2+
{
3+
/// <summary>
4+
/// Task progress.
5+
/// </summary>
6+
public interface ITaskProgress
7+
{
8+
/// <summary>
9+
/// Resource configuration related to the task.
10+
/// </summary>
11+
IResourceConfig Config { get; }
12+
13+
/// <summary>
14+
/// Absolute progress [0..1].
15+
/// </summary>
16+
/// <returns></returns>
17+
double GetProgress();
18+
19+
/// <summary>
20+
/// true if the task is done.
21+
/// </summary>
22+
bool IsDone { get; }
23+
}
24+
}

src/ResourceManager/Common/Commands.Common.Strategies/NestedResourceStrategy.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ public NestedResourceStrategy(
3939
public static class NestedResourceStrategy
4040
{
4141
public static NestedResourceStrategy<TModel, TParentModel> Create<TModel, TParentModel>(
42-
string header,
42+
string provider,
4343
Func<TParentModel, string, TModel> get,
4444
Action<TParentModel, string, TModel> createOrUpdate)
4545
where TModel : class
4646
where TParentModel : class
4747
=> new NestedResourceStrategy<TModel, TParentModel>(
48-
name => new[] { header, name},
48+
name => new[] { provider, name},
4949
get,
5050
createOrUpdate);
5151
}

0 commit comments

Comments
 (0)