Skip to content

Commit

Permalink
Merge pull request #1 from ariklin/SecurityTopology
Browse files Browse the repository at this point in the history
change name
  • Loading branch information
ariklin authored Jun 21, 2020
2 parents a570040 + fc08b95 commit 92f5240
Show file tree
Hide file tree
Showing 15 changed files with 121 additions and 280 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

namespace Microsoft.Azure.Commands.Security.Test.ScenarioTests
{
public class SecurityTopologiesTests
public class SecurityTopologyTests
{
private readonly XunitTracingInterceptor _logger;

public SecurityTopologiesTests(Xunit.Abstractions.ITestOutputHelper output)
public SecurityTopologyTests(Xunit.Abstractions.ITestOutputHelper output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
Expand Down

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
using Commands.Security;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Commands.Security.Common;
using Microsoft.Azure.Commands.Security.Models.Topologies;
using Microsoft.Azure.Commands.Security.Models.Topology;
using Microsoft.Azure.Commands.SecurityCenter.Common;
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
using Microsoft.Rest.Azure;

namespace Microsoft.Azure.Commands.Security.Cmdlets.Topologies
namespace Microsoft.Azure.Commands.Security.Cmdlets.Topology
{
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SecurityTopologies", DefaultParameterSetName = ParameterSetNames.SubscriptionScope), OutputType(typeof(PSSecurityTopologies))]
public class GetTopologies : SecurityCenterCmdletBase
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SecurityTopology", DefaultParameterSetName = ParameterSetNames.SubscriptionScope), OutputType(typeof(PSSecurityTopology))]
public class GetTopology : SecurityCenterCmdletBase
{
[Parameter(ParameterSetName = ParameterSetNames.ResourceGroupLevelResource, Mandatory = true, HelpMessage = ParameterHelpMessages.ResourceGroupName)]
[ValidateNotNullOrEmpty]
Expand All @@ -36,7 +36,7 @@ public class GetTopologies : SecurityCenterCmdletBase

[Parameter(ParameterSetName = ParameterSetNames.ResourceGroupLevelResource, Mandatory = true, HelpMessage = ParameterHelpMessages.Location)]
[ValidateNotNullOrEmpty]
[LocationCompleter("Microsoft.Security/topologies")]
[LocationCompleter("Microsoft.Security/Topology")]
public string Location { get; set; }

[Parameter(ParameterSetName = ParameterSetNames.ResourceId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = ParameterHelpMessages.ResourceId)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
using System;
using System.Collections.Generic;

namespace Microsoft.Azure.Commands.Security.Models.Topologies
namespace Microsoft.Azure.Commands.Security.Models.Topology
{
public class PSSecurityTopologies
public class PSSecurityTopology
{
public string Id { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
using System.Linq;
using Microsoft.Azure.Management.Security.Models;

namespace Microsoft.Azure.Commands.Security.Models.Topologies
namespace Microsoft.Azure.Commands.Security.Models.Topology
{
public static class PSSecurityTopologiesConverters
public static class PSSecurityTopologyConverters
{
public static PSSecurityTopologies ConvertToPSType(this TopologyResource value)
public static PSSecurityTopology ConvertToPSType(this TopologyResource value)
{
return new PSSecurityTopologies()
return new PSSecurityTopology()
{
Id = value.Id,
Name = value.Name,
Expand All @@ -32,7 +32,7 @@ public static PSSecurityTopologies ConvertToPSType(this TopologyResource value)
};
}

public static List<PSSecurityTopologies> ConvertToPSType(this IEnumerable<TopologyResource> value)
public static List<PSSecurityTopology> ConvertToPSType(this IEnumerable<TopologyResource> value)
{
return value.Select(tor => tor.ConvertToPSType()).ToList();
}
Expand Down Expand Up @@ -82,15 +82,5 @@ public static List<PSSecurityTopologySingleResourceChild> ConvertToPSType(this I
{
return value.Select(tor => tor.ConvertToPSType()).ToList();
}










}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;

namespace Microsoft.Azure.Commands.Security.Models.Topologies
namespace Microsoft.Azure.Commands.Security.Models.Topology
{
public class PSSecurityTopologySingleResource
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;

namespace Microsoft.Azure.Commands.Security.Models.Topologies
namespace Microsoft.Azure.Commands.Security.Models.Topology
{
public class PSSecurityTopologySingleResourceChild
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;

namespace Microsoft.Azure.Commands.Security.Models.Topologies
namespace Microsoft.Azure.Commands.Security.Models.Topology
{
public class PSsecurityTopologySingleResourceParent
{
Expand Down
2 changes: 1 addition & 1 deletion src/Security/Security/help/Az.Security.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,4 @@ Gets security settings in Azure Security Center
Sets a security setting in Azure Security Center

### [Get-AzSecurityTopology](Get-AzSecurityTopology.md)
Gets a list of Security Topologies on a subscription
Gets a list of Security Topology on a subscription
151 changes: 0 additions & 151 deletions src/Security/Security/help/Get-AzSecurityTopologies.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/Security/Security/help/Get-AzSecurityTopology.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS
### Microsoft.Azure.Commands.Security.Models.Topologies.PSSecurityTopologies
### Microsoft.Azure.Commands.Security.Models.Topology.PSSecurityTopologies
## NOTES
Expand Down

0 comments on commit 92f5240

Please sign in to comment.