Skip to content

Commit f78bb1e

Browse files
committed
update based on the review
1 parent b0647f6 commit f78bb1e

10 files changed

+89
-38
lines changed

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry.Test/Commands.ContainerRegistry.Test.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@
6767
<HintPath>..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.6179.26854-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll</HintPath>
6868
</Reference>
6969
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
70-
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.8.1\lib\net452\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
70+
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.7.0\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
71+
<Private>True</Private>
7172
</Reference>
7273
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.28.3.860, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7374
<SpecificVersion>False</SpecificVersion>
@@ -101,8 +102,9 @@
101102
<SpecificVersion>False</SpecificVersion>
102103
<HintPath>..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
103104
</Reference>
104-
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
105-
<HintPath>..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
105+
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
106+
<SpecificVersion>False</SpecificVersion>
107+
<HintPath>..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
106108
</Reference>
107109
<Reference Include="System" />
108110
<Reference Include="System.Core" />
@@ -181,7 +183,6 @@
181183
</ProjectReference>
182184
</ItemGroup>
183185
<ItemGroup>
184-
<None Include="app.config" />
185186
<None Include="MSSharedLibKey.snk" />
186187
<None Include="packages.config" />
187188
<None Include="ScenarioTests\Common.ps1">

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry.Test/app.config

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry.Test/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<package id="Microsoft.Azure.Management.ResourceManager" version="1.6.0-preview" targetFramework="net452" />
88
<package id="Microsoft.Azure.Management.Storage" version="6.5.0-preview" targetFramework="net452" />
99
<package id="Microsoft.Azure.Test.Framework" version="1.0.6179.26854-prerelease" targetFramework="net45" />
10-
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.8.1" targetFramework="net452" />
10+
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.7.0" targetFramework="net45" />
1111
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
1212
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
1313
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
@@ -17,7 +17,7 @@
1717
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.10" targetFramework="net452" />
1818
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.3.0" targetFramework="net452" />
1919
<package id="Microsoft.Rest.ClientRuntime.Azure.TestFramework" version="1.7.2" targetFramework="net452" />
20-
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
20+
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" />
2121
<package id="xunit" version="2.1.0" targetFramework="net45" />
2222
<package id="xunit.abstractions" version="2.0.0" targetFramework="net45" />
2323
<package id="xunit.assert" version="2.1.0" targetFramework="net45" />

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/Commands.ContainerRegistry.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@
5858
<Reference Include="Microsoft.Azure.Management.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5959
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.5.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
6060
</Reference>
61-
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
62-
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
63-
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL" />
6461
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
6562
</ItemGroup>
6663
<ItemGroup>

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/Commands/RemoveAzureContainerRegistry.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public class RemoveAzureContainerRegistry : ContainerRegistryCmdletBase
3939
[Alias(ResourceIdAlias)]
4040
public string ResourceId { get; set; }
4141

42+
[Parameter(Mandatory = false)]
43+
public SwitchParameter PassThru { get; set; }
44+
4245
public override void ExecuteCmdlet()
4346
{
4447
if (string.Equals(ParameterSetName, RegistryObjectParameterSet))
@@ -62,7 +65,10 @@ public override void ExecuteCmdlet()
6265
if (ShouldProcess(Name, "Remove Container Registry"))
6366
{
6467
RegistryClient.DeleteRegistry(ResourceGroupName, Name);
65-
WriteObject(true);
68+
if(PassThru)
69+
{
70+
WriteObject(true);
71+
}
6672
}
6773
}
6874
}

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/Commands/RemoveAzureContainerRegistryReplication.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public class RemoveAzureContainerRegistryReplication : ContainerRegistryCmdletBa
4343
[Alias(ResourceIdAlias)]
4444
public string ResourceId { get; set; }
4545

46+
[Parameter(Mandatory = false)]
47+
public SwitchParameter PassThru { get; set; }
48+
4649
public override void ExecuteCmdlet()
4750
{
4851
if (string.Equals(ParameterSetName, ReplicationObjectParameterSet))
@@ -67,7 +70,10 @@ public override void ExecuteCmdlet()
6770
if (ShouldProcess(Name, "Delete the replication from the container registry. This will also delete all the webhooks in this replication."))
6871
{
6972
RegistryClient.DeleteReplication(ResourceGroupName, RegistryName, Name);
70-
WriteObject(true);
73+
if (PassThru)
74+
{
75+
WriteObject(true);
76+
}
7177
}
7278
}
7379
}

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/Commands/RemoveAzureContainerRegistryWebhook.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public class RemoveAzureContainerRegistryWebhook : ContainerRegistryCmdletBase
4343
[Alias(ResourceIdAlias)]
4444
public string ResourceId { get; set; }
4545

46+
[Parameter(Mandatory = false)]
47+
public SwitchParameter PassThru { get; set; }
48+
4649
public override void ExecuteCmdlet()
4750
{
4851
if (string.Equals(ParameterSetName, WebhookObjectParameterSet))
@@ -67,7 +70,10 @@ public override void ExecuteCmdlet()
6770
if (ShouldProcess(Name, "Remove Container Registry Webhook"))
6871
{
6972
RegistryClient.DeleteWebhook(ResourceGroupName, RegistryName, Name);
70-
WriteObject(true);
73+
if (PassThru)
74+
{
75+
WriteObject(true);
76+
}
7177
}
7278
}
7379
}

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/help/Remove-AzureRmContainerRegistry.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ Removes a container registry.
1414

1515
### NameResourceGroupParameterSet (Default)
1616
```
17-
Remove-AzureRmContainerRegistry [-ResourceGroupName] <String> [-Name] <String>
17+
Remove-AzureRmContainerRegistry [-ResourceGroupName] <String> [-Name] <String> [-PassThru]
1818
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
1919
```
2020

2121
### RegistryObjectParameterSet
2222
```
23-
Remove-AzureRmContainerRegistry -Registry <PSContainerRegistry> [-DefaultProfile <IAzureContextContainer>]
24-
[-WhatIf] [-Confirm] [<CommonParameters>]
23+
Remove-AzureRmContainerRegistry -Registry <PSContainerRegistry> [-PassThru]
24+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2525
```
2626

2727
### ResourceIdParameterSet
2828
```
29-
Remove-AzureRmContainerRegistry -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
30-
[-Confirm] [<CommonParameters>]
29+
Remove-AzureRmContainerRegistry -ResourceId <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>]
30+
[-WhatIf] [-Confirm] [<CommonParameters>]
3131
```
3232

3333
## DESCRIPTION
@@ -150,6 +150,21 @@ Accept pipeline input: True (ByPropertyName)
150150
Accept wildcard characters: False
151151
```
152152
153+
### -PassThru
154+
{{Fill PassThru Description}}
155+
156+
```yaml
157+
Type: SwitchParameter
158+
Parameter Sets: (All)
159+
Aliases:
160+
161+
Required: False
162+
Position: Named
163+
Default value: None
164+
Accept pipeline input: False
165+
Accept wildcard characters: False
166+
```
167+
153168
### CommonParameters
154169
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
155170

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/help/Remove-AzureRmContainerRegistryReplication.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,20 @@ Removes a container registry replication.
1515
### NameResourceGroupParameterSet (Default)
1616
```
1717
Remove-AzureRmContainerRegistryReplication [-Name] <String> [-ResourceGroupName] <String>
18-
[-RegistryName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
18+
[-RegistryName] <String> [-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
19+
[<CommonParameters>]
1920
```
2021

2122
### ReplicationObjectParameterSet
2223
```
23-
Remove-AzureRmContainerRegistryReplication -Replicatoin <PSContainerRegistryReplication>
24+
Remove-AzureRmContainerRegistryReplication -Replicatoin <PSContainerRegistryReplication> [-PassThru]
2425
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2526
```
2627

2728
### ResourceIdParameterSet
2829
```
29-
Remove-AzureRmContainerRegistryReplication -ResourceId <String> [-DefaultProfile <IAzureContextContainer>]
30-
[-WhatIf] [-Confirm] [<CommonParameters>]
30+
Remove-AzureRmContainerRegistryReplication -ResourceId <String> [-PassThru]
31+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
3132
```
3233

3334
## DESCRIPTION
@@ -36,7 +37,7 @@ The Remove-AzureRmContainerRegistryReplication cmdlet removes a container regist
3637
## EXAMPLES
3738

3839
### Example 1: Removes a container registry replication.
39-
```powershell
40+
```
4041
PS C:\> Remove-AzureRmContainerRegistryReplication -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry" -Name "replication001"
4142
```
4243

@@ -166,6 +167,21 @@ Accept pipeline input: False
166167
Accept wildcard characters: False
167168
```
168169
170+
### -PassThru
171+
{{Fill PassThru Description}}
172+
173+
```yaml
174+
Type: SwitchParameter
175+
Parameter Sets: (All)
176+
Aliases:
177+
178+
Required: False
179+
Position: Named
180+
Default value: None
181+
Accept pipeline input: False
182+
Accept wildcard characters: False
183+
```
184+
169185
### CommonParameters
170186
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
171187

src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry/help/Remove-AzureRmContainerRegistryWebhook.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ Removes a container registry webhook.
1515
### NameResourceGroupParameterSet (Default)
1616
```
1717
Remove-AzureRmContainerRegistryWebhook [-Name] <String> [-ResourceGroupName] <String> [-RegistryName] <String>
18-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
18+
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
1919
```
2020

2121
### WebhookObjectParameterSet
2222
```
23-
Remove-AzureRmContainerRegistryWebhook -Webhook <PSContainerRegistryWebhook>
23+
Remove-AzureRmContainerRegistryWebhook -Webhook <PSContainerRegistryWebhook> [-PassThru]
2424
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2525
```
2626

2727
### ResourceIdParameterSet
2828
```
29-
Remove-AzureRmContainerRegistryWebhook -ResourceId <String> [-DefaultProfile <IAzureContextContainer>]
30-
[-WhatIf] [-Confirm] [<CommonParameters>]
29+
Remove-AzureRmContainerRegistryWebhook -ResourceId <String> [-PassThru]
30+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
3131
```
3232

3333
## DESCRIPTION
@@ -36,7 +36,7 @@ The Remove-AzureRmContainerRegistryWebhook cmdlet removes a container registry w
3636
## EXAMPLES
3737

3838
### Example 1: Remove a container registry webhook.
39-
```powershell
39+
```
4040
PS C:\> Remove-AzureRmContainerRegistryWebhook -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry" -Name "webhook001"
4141
```
4242

@@ -165,6 +165,21 @@ Accept pipeline input: False
165165
Accept wildcard characters: False
166166
```
167167
168+
### -PassThru
169+
{{Fill PassThru Description}}
170+
171+
```yaml
172+
Type: SwitchParameter
173+
Parameter Sets: (All)
174+
Aliases:
175+
176+
Required: False
177+
Position: Named
178+
Default value: None
179+
Accept pipeline input: False
180+
Accept wildcard characters: False
181+
```
182+
168183
### CommonParameters
169184
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
170185

0 commit comments

Comments
 (0)