Skip to content

Commit b5b6f68

Browse files
authored
Merge pull request Azure#9557 from cormacpayne/merge-network-may
Update network-may branch with the latest from master
2 parents bcfff4f + 44081ac commit b5b6f68

File tree

707 files changed

+452663
-145848
lines changed

Some content is hidden

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

707 files changed

+452663
-145848
lines changed

ChangeLog.md

Lines changed: 234 additions & 19 deletions
Large diffs are not rendered by default.

build.proj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@
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>
173-
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Get-ChildItem -Path $(RepoArtifacts)/$(Configuration) -Recurse -Include $(RuntimeDllsIncludeList) -Exclude $(RuntimeDllsExcludeList) | Remove-Item -Recurse -Force&quot;" />
173+
<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'" />
175175

176176
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;. $(RepoTools)/UpdateModules.ps1 -BuildConfig $(Configuration) -Scope $(Scope)&quot;" />

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: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 4/30/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.2'
15+
ModuleVersion = '1.6.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core', 'Desktop'
@@ -64,6 +64,7 @@ RequiredAssemblies = '.\Microsoft.Azure.PowerShell.Authentication.Abstractions.d
6464
'.\Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll',
6565
'.\Microsoft.Azure.PowerShell.Clients.Monitor.dll',
6666
'.\Microsoft.Azure.PowerShell.Clients.Network.dll',
67+
'.\Microsoft.Azure.PowerShell.Clients.PolicyInsights.dll',
6768
'.\Microsoft.Azure.PowerShell.Clients.ResourceManager.dll',
6869
'.\Microsoft.Azure.PowerShell.Common.dll',
6970
'.\Microsoft.Azure.PowerShell.Storage.dll',
@@ -105,7 +106,7 @@ CmdletsToExport = 'Disable-AzDataCollection', 'Disable-AzContextAutosave',
105106
'Disconnect-AzAccount', 'Get-AzContextAutosaveSetting',
106107
'Set-AzDefault', 'Get-AzDefault', 'Clear-AzDefault',
107108
'Register-AzModule', 'Enable-AzureRmAlias', 'Disable-AzureRmAlias',
108-
'Uninstall-AzureRm'
109+
'Uninstall-AzureRm', 'Get-AzProfile', 'Select-AzProfile'
109110

110111
# Variables to export from this module
111112
# VariablesToExport = @()
@@ -142,7 +143,9 @@ PrivateData = @{
142143
# IconUri = ''
143144

144145
# ReleaseNotes of this module
145-
ReleaseNotes = '* Update Authentication Library to fix ADFS issues with username/password auth'
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'
146149

147150
# Prerelease string of this module
148151
# Prerelease = ''

src/Accounts/Accounts/ChangeLog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
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
27+
28+
## Version 1.5.3
2129
* Fix bug with incorrect URL being used in some cases for Functions calls
2230
- More information here: https://github.com/Azure/azure-powershell/issues/8983
2331
* Fix Issue with aliases from AzureRM to Az cmdlets

0 commit comments

Comments
 (0)