Skip to content

Commit c2d7fd5

Browse files
author
Aashish Rajaram Salokhe
committed
Update the Policy Insights dll reference to Commom powershell client dll
1 parent 4a3b60e commit c2d7fd5

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/GuestConfiguration/GuestConfiguration.Test/GuestConfiguration.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Management.GuestConfiguration" Version="1.1.0" />
15-
<PackageReference Include="Microsoft.Azure.Management.PolicyInsights" Version="2.0.2" />
15+
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.PolicyInsights" Version="1.3.0-preview" />
1616
</ItemGroup>
1717

1818
</Project>

src/GuestConfiguration/GuestConfiguration.Test/ScenarioTests/TestController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ namespace Microsoft.Azure.Commands.GuestConfiguration.Test.ScenarioTests
2525

2626
using Microsoft.Azure.Commands.Common.Authentication;
2727
using Microsoft.Azure.Management.GuestConfiguration;
28-
using Microsoft.Azure.Management.PolicyInsights;
29-
using Microsoft.Azure.Management.PolicyInsights.Models;
28+
using Microsoft.Azure.Management.PolicyInsights_2018_04;
29+
using Microsoft.Azure.Management.PolicyInsights_2018_04.Models;
3030
using Microsoft.Azure.Test.HttpRecorder;
3131
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
3232
using Microsoft.WindowsAzure.Commands.ScenarioTest;

src/GuestConfiguration/GuestConfiguration/Common/GuestConfigurationCmdletBase.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ namespace Microsoft.Azure.Commands.GuestConfiguration.Common
3030
using Microsoft.Azure.Commands.GuestConfiguration.Models;
3131
using Microsoft.Azure.Management.GuestConfiguration;
3232
using Microsoft.Azure.Management.GuestConfiguration.Models;
33-
using Microsoft.Azure.Management.PolicyInsights;
34-
using Microsoft.Azure.Management.PolicyInsights.Models;
33+
using Microsoft.Azure.Management.PolicyInsights_2018_04;
34+
using Microsoft.Azure.Management.PolicyInsights_2018_04.Models;
3535
using GuestConfigurationErrorResponseException = Management.GuestConfiguration.Models.ErrorResponseException;
3636
using StringResources = Microsoft.Azure.Commands.GuestConfiguration.Properties.Resources;
3737
using ResourceManagerErrorResponseException = Microsoft.Azure.Management.Internal.ResourceManager.Version2018_05_01.Models.ErrorResponseException;
@@ -208,9 +208,9 @@ protected IEnumerable<PolicyStatusDetailed> GetPolicyStatusesDetailedByInitiativ
208208
queryOptions.OrderBy = "Timestamp desc";
209209
queryOptions.Top = 1;
210210
PolicyStatesQueryResults policyDbResults = PolicyInsightsClient.PolicyStates.ListQueryResultsForPolicySetDefinition("latest", DefaultContext.Subscription.Id, gcPolicyAssignment.PolicySetDefinitionName, queryOptions);
211-
if (policyDbResults.Odatacount > 0 && policyDbResults.Value[0].ComplianceState == "NonCompliant")
211+
if (policyDbResults.Odatacount > 0 && policyDbResults.Value[0].IsCompliant.HasValue && !policyDbResults.Value[0].IsCompliant.Value)
212212
{
213-
policyDetailed.ComplianceStatus = policyDbResults.Value[0].ComplianceState;
213+
policyDetailed.ComplianceStatus = "NonCompliant";
214214
}
215215
gcPolicyAssignmentReportList.Add(policyDetailed);
216216
}

src/GuestConfiguration/GuestConfiguration/GuestConfiguration.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Management.GuestConfiguration" Version="1.1.0" />
15-
<PackageReference Include="Microsoft.Azure.Management.PolicyInsights" Version="2.0.2" />
15+
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.PolicyInsights" Version="1.3.0-preview" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

0 commit comments

Comments
 (0)