-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #450 from Nilambari/dev
WORK:3387747 Added new Brooklyn Co-existance feature Powershell commandlets
- Loading branch information
Showing
36 changed files
with
1,578 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureLocalNetworkGateway.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// | ||
// Copyright Microsoft Corporation | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// ---------------------------------------------------------------------------------- | ||
|
||
using Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Gateway.Model; | ||
using System.Management.Automation; | ||
|
||
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Gateway | ||
{ | ||
[Cmdlet(VerbsCommon.Get, "AzureLocalNetworkGateway"), OutputType(typeof(GetLocalNetworkGatewayContext))] | ||
public class GetAzureLocalNetworkGateway : NetworkCmdletBase | ||
{ | ||
[Parameter(Position = 0, Mandatory = false, HelpMessage = "Local network gateway Id.")] | ||
[ValidateGuid] | ||
[ValidateNotNullOrEmpty] | ||
public string GatewayId | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public override void ExecuteCmdlet() | ||
{ | ||
if (!string.IsNullOrEmpty(GatewayId)) | ||
{ | ||
WriteObject(Client.GetLocalNetworkGateway(GatewayId)); | ||
} | ||
else | ||
{ | ||
WriteObject(Client.ListLocalNetworkGateways()); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVirtualNetworkGateway.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// | ||
// Copyright Microsoft Corporation | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// ---------------------------------------------------------------------------------- | ||
|
||
using Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Gateway.Model; | ||
using System.Management.Automation; | ||
|
||
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Gateway | ||
{ | ||
[Cmdlet(VerbsCommon.Get, "AzureVirtualNetworkGateway"), OutputType(typeof(GetVirtualNetworkGatewayContext))] | ||
public class GetAzureVirtualNetworkGateway : NetworkCmdletBase | ||
{ | ||
[Parameter(Position = 0, Mandatory = false, HelpMessage = "Virtual network gateway Id.")] | ||
[ValidateGuid] | ||
[ValidateNotNullOrEmpty] | ||
public string GatewayId | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public override void ExecuteCmdlet() | ||
{ | ||
if (!string.IsNullOrEmpty(GatewayId)) | ||
{ | ||
WriteObject(Client.GetVirtualNetworkGateway(GatewayId)); | ||
} | ||
else | ||
{ | ||
WriteObject(Client.ListVirtualNetworkGateways()); | ||
} | ||
} | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
...iceManagement/Network/Commands.Network/Gateway/GetAzureVirtualNetworkGatewayConnection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// | ||
// Copyright Microsoft Corporation | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// ---------------------------------------------------------------------------------- | ||
|
||
using Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Gateway.Model; | ||
using System.Management.Automation; | ||
|
||
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Gateway | ||
{ | ||
[Cmdlet(VerbsCommon.Get, "AzureVirtualNetworkGatewayConnection"), OutputType(typeof(GetVirtualNetworkGatewayConnectionContext))] | ||
public class GetAzureVirtualNetworkConnectionGateway : NetworkCmdletBase | ||
{ | ||
[Parameter(Position = 0, Mandatory = false, HelpMessage = "Virtual network gateway Id.")] | ||
[ValidateGuid] | ||
[ValidateNotNullOrEmpty] | ||
public string GatewayId | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
[Parameter(Position = 1, Mandatory = false, HelpMessage = "Virtual network gateway Connected entityId.")] | ||
[ValidateGuid] | ||
[ValidateNotNullOrEmpty] | ||
public string ConnectedEntityId | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public override void ExecuteCmdlet() | ||
{ | ||
if (!string.IsNullOrEmpty(GatewayId) && !string.IsNullOrEmpty(ConnectedEntityId)) | ||
{ | ||
WriteObject(Client.GetVirtualNetworkGatewayConnection(GatewayId, ConnectedEntityId)); | ||
} | ||
else | ||
{ | ||
WriteObject(Client.ListVirtualNetworkGatewayConnections()); | ||
} | ||
} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...ceManagement/Network/Commands.Network/Gateway/GetAzureVirtualNetworkGatewayDiagnostics.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// | ||
// Copyright Microsoft Corporation | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// ---------------------------------------------------------------------------------- | ||
|
||
using Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Gateway.Model; | ||
using Microsoft.WindowsAzure.Commands.Utilities.Common; | ||
using System.Management.Automation; | ||
|
||
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Gateway | ||
{ | ||
[Cmdlet(VerbsCommon.Get, "AzureVirtualNetworkGatewayDiagnostics"), OutputType(typeof(ManagementOperationContext))] | ||
public class GetAzureVirtualNetworkGatewayDiagnostics : NetworkCmdletBase | ||
{ | ||
[Parameter(Position = 0, Mandatory = true, HelpMessage = "The virtual network gateway id.")] | ||
[ValidateGuid] | ||
[ValidateNotNullOrEmpty] | ||
public string GatewayId | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public override void ExecuteCmdlet() | ||
{ | ||
WriteObject(Client.GetDiagnosticsV2(GatewayId)); | ||
} | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...nagement/Network/Commands.Network/Gateway/GetAzureVirtualNetworkGatewayIPsecParameters.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// | ||
// Copyright Microsoft Corporation | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// ---------------------------------------------------------------------------------- | ||
|
||
using System.Management.Automation; | ||
using Microsoft.WindowsAzure.Management.Network.Models; | ||
using Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Gateway.Model; | ||
|
||
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Gateway | ||
{ | ||
[Cmdlet(VerbsCommon.Get, "AzureVirtualNetworkGatewayIPsecParameters"), OutputType(typeof(IPsecParameters))] | ||
public class GetAzureVirtualNetworkGatewayIPsecParameters : NetworkCmdletBase | ||
{ | ||
[Parameter(Position = 0, Mandatory = true, HelpMessage = "The virtual network gateway id.")] | ||
[ValidateGuid] | ||
[ValidateNotNullOrEmpty] | ||
public string GatewayId | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
[Parameter(Position = 1, Mandatory = true, HelpMessage = "The virtual network gateway connected entityId.")] | ||
[ValidateGuid] | ||
[ValidateNotNullOrEmpty] | ||
public string ConnectedEntityId | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public override void ExecuteCmdlet() | ||
{ | ||
WriteObject(Client.GetIPsecParametersV2(GatewayId, ConnectedEntityId)); | ||
} | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVirtualNetworkGatewayKey.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// | ||
// Copyright Microsoft Corporation | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// ---------------------------------------------------------------------------------- | ||
|
||
using Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Gateway.Model; | ||
using System.Management.Automation; | ||
|
||
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Gateway | ||
{ | ||
[Cmdlet(VerbsCommon.Get, "AzureVirtualNetworkGatewayKey"), OutputType(typeof(SharedKeyContext))] | ||
public class GetAzureVirtualNetworkGatewayKey : NetworkCmdletBase | ||
{ | ||
[Parameter(Position = 0, Mandatory = true, HelpMessage = "The virtual network gateway id.")] | ||
[ValidateGuid] | ||
[ValidateNotNullOrEmpty] | ||
public string GatewayId | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
[Parameter(Position = 1, Mandatory = true, HelpMessage = "The virtual network gateway connected entityId.")] | ||
[ValidateGuid] | ||
[ValidateNotNullOrEmpty] | ||
public string ConnectedEntityId | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public override void ExecuteCmdlet() | ||
{ | ||
WriteObject(Client.GetSharedKeyV2(GatewayId, ConnectedEntityId)); | ||
} | ||
} | ||
} |
Oops, something went wrong.