Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit efe976d

Browse files
authored
Auditing and utilization feature update (#111)
* Auditing feature update and added PowerShell tasks to the build process
1 parent 63b1b70 commit efe976d

14 files changed

Lines changed: 48 additions & 26 deletions

File tree

ChangeLog.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,18 @@
2222

2323
## Upcoming Release
2424

25-
* Invoices
25+
* Auditing
26+
* Renamed the CreateInvoice operation type to ReadyInvoice.
27+
* Invoices
2628
* Renamed the reconciliation line item objects
2729
* Users
28-
* No longer throw an error when searching for a user with UPN that does not exists.
29-
* Utilization
30+
* No longer throw an error when searching for a user with UPN that does not exists.
31+
* Utilization
3032
* Modified the default end date value for the Get-PartnerCustomerSubscriptionUtilization command to use UTC time.
3133

3234
## 1.5.1903.6
3335

34-
* Products
36+
* Products
3537
* Addressed an issue with requesting products
3638

3739
## 1.5.1903.5

azure-pipelines.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
# .NET Desktop
2-
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
3-
# Add steps that publish symbols, save build artifacts, and more:
4-
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
1+
strategy:
2+
matrix:
3+
Windows:
4+
imageName: 'Windows-2019'
55

66
trigger:
77
- master
88

99
pool:
10-
vmImage: 'Windows-2019'
10+
vmImage: $(imageName)
1111

1212
variables:
1313
buildConfiguration: 'Release'
1414

1515
steps:
1616
- script: dotnet build --configuration $(buildConfiguration)
17-
displayName: 'dotnet build $(buildConfiguration)'
17+
displayName: 'dotnet build $(buildConfiguration)'
18+
19+
- pwsh: 'Install-Module platyPS -Force -Confirm:$false -Scope CurrentUser'
20+
displayName: 'Install platyPS'
21+
22+
- pwsh: 'New-ExternalHelp -Path .\docs\help\ -OutputPath .\src\PowerShell\bin\Release\netstandard2.0'
23+
displayName: 'Generate MAML'
24+
25+
- pwsh: 'Test-ModuleManifest .\src\PowerShell\bin\Release\net461\PartnerCenter.psd1'
26+
displayName: 'Validate Manifest (.NET Framework)'

build/PartnerCenter.NetCore.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package>
33
<metadata>
44
<id>PartnerCenter.NetCore</id>
5-
<version>1.5.1903.2</version>
5+
<version>1.5.1904.1</version>
66
<authors>Microsoft Corporation</authors>
77
<owners>Microsoft</owners>
88
<requireLicenseAcceptance>false</requireLicenseAcceptance>

build/PartnerCenter.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package>
33
<metadata>
44
<id>PartnerCenter</id>
5-
<version>1.5.1903.2</version>
5+
<version>1.5.1904.1</version>
66
<authors>Microsoft Corporation</authors>
77
<owners>Microsoft</owners>
88
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+

2+
// This file is used by Code Analysis to maintain SuppressMessage
3+
// attributes that are applied to this project.
4+
// Project-level suppressions either have no target or are given
5+
// a specific target and scoped to a namespace, type, member, etc.
6+
7+
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Used to detect the content type.", Scope = "member", Target = "~M:Microsoft.Store.PartnerCenter.TestFramework.Network.HttpUtilities.IsXml(System.String)~System.Boolean")]
8+
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Used to detect the content type.", Scope = "member", Target = "~M:Microsoft.Store.PartnerCenter.TestFramework.Network.HttpUtilities.TryFormatJson(System.String)~System.String")]
9+
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Used to detect the content type.", Scope = "member", Target = "~M:Microsoft.Store.PartnerCenter.TestFramework.Network.HttpUtilities.CreateHttpContent(System.String)~System.Net.Http.HttpContent")]
10+
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "When an exception is encountered the unmodified content should be returned.", Scope = "member", Target = "~M:Microsoft.Store.PartnerCenter.TestFramework.Network.HttpUtilities.TryFormatXml(System.String)~System.String")]
11+

src/PartnerCenter.TestFramework/Network/HttpUtilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public static bool IsXml(string content)
148148
XDocument.Parse(content);
149149
return true;
150150
}
151-
catch (Exception)
151+
catch
152152
{
153153
return false;
154154
}

src/PartnerCenter.TestFramework/PartnerCenter.TestFramework.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
<PackageProjectUrl>https://github.com/Microsoft/Partner-Center-PowerShell</PackageProjectUrl>
1313
<RepositoryUrl>https://github.com/Microsoft/Partner-Center-PowerShell.git</RepositoryUrl>
1414
<RepositoryType>git</RepositoryType>
15-
<Version>1.5.1903.7</Version>
15+
<Version>1.5.1904.1</Version>
1616
<NeutralLanguage>en-US</NeutralLanguage>
1717
</PropertyGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.0">
20+
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.1">
2121
<PrivateAssets>all</PrivateAssets>
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
2323
</PackageReference>

src/PartnerCenter/Models/Auditing/OperationType.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ public enum OperationType
202202
IncreaseCreditLimit = 36,
203203

204204
/// <summary>
205-
/// Create invoice
205+
/// An invoice is ready
206206
/// </summary>
207-
CreateInvoice = 37
207+
ReadyInvoice = 37
208208
}
209209
}

src/PartnerCenter/PartnerCenter.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Copyright>Copyright © 2019</Copyright>
1010
<NeutralLanguage>en-US</NeutralLanguage>
1111
<Product>Microsoft Partner Center</Product>
12-
<Version>1.5.1903.7</Version>
12+
<Version>1.5.1904.1</Version>
1313
<PackageLicenseUrl>https://github.com/Microsoft/Partner-Center-PowerShell/blob/master/LICENSE</PackageLicenseUrl>
1414
<PackageProjectUrl>https://github.com/Microsoft/Partner-Center-PowerShell</PackageProjectUrl>
1515
<RepositoryUrl>https://github.com/Microsoft/Partner-Center-PowerShell.git</RepositoryUrl>
@@ -48,7 +48,7 @@
4848
</ItemGroup>
4949

5050
<ItemGroup>
51-
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.0">
51+
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.1">
5252
<PrivateAssets>all</PrivateAssets>
5353
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
5454
</PackageReference>

src/PowerShell/Commands/GetPartnerCustomerSubscriptionUtilization.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public override void ExecuteCmdlet()
8181
StartDate,
8282
EndDate ?? DateTimeOffset.UtcNow,
8383
Granularity ?? AzureUtilizationGranularity.Daily,
84-
(!ShowDetails.IsPresent) || ShowDetails.ToBool()).GetAwaiter().GetResult();
84+
(!ShowDetails.IsPresent) || ShowDetails.ToBool()).ConfigureAwait(false).GetAwaiter().GetResult();
8585

8686
if (utilizationRecords?.TotalCount > 0)
8787
{
@@ -92,7 +92,7 @@ public override void ExecuteCmdlet()
9292
while (enumerator.HasValue)
9393
{
9494
records.AddRange(enumerator.Current.Items.Select(r => new PSAzureUtilizationRecord(r)));
95-
enumerator.NextAsync().GetAwaiter().GetResult();
95+
enumerator.NextAsync().ConfigureAwait(false).GetAwaiter().GetResult();
9696
}
9797

9898
WriteObject(records, true);

0 commit comments

Comments
 (0)