Skip to content

Conversation

@v-Ajnava
Copy link

@v-Ajnava v-Ajnava commented Mar 2, 2018

Description

Added below optional properties :

  • Added EnableBatchedOperations property to Queue
  • Added DeadLetteringOnFilterEvaluationExceptions property to Subscriptions

Checklist

…lterEvaluationExceptions property to Subscriptions
@v-Ajnava v-Ajnava requested a review from cormacpayne March 2, 2018 03:38
Copy link
Member

@cormacpayne cormacpayne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v-Ajnava a couple of comments that need to be resolved. Also, please make sure to update your change log with an entry that reflects the changes being made in this PR.

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Enable Batched Operations - value that indicates whether server-side batched operations are enabled")]
[ValidateSet("TRUE", "FALSE", IgnoreCase = true)]
[ValidateNotNullOrEmpty]
public bool? EnableBatchedOperations { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v-Ajnava bool parameters are strongly discouraged in PowerShell -- please change this to be a SwitchParameter

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implemented SwitchParameter

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.")]
[ValidateSet("TRUE", "FALSE", IgnoreCase = true)]
[ValidateNotNullOrEmpty]
public bool? DeadLetteringOnFilterEvaluationExceptions { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v-Ajnava same comment about changing this to be a SwitchParameter

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implemented SwitchParameter

@v-Ajnava
Copy link
Author

v-Ajnava commented Mar 2, 2018

@cormacpayne have updated change log also.

Copy link
Member

@cormacpayne cormacpayne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v-Ajnava a few additional comments to take a look at


[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Enable Batched Operations - value that indicates whether server-side batched operations are enabled")]
[ValidateSet("TRUE", "FALSE", IgnoreCase = true)]
[ValidateNotNullOrEmpty]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v-Ajnava please remove the ValueFromPipelineByPropertyName property, the ValidateSet attribute, and the ValidateNotNullOrEmpty attribute

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved


[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.")]
[ValidateSet("TRUE", "FALSE", IgnoreCase = true)]
[ValidateNotNullOrEmpty]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v-Ajnava same comment about removing ValueFromPipelineByPropertyName, ValidateSet and ValidateNotNullOrEmpty

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.")]
[ValidateSet("TRUE", "FALSE", IgnoreCase = true)]
[ValidateNotNullOrEmpty]
public SwitchParameter DeadLetteringOnFilterEvaluationExceptions { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v-Ajnava is there any way that we can shorten the length of this parameter name?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

property name it explains the purpose and shortening it will be not clear.

$subName = getAssetName "Subscription-"


# $resltNewSub = New-AzureRmServiceBusSubscription -ResourceGroupName "RGName-970" -Namespace "Namespace-786" -Topic "topic-3510" -Name "TestingSub1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v-Ajnava please remove this if it's going to be commented out

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad, removed.

$resultGetQueue.DeadLetteringOnMessageExpiration = $True
$resultGetQueue.MaxDeliveryCount = 5
$resultGetQueue.MaxSizeInMegabytes = 1024
$resultGetQueue.EnableBatchedOperations = $True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v-Ajnava are there any tests that cover the new switch parameters being used rather than the property being set on the object?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its used to set the batchoperations service side. nothing no client side besides setting it.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Accepted values: TRUE, FALSE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v-Ajnava make sure to regenerate the help for these two cmdlets after you remove the unnecessary properties on the parameters

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, the extra properties got removed when removed from cmd file.

---
external help file: Microsoft.Azure.Commands.ServiceBus.dll-Help.xml
Module Name: AzureRM.ServiceBus
online version: https://docs.microsoft.com/en-us/powershell/module/azurerm.servicebus/new-azurermservicebussubscription
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v-Ajnava please add this link back -- it may have been overridden during the generation of this file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added back the online link

@v-Ajnava v-Ajnava assigned cormacpayne and unassigned v-Ajnava Mar 2, 2018
@sazeesha
Copy link
Contributor

sazeesha commented Mar 2, 2018

@cormacpayne we need this for the PS, we have customers asking for this property in PS and the code freeze for that is today. This property is already supported in other resources we have, it was just a bug that we did not have it for Queues.

@cormacpayne
Copy link
Member

@cormacpayne cormacpayne removed their assignment Mar 5, 2018
@maddieclayton maddieclayton merged commit 1ad2db5 into Azure:preview Mar 5, 2018
@v-Ajnava v-Ajnava deleted the SBProperties branch April 12, 2018 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants