Skip to content

Commit

Permalink
Merge pull request #4 from Azure/master
Browse files Browse the repository at this point in the history
Sync
  • Loading branch information
bashahee authored Jul 14, 2019
2 parents 9b2fcda + 45a880a commit d17febf
Show file tree
Hide file tree
Showing 563 changed files with 674,571 additions and 313,737 deletions.
157 changes: 120 additions & 37 deletions ChangeLog.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
<!-- Delete powershell runtime files -->
<PropertyGroup>
<RuntimeDllsIncludeList>Microsoft.Powershell.*.dll,System*.dll,Microsoft.VisualBasic.dll,Microsoft.CSharp.dll,Microsoft.CodeAnalysis.dll,Microsoft.CodeAnalysis.CSharp.dll</RuntimeDllsIncludeList>
<RuntimeDllsExcludeList>System.Security.Cryptography.ProtectedData.dll,System.Configuration.ConfigurationManager.dll,System.Runtime.CompilerServices.Unsafe.dll,System.IO.FileSystem.AccessControl.dll,System.Buffers.dll,System.Text.Encodings.Web.dll,System.CodeDom.dll</RuntimeDllsExcludeList>
<RuntimeDllsExcludeList>System.Security.Cryptography.ProtectedData.dll,System.Configuration.ConfigurationManager.dll,System.Runtime.CompilerServices.Unsafe.dll,System.IO.FileSystem.AccessControl.dll,System.Buffers.dll,System.Text.Encodings.Web.dll,System.CodeDom.dll,System.Management.dll</RuntimeDllsExcludeList>
</PropertyGroup>
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Get-ChildItem -Path $(RepoArtifacts)/$(Configuration) -Recurse -Include $(RuntimeDllsIncludeList) -Exclude $(RuntimeDllsExcludeList) | Where-Object {$_.FullName -notlike '*PreloadAssemblies*' -and $_.FullName -notlike '*NetCoreAssemblies*'} | Remove-Item -Force&quot;" />
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Get-ChildItem -Path $(RepoArtifacts)/$(Configuration) -Recurse -Include 'runtimes' | Remove-Item -Recurse -Force&quot;" Condition="'$(CodeSign)' == 'true'" />
Expand Down
2 changes: 1 addition & 1 deletion documentation/development-docs/help-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ All MAML files containing the help content for cmdlets have been removed from th

In order to use the cmdlets necessary to update the markdown help files (or generate MAML help locally from these markdown files), you must first install the `platyPS` module mentioned previously. You will need to install a minimum version of 0.11.0.

To do so, you can can follow the below steps (which are outlined in the [**Quick start**](https://github.com/PowerShell/platyPS#quick-start) section of the `platyPS` README):
To do so, you can follow the below steps (which are outlined in the [**Quick start**](https://github.com/PowerShell/platyPS#quick-start) section of the `platyPS` README):

```powershell
Install-Module -Name platyPS -Scope CurrentUser
Expand Down
2 changes: 1 addition & 1 deletion documentation/migration-guides/migration-guide.4.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ $a = $s1.NewResource.ServiceBusRuleId
```

### Set-AzureRmDiagnosticSettings
- The command is going to be renamed to `Update-AzureRmDiagnsoticSettings`
- The command is going to be renamed to `Update-AzureRmDiagnosticSettings`

```powershell
# Old
Expand Down
541 changes: 541 additions & 0 deletions src/Accounts/Accounts.Test/ModuleAdapterTests.cs

Large diffs are not rendered by default.

81 changes: 81 additions & 0 deletions src/Accounts/Accounts.Test/ServiceProfileTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.Profile.CommonModule;
using Microsoft.Azure.Commands.Profile.Properties;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Xunit;

namespace Microsoft.Azure.Commands.Profile.Test
{
public class ServiceProfileTests
{
[Theory]
[InlineData("hybrid2019-03", "March", "2019")]
[InlineData("prod2019-04-30", "April", "2019")]
[InlineData("profile2018-06-30", "June", "2018")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestDate(string profile, string month, string year)
{
var expectedDateString = $" This profile was defined in {month} {year}.";
Assert.Equal(expectedDateString, PSAzureServiceProfile.GetDateString(profile));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestDateNegative()
{
Assert.Equal(string.Empty, PSAzureServiceProfile.GetDateString("profile-foo"));
Assert.Equal(string.Empty, PSAzureServiceProfile.GetDateString("profile2019-20"));
Assert.Equal(string.Empty, PSAzureServiceProfile.GetDateString("profile-2019-20"));
Assert.Equal(string.Empty, PSAzureServiceProfile.GetDateString("profile-20-30-40"));
Assert.Equal(string.Empty, PSAzureServiceProfile.GetDateString("profile-20195-30-40"));
}

[Theory]
[InlineData("hybrid2019-03", "Hybrid", "March", "2019")]
[InlineData("prod2019-04-30", "Prod", "April", "2019")]
[InlineData("profile2018-06-30", "Sovereign", "June", "2018")]
[InlineData("2019-05-17", "Prod", "May", "2019")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestDescription(string name, string profileType, string month, string year)
{
string expected = Resources.ProdProfileDescription; ;
switch(profileType)
{
case "Hybrid":
expected = Resources.HybridProfileDescription;
break;
case "Sovereign":
expected = Resources.SovereignProfileDescription;
break;
}

var expectedReturnValue = $"{expected} This profile was defined in {month} {year}.";
Assert.Equal(expectedReturnValue, PSAzureServiceProfile.GetProfileDescription(name));
}

[Theory]
[InlineData(null)]
[InlineData("")]
[InlineData("prod-2019")]
[InlineData("arandomstringofletters")]
[InlineData("201956")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestDescriptionNegative(string name)
{
Assert.Equal(Resources.ProdProfileDescription, PSAzureServiceProfile.GetProfileDescription(name));
}
}
}
15 changes: 15 additions & 0 deletions src/Accounts/Accounts/Accounts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,20 @@
<ProjectReference Include="..\Authentication.ResourceManager\Authentication.ResourceManager.csproj" />
<ProjectReference Include="..\Authentication\Authentication.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

</Project>
32 changes: 32 additions & 0 deletions src/Accounts/Accounts/Accounts.format.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,37 @@
</ListEntries>
</ListControl>
</View>
<View>
<Name>Microsoft.Azure.Commands.Profile.CommonModule.PSAzureServiceProfile</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.Commands.Profile.CommonModule.PSAzureServiceProfile</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Alignment>Left</Alignment>
<Label>Name</Label>
</TableColumnHeader>
<TableColumnHeader>
<Alignment>Left</Alignment>
<Label>Description</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<Alignment>Left</Alignment>
<PropertyName>Name</PropertyName>
</TableColumnItem>
<TableColumnItem>
<Alignment>Left</Alignment>
<PropertyName>Description</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
</ViewDefinitions>
</Configuration>
14 changes: 6 additions & 8 deletions src/Accounts/Accounts/Az.Accounts.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 6/11/2019
# Generated on: 6/19/2019
#

@{
Expand All @@ -12,7 +12,7 @@
# RootModule = ''

# Version number of this module.
ModuleVersion = '1.5.3'
ModuleVersion = '1.6.0'

# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'
Expand Down Expand Up @@ -106,7 +106,7 @@ CmdletsToExport = 'Disable-AzDataCollection', 'Disable-AzContextAutosave',
'Disconnect-AzAccount', 'Get-AzContextAutosaveSetting',
'Set-AzDefault', 'Get-AzDefault', 'Clear-AzDefault',
'Register-AzModule', 'Enable-AzureRmAlias', 'Disable-AzureRmAlias',
'Uninstall-AzureRm'
'Uninstall-AzureRm', 'Get-AzProfile', 'Select-AzProfile'

# Variables to export from this module
# VariablesToExport = @()
Expand Down Expand Up @@ -143,11 +143,9 @@ PrivateData = @{
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '* Fix bug with incorrect URL being used in some cases for Functions calls
- More information here: https://github.com/Azure/azure-powershell/issues/8983
* Fix Issue with aliases from AzureRM to Az cmdlets
- Set-AzureRmVMBootDiagnostics -> Set-AzVMBootDiagnostic
- Export-AzureRMLogAnalyticThrottledRequests -> Export-AzLogAnalyticThrottledRequest'
ReleaseNotes = '* Add support for profile cmdlets
* Add support for environments and data planes in generated cmdlets
* Fix bug where incorrect endpoint was being used in some cases for data plane cmdlets in Windows PowerShell'

# Prerelease string of this module
# Prerelease = ''
Expand Down
8 changes: 6 additions & 2 deletions src/Accounts/Accounts/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
- Additional information about change #1
-->
## Upcoming Release
* Update common packages to include new PolicyInsights library
* Fix bug where incorrect endpoint was being used in some cases for data plane cmdlets in Windows PowerShell
* Update common code to use latest version of ClientRuntime

## Version 1.6.0
* Add support for profile cmdlets
* Add support for environments and data planes in generated cmdlets
* Update common packages to include new PolicyInsights library * Fix bug where incorrect endpoint was being used in some cases for data plane cmdlets in Windows PowerShell

## Version 1.5.3
* Fix bug with incorrect URL being used in some cases for Functions calls
Expand Down
Loading

0 comments on commit d17febf

Please sign in to comment.