Skip to content

Commit d17febf

Browse files
authored
Merge pull request #4 from Azure/master
Sync
2 parents 9b2fcda + 45a880a commit d17febf

File tree

563 files changed

+674571
-313737
lines changed

Some content is hidden

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

563 files changed

+674571
-313737
lines changed

ChangeLog.md

Lines changed: 120 additions & 37 deletions
Large diffs are not rendered by default.

build.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
<!-- Delete powershell runtime files -->
169169
<PropertyGroup>
170170
<RuntimeDllsIncludeList>Microsoft.Powershell.*.dll,System*.dll,Microsoft.VisualBasic.dll,Microsoft.CSharp.dll,Microsoft.CodeAnalysis.dll,Microsoft.CodeAnalysis.CSharp.dll</RuntimeDllsIncludeList>
171-
<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>
171+
<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>
172172
</PropertyGroup>
173173
<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;" />
174174
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Get-ChildItem -Path $(RepoArtifacts)/$(Configuration) -Recurse -Include 'runtimes' | Remove-Item -Recurse -Force&quot;" Condition="'$(CodeSign)' == 'true'" />

documentation/development-docs/help-generation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ All MAML files containing the help content for cmdlets have been removed from th
88

99
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.
1010

11-
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):
11+
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):
1212

1313
```powershell
1414
Install-Module -Name platyPS -Scope CurrentUser

documentation/migration-guides/migration-guide.4.0.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ $a = $s1.NewResource.ServiceBusRuleId
162162
```
163163

164164
### Set-AzureRmDiagnosticSettings
165-
- The command is going to be renamed to `Update-AzureRmDiagnsoticSettings`
165+
- The command is going to be renamed to `Update-AzureRmDiagnosticSettings`
166166

167167
```powershell
168168
# Old

src/Accounts/Accounts.Test/ModuleAdapterTests.cs

Lines changed: 541 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Microsoft.Azure.Commands.Profile.CommonModule;
16+
using Microsoft.Azure.Commands.Profile.Properties;
17+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
18+
using Xunit;
19+
20+
namespace Microsoft.Azure.Commands.Profile.Test
21+
{
22+
public class ServiceProfileTests
23+
{
24+
[Theory]
25+
[InlineData("hybrid2019-03", "March", "2019")]
26+
[InlineData("prod2019-04-30", "April", "2019")]
27+
[InlineData("profile2018-06-30", "June", "2018")]
28+
[Trait(Category.AcceptanceType, Category.CheckIn)]
29+
public void TestDate(string profile, string month, string year)
30+
{
31+
var expectedDateString = $" This profile was defined in {month} {year}.";
32+
Assert.Equal(expectedDateString, PSAzureServiceProfile.GetDateString(profile));
33+
}
34+
35+
[Fact]
36+
[Trait(Category.AcceptanceType, Category.CheckIn)]
37+
public void TestDateNegative()
38+
{
39+
Assert.Equal(string.Empty, PSAzureServiceProfile.GetDateString("profile-foo"));
40+
Assert.Equal(string.Empty, PSAzureServiceProfile.GetDateString("profile2019-20"));
41+
Assert.Equal(string.Empty, PSAzureServiceProfile.GetDateString("profile-2019-20"));
42+
Assert.Equal(string.Empty, PSAzureServiceProfile.GetDateString("profile-20-30-40"));
43+
Assert.Equal(string.Empty, PSAzureServiceProfile.GetDateString("profile-20195-30-40"));
44+
}
45+
46+
[Theory]
47+
[InlineData("hybrid2019-03", "Hybrid", "March", "2019")]
48+
[InlineData("prod2019-04-30", "Prod", "April", "2019")]
49+
[InlineData("profile2018-06-30", "Sovereign", "June", "2018")]
50+
[InlineData("2019-05-17", "Prod", "May", "2019")]
51+
[Trait(Category.AcceptanceType, Category.CheckIn)]
52+
public void TestDescription(string name, string profileType, string month, string year)
53+
{
54+
string expected = Resources.ProdProfileDescription; ;
55+
switch(profileType)
56+
{
57+
case "Hybrid":
58+
expected = Resources.HybridProfileDescription;
59+
break;
60+
case "Sovereign":
61+
expected = Resources.SovereignProfileDescription;
62+
break;
63+
}
64+
65+
var expectedReturnValue = $"{expected} This profile was defined in {month} {year}.";
66+
Assert.Equal(expectedReturnValue, PSAzureServiceProfile.GetProfileDescription(name));
67+
}
68+
69+
[Theory]
70+
[InlineData(null)]
71+
[InlineData("")]
72+
[InlineData("prod-2019")]
73+
[InlineData("arandomstringofletters")]
74+
[InlineData("201956")]
75+
[Trait(Category.AcceptanceType, Category.CheckIn)]
76+
public void TestDescriptionNegative(string name)
77+
{
78+
Assert.Equal(Resources.ProdProfileDescription, PSAzureServiceProfile.GetProfileDescription(name));
79+
}
80+
}
81+
}

src/Accounts/Accounts/Accounts.csproj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,20 @@
5353
<ProjectReference Include="..\Authentication.ResourceManager\Authentication.ResourceManager.csproj" />
5454
<ProjectReference Include="..\Authentication\Authentication.csproj" />
5555
</ItemGroup>
56+
57+
<ItemGroup>
58+
<Compile Update="Properties\Resources.Designer.cs">
59+
<DesignTime>True</DesignTime>
60+
<AutoGen>True</AutoGen>
61+
<DependentUpon>Resources.resx</DependentUpon>
62+
</Compile>
63+
</ItemGroup>
64+
65+
<ItemGroup>
66+
<EmbeddedResource Update="Properties\Resources.resx">
67+
<Generator>ResXFileCodeGenerator</Generator>
68+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
69+
</EmbeddedResource>
70+
</ItemGroup>
5671

5772
</Project>

src/Accounts/Accounts/Accounts.format.ps1xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,37 @@
139139
</ListEntries>
140140
</ListControl>
141141
</View>
142+
<View>
143+
<Name>Microsoft.Azure.Commands.Profile.CommonModule.PSAzureServiceProfile</Name>
144+
<ViewSelectedBy>
145+
<TypeName>Microsoft.Azure.Commands.Profile.CommonModule.PSAzureServiceProfile</TypeName>
146+
</ViewSelectedBy>
147+
<TableControl>
148+
<TableHeaders>
149+
<TableColumnHeader>
150+
<Alignment>Left</Alignment>
151+
<Label>Name</Label>
152+
</TableColumnHeader>
153+
<TableColumnHeader>
154+
<Alignment>Left</Alignment>
155+
<Label>Description</Label>
156+
</TableColumnHeader>
157+
</TableHeaders>
158+
<TableRowEntries>
159+
<TableRowEntry>
160+
<TableColumnItems>
161+
<TableColumnItem>
162+
<Alignment>Left</Alignment>
163+
<PropertyName>Name</PropertyName>
164+
</TableColumnItem>
165+
<TableColumnItem>
166+
<Alignment>Left</Alignment>
167+
<PropertyName>Description</PropertyName>
168+
</TableColumnItem>
169+
</TableColumnItems>
170+
</TableRowEntry>
171+
</TableRowEntries>
172+
</TableControl>
173+
</View>
142174
</ViewDefinitions>
143175
</Configuration>

src/Accounts/Accounts/Az.Accounts.psd1

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

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

1414
# Version number of this module.
15-
ModuleVersion = '1.5.3'
15+
ModuleVersion = '1.6.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core', 'Desktop'
@@ -106,7 +106,7 @@ CmdletsToExport = 'Disable-AzDataCollection', 'Disable-AzContextAutosave',
106106
'Disconnect-AzAccount', 'Get-AzContextAutosaveSetting',
107107
'Set-AzDefault', 'Get-AzDefault', 'Clear-AzDefault',
108108
'Register-AzModule', 'Enable-AzureRmAlias', 'Disable-AzureRmAlias',
109-
'Uninstall-AzureRm'
109+
'Uninstall-AzureRm', 'Get-AzProfile', 'Select-AzProfile'
110110

111111
# Variables to export from this module
112112
# VariablesToExport = @()
@@ -143,11 +143,9 @@ PrivateData = @{
143143
# IconUri = ''
144144

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

152150
# Prerelease string of this module
153151
# Prerelease = ''

src/Accounts/Accounts/ChangeLog.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@
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
21+
* Update common code to use latest version of ClientRuntime
22+
23+
## Version 1.6.0
24+
* Add support for profile cmdlets
25+
* Add support for environments and data planes in generated cmdlets
26+
* 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
2327

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

0 commit comments

Comments
 (0)