Skip to content

Commit

Permalink
Merge pull request #7 from Azure/preview
Browse files Browse the repository at this point in the history
Sync
  • Loading branch information
ranisha2 authored Dec 20, 2017
2 parents 7d78cf6 + 05f335a commit c747383
Show file tree
Hide file tree
Showing 263 changed files with 182,463 additions and 104,236 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@

# Include the build.
!src/Package/Release/ResourceManager/**/*
!src/Package/Debug/ResourceManager/**/*
!src/Package/Debug/ResourceManager/**/*
!tools/InstallationTests/NetcoreTests/**/*
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ services:
before_install:
- sudo apt-get update
- sudo apt-get install docker-ce
- curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
- curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
- sudo apt-get update
- sudo apt-get install -y powershell
- sudo pwsh -NonInteractive -NoLogo -NoProfile -Command "Install-Module platyPS -Force -Confirm:\$false -Scope CurrentUser"

script:
- dotnet msbuild build.proj /t:BuildNetcore /p:Configuration=$CONFIG
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ FROM microsoft/powershell

ARG CONFIG=Release

COPY src/Package/${CONFIG}/ResourceManager /usr/local/share/powershell/Modules
COPY src/Package/${CONFIG}/ResourceManager/AzureResourceManager /usr/local/share/powershell/Modules
COPY tools/InstallationTests/NetcoreTests /azpstests
3 changes: 3 additions & 0 deletions TestMappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
"src/ResourceManager/DataLakeStore/": [
".\\src\\ResourceManager\\DataLakeStore\\Commands.DataLakeStore.Test\\bin\\Debug\\Microsoft.Azure.Commands.DataLake.Test.dll"
],
"src/ResourceManager/DataMigration/": [
".\\src\\ResourceManager\\DataMigration\\Commands.DataMigration.Test\\bin\\Debug\\Microsoft.Azure.Commands.DataMigration.Test.dll"
],
"src/ResourceManager/DevTestLabs/": [],
"src/ResourceManager/Dns/": [
".\\src\\ResourceManager\\Dns\\Commands.Dns.Test\\bin\\Debug\\Microsoft.Azure.Commands.Dns.Test.dll"
Expand Down
55 changes: 29 additions & 26 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
<NuGetLocalBuildTaskPackages>-PackagesDirectory $(LibraryToolsFolder)\BuildPackagesTask\packages</NuGetLocalBuildTaskPackages>

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

<!--
Expand Down Expand Up @@ -271,54 +272,54 @@

<!-- Delete powershell runtime files -->
<ItemGroup>
<RedundantDlls Include="$(PackageDirectory)\**\netcoreapp2.0\publish\Microsoft.Powershell.*.dll" />
<RedundantDlls Include="$(PackageDirectory)\**\netcoreapp2.0\publish\System*.dll"
Exclude="$(PackageDirectory)\**\netcoreapp2.0\publish\System.Security.Cryptography.ProtectedData.dll" />
<RedundantDlls Include="$(PackageDirectory)\**\netcoreapp2.0\publish\Microsoft.VisualBasic.dll" />
<RedundantDlls Include="$(PackageDirectory)\**\netcoreapp2.0\publish\Microsoft.CSharp.dll" />
<RedundantDlls Include="$(PackageDirectory)\**\netcoreapp2.0\publish\Microsoft.CodeAnalysis.dll" />
<RedundantDlls Include="$(PackageDirectory)\**\netcoreapp2.0\publish\Microsoft.CodeAnalysis.CSharp.dll" />
<RedundantDlls Include="$(PackageDirectory)\**\publish\Microsoft.Powershell.*.dll" />
<RedundantDlls Include="$(PackageDirectory)\**\publish\System*.dll"
Exclude="$(PackageDirectory)\**\publish\System.Security.Cryptography.ProtectedData.dll" />
<RedundantDlls Include="$(PackageDirectory)\**\publish\Microsoft.VisualBasic.dll" />
<RedundantDlls Include="$(PackageDirectory)\**\publish\Microsoft.CSharp.dll" />
<RedundantDlls Include="$(PackageDirectory)\**\publish\Microsoft.CodeAnalysis.dll" />
<RedundantDlls Include="$(PackageDirectory)\**\publish\Microsoft.CodeAnalysis.CSharp.dll" />
</ItemGroup>

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

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

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

<!-- Move PSD1 files one folders up -->
<ItemGroup>
<psdFiles Include="$(PackageDirectory)\**\netcoreapp2.0\*.psd1" />
<psdFilesTarget Include="@(psdFiles)">
<DestinationFolder>$([System.IO.Path]::Combine('%(RelativeDir)', '..', '%(FileName)%(Extension)'))</DestinationFolder>
</psdFilesTarget>
</ItemGroup>

<Move SourceFiles="@(psdFilesTarget->'%(FullPath)')" DestinationFiles="@(psdFilesTarget->'%(DestinationFolder)')"/>

<!-- Delete build artifacts -->
<ItemGroup>
<GetAllFiles Include="$(PackageDirectory)\**\netcoreapp2.0\publish\*.*" />
<GetAllFiles Include="$(PackageDirectory)\**\publish\*.*" />
<Artifacts Include="@(GetAllFiles->'%(RootDir)%(Directory)'->Distinct())" />
</ItemGroup>

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

<ItemGroup>
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureRM.Resources.Netcore\AzureRM.Tags.Netcore.psd1" />
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureRM.Websites.Netcore\AzureRM.Resources.Netcore.psd1" />
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureRM.Websites.Netcore\AzureRM.Tags.Netcore.psd1" />
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureRM.Network.Netcore\AzureRM.Resources.Netcore.psd1" />
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureRM.Network.Netcore\AzureRM.Tags.Netcore.psd1" />
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureResourceManager\AzureRM.Resources.Netcore\AzureRM.Tags.Netcore.psd1" />
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureResourceManager\AzureRM.Websites.Netcore\AzureRM.Resources.Netcore.psd1" />
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureResourceManager\AzureRM.Websites.Netcore\AzureRM.Tags.Netcore.psd1" />
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureResourceManager\AzureRM.Network.Netcore\AzureRM.Resources.Netcore.psd1" />
<ExtraPsdFiles Include="$(PackageDirectory)\$(Configuration)\ResourceManager\AzureResourceManager\AzureRM.Network.Netcore\AzureRM.Tags.Netcore.psd1" />
</ItemGroup>

<Delete Files="@(ExtraPsdFiles->'%(FullPath)')"/>

<!-- Update module manifests. -->
<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'"/>

<!-- Generate the help. -->
<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'"/>

<!-- Cleanup extraneous files. -->
<Exec Command="&quot;$(PowerShellCoreCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\CleanupBuild.ps1 -BuildConfig $(Configuration) &quot;" />

<CallTarget Targets="CodeSignBinaries" Condition=" '$(CodeSign)' == 'true' " />
</Target>

Expand Down Expand Up @@ -368,7 +369,6 @@
<Output TaskParameter="Path" PropertyName="WindowsSdkPath"/>
</GetFrameworkSdkPath>


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

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

Expand Down
22 changes: 22 additions & 0 deletions setup/azurecmdfiles.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,23 @@
<File Id="fil509D1E7494560B2BB3462B8FAD7954CF" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DataLakeStore\Microsoft.Azure.Management.DataLake.Store.dll" />
</Component>
</Directory>
<Directory Id="dir737D4AB8FD306B33AFF72CE69894AEC6" Name="AzureRM.DataMigration">
<Component Id="cmpF537AF8D3332C6ECBEC0516187F2220F" Guid="*">
<File Id="fil38B67D67DD39331782A801AB1268A382" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DataMigration\AzureRM.DataMigration.psd1" />
</Component>
<Component Id="cmp62BC16A48F4AAB22EAFDB6EA8C458B36" Guid="*">
<File Id="filB3373AF76FB37D674E8110F7B07D406B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DataMigration\AzureRM.DataMigration.psm1" />
</Component>
<Component Id="cmpB20E0977CD0B2DFD15CEFF2F07F39AB9" Guid="*">
<File Id="filBFF0F6B3EE0CADBC6E8D145D70B031BB" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DataMigration\Microsoft.Azure.Commands.DataMigration.dll" />
</Component>
<Component Id="cmp8D46A82F0869AFC4C01CACAC464F81E9" Guid="*">
<File Id="fil6EA1FAE6CF33BFDC7C44362C0A050A09" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DataMigration\Microsoft.Azure.Commands.DataMigration.dll-Help.xml" />
</Component>
<Component Id="cmp636578DE56B109ECA4CF967ED6BE2823" Guid="*">
<File Id="fil9172B5B303F5B98071CEC5BDA731C87B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DataMigration\Microsoft.Azure.Management.DataMigration.dll" />
</Component>
</Directory>
<Directory Id="dir58E771D29F659E11F33C1EBA94EBEC2D" Name="AzureRM.DevTestLabs">
<Component Id="cmpB88BB2B8DA875D258057401A820E82D6" Guid="*">
<File Id="filE1512C82B1E6F38CDFD909FFD8C61C64" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\AzureRM.DevTestLabs.psd1" />
Expand Down Expand Up @@ -3282,6 +3299,11 @@
<ComponentRef Id="cmp3E5522CBA7172D5BE69D628639359496" />
<ComponentRef Id="cmp001FEDC74DD7D918EFE88F2EB8E4285C" />
<ComponentRef Id="cmp3C96010EFA751762A76B66B811613835" />
<ComponentRef Id="cmpF537AF8D3332C6ECBEC0516187F2220F" />
<ComponentRef Id="cmp62BC16A48F4AAB22EAFDB6EA8C458B36" />
<ComponentRef Id="cmpB20E0977CD0B2DFD15CEFF2F07F39AB9" />
<ComponentRef Id="cmp8D46A82F0869AFC4C01CACAC464F81E9" />
<ComponentRef Id="cmp636578DE56B109ECA4CF967ED6BE2823" />
<ComponentRef Id="cmpB88BB2B8DA875D258057401A820E82D6" />
<ComponentRef Id="cmp727F3C3BF9F149CC43CD2F72DB01F9AF" />
<ComponentRef Id="cmpCF89ADAF131C4033F0441CD44BD5AFF9" />
Expand Down
1 change: 1 addition & 0 deletions src/ResourceManager/AnalysisServices/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Current Release
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription

## Version 0.6.1
* Remove validate set of location into dynamic lookup so that all clouds are supported.
Expand Down
2 changes: 2 additions & 0 deletions src/ResourceManager/ApiManagement/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- Additional information about change #1
-->
## Current Release
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription

## Version 5.0.1
* Fixed assembly loading issue that caused some cmdlets to fail when executing
Expand Down
2 changes: 2 additions & 0 deletions src/ResourceManager/ApplicationInsights/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- Additional information about change #1
-->
## Current Release
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription

## Version 0.1.0
* Add commands to get/create/remove applicaiton insights resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,11 @@ public IApplicationInsightsManagementClient AppInsightsManagementClient
{
if (appInsightsManagementClientWrapper == null)
{
appInsightsManagementClientWrapper = new ApplicationInsightsManagementClientWrapper(DefaultProfile.DefaultContext)
{
VerboseLogger = WriteVerboseWithTimestamp,
ErrorLogger = WriteErrorWithTimestamp
};
appInsightsManagementClientWrapper = new ApplicationInsightsManagementClientWrapper(DefaultProfile.DefaultContext);
}

this.appInsightsManagementClientWrapper.VerboseLogger = WriteVerboseWithTimestamp;
this.appInsightsManagementClientWrapper.ErrorLogger = WriteErrorWithTimestamp;
return appInsightsManagementClientWrapper.appInsightsManagementClient;
}

Expand Down
2 changes: 2 additions & 0 deletions src/ResourceManager/Automation/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- Additional information about change #1
-->
## Current Release
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription

## Version 4.1.1
* Update to Import-AzureRMAutomationRunbook
Expand Down
2 changes: 2 additions & 0 deletions src/ResourceManager/AzureBackup/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- Additional information about change #1
-->
## Current Release
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription

## Version 4.0.1
* Fixed assembly loading issue that caused some cmdlets to fail when executing
Expand Down
2 changes: 2 additions & 0 deletions src/ResourceManager/AzureBatch/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- Additional information about change #1
-->
## Current Release
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription

## Version 4.0.3
* Fixed a bug where account operations without a resource group failed to auto-detect the resource group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ public BatchClient BatchClient
if (batchClient == null)
{
batchClient = new BatchClient(DefaultContext);
batchClient.VerboseLogger = WriteVerboseWithTimestamp;
}

this.batchClient.VerboseLogger = WriteVerboseWithTimestamp;
return batchClient;
}

Expand Down
2 changes: 2 additions & 0 deletions src/ResourceManager/Cdn/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- Additional information about change #1
-->
## Current Release
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription

## Version 4.0.0
* Add support for online help
Expand Down
2 changes: 2 additions & 0 deletions src/ResourceManager/CognitiveServices/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- Additional information about change #1
-->
## Current Release
* Added Location Completer to -Location parameters allowing tab completion through valid Locations
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription

## Version 0.9.0
* Add support for online help
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,11 @@ public ICognitiveServicesManagementClient CognitiveServicesClient
{
if (cognitiveServicesClientWrapper == null)
{
cognitiveServicesClientWrapper = new CognitiveServicesManagementClientWrapper(DefaultProfile.DefaultContext)
{
VerboseLogger = WriteVerboseWithTimestamp,
ErrorLogger = WriteErrorWithTimestamp
};
cognitiveServicesClientWrapper = new CognitiveServicesManagementClientWrapper(DefaultProfile.DefaultContext);
}

this.cognitiveServicesClientWrapper.VerboseLogger = WriteVerboseWithTimestamp;
this.cognitiveServicesClientWrapper.ErrorLogger = WriteErrorWithTimestamp;
return cognitiveServicesClientWrapper.CognitiveServicesManagementClient;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="IReportProgress.cs" />
<Compile Include="IResourceConfig.cs" />
<Compile Include="IResourceConfigVisitor.cs" />
<Compile Include="IResourceStrategy.cs" />
<Compile Include="IShouldProcess.cs" />
<Compile Include="ITaskProgress.cs" />
<Compile Include="ProgressMap.cs" />
<Compile Include="TimeSlot.cs" />
<Compile Include="StateOperationContext.cs" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace Microsoft.Azure.Commands.Common.Strategies
{
/// <summary>
/// Task progress.
/// </summary>
public interface ITaskProgress
{
/// <summary>
/// Resource configuration related to the task.
/// </summary>
IResourceConfig Config { get; }

/// <summary>
/// Absolute progress [0..1].
/// </summary>
/// <returns></returns>
double GetProgress();

/// <summary>
/// true if the task is done.
/// </summary>
bool IsDone { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ public NestedResourceStrategy(
public static class NestedResourceStrategy
{
public static NestedResourceStrategy<TModel, TParentModel> Create<TModel, TParentModel>(
string header,
string provider,
Func<TParentModel, string, TModel> get,
Action<TParentModel, string, TModel> createOrUpdate)
where TModel : class
where TParentModel : class
=> new NestedResourceStrategy<TModel, TParentModel>(
name => new[] { header, name},
name => new[] { provider, name},
get,
createOrUpdate);
}
Expand Down
Loading

0 comments on commit c747383

Please sign in to comment.