Skip to content

Commit f32e396

Browse files
author
Ajit Navasare (MINDTREE LIMITED)
committed
updated review comments
1 parent 232089a commit f32e396

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/ResourceManager/ServiceBus/ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
-->
2121
## Current Release
2222

23-
* Bug fix : some properties were not updated beacuse of the space inserted in swagger spec.
23+
* Bug fix : some properties of Queue object were not updated beacuse of the space inserted in there name in swagger spec.
24+
- e.g. not able to set value for MaxDeliveryCount, lockDuration, entityAvailabilityStatus, duplicateDetectionHistoryTimeWindow, maxDeliveryCount, messageCount,entityAvailabilityStatus and duplicateDetectionHistoryTimeWindow properties of Queue object.
2425

2526
## Version 0.2.0
2627

src/ResourceManager/ServiceBus/Commands.ServiceBus/Cmdlets/Queue/SetAzureServiceBusQueue.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,13 @@ public override void ExecuteCmdlet()
5656
{
5757
QueueAttributes queueAttributes = new QueueAttributes();
5858

59-
NamespaceAttributes getNamespaceLoc = Client.GetNamespace(ResourceGroup, NamespaceName);
60-
QueueObj.Location = getNamespaceLoc.Location;
61-
queueAttributes = QueueObj;
62-
59+
if (QueueObj != null)
60+
{
61+
NamespaceAttributes getNamespaceLoc = Client.GetNamespace(ResourceGroup, NamespaceName);
62+
QueueObj.Location = getNamespaceLoc.Location;
63+
queueAttributes = QueueObj;
64+
}
65+
6366
if (ShouldProcess(target: QueueName, action: string.Format("Updating Queue:{0} of the NameSpace:{1}", QueueName, NamespaceName)))
6467
{
6568
WriteObject(Client.CreateUpdateQueue(ResourceGroup, NamespaceName, queueAttributes.Name, queueAttributes));

src/ResourceManager/ServiceBus/Commands.ServiceBus/Models/QueueAttributes.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public QueueAttributes(QueueResource quResource)
5252
Status = quResource.Status;
5353
SupportOrdering = quResource.SupportOrdering;
5454
UpdatedAt = quResource.UpdatedAt;
55+
5556
}
5657
}
5758

src/ResourceManager/ServiceBus/Commands.ServiceBus/Utilities/ServiceBusClient.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,13 @@ public NamespaceAttributes GetNamespace(string resourceGroupName, string namespa
5959
public IEnumerable<NamespaceAttributes> ListNamespaces(string resourceGroupName)
6060
{
6161
Rest.Azure.IPage<NamespaceResource> response = Client.Namespaces.ListByResourceGroup(resourceGroupName);
62-
//IEnumerable<NamespaceAttributes> resourceList = response.Select(resource => new NamespaceAttributes(resourceGroupName, resource));
6362
IEnumerable<NamespaceAttributes> resourceList = response.Select(resource => new NamespaceAttributes(resource));
6463
return resourceList;
6564
}
6665

6766
public IEnumerable<NamespaceAttributes> ListAllNamespaces()
6867
{
6968
Rest.Azure.IPage<NamespaceResource> response = Client.Namespaces.ListBySubscription();
70-
71-
//var resourceList = response.Select(resource => new NamespaceAttributes(null, resource));
7269
var resourceList = response.Select(resource => new NamespaceAttributes(resource));
7370
return resourceList;
7471
}
@@ -253,7 +250,6 @@ public QueueAttributes UpdateQueue(string resourceGroupName, string namespaceNam
253250
public IEnumerable<QueueAttributes> ListQueues(string resourceGroupName, string namespaceName)
254251
{
255252
Rest.Azure.IPage<QueueResource> response = Client.Queues.ListAll(resourceGroupName, namespaceName);
256-
//IEnumerable<NamespaceAttributes> resourceList = response.Select(resource => new NamespaceAttributes(resourceGroupName, resource));
257253
IEnumerable<QueueAttributes> resourceList = response.Select(resource => new QueueAttributes(resource));
258254
return resourceList;
259255
}
@@ -374,7 +370,6 @@ public TopicAttributes UpdateTopic(string resourceGroupName, string namespaceNam
374370
public IEnumerable<TopicAttributes> ListTopics(string resourceGroupName, string namespaceName)
375371
{
376372
Rest.Azure.IPage<TopicResource> response = Client.Topics.ListAll(resourceGroupName, namespaceName);
377-
//IEnumerable<NamespaceAttributes> resourceList = response.Select(resource => new NamespaceAttributes(resourceGroupName, resource));
378373
IEnumerable<TopicAttributes> resourceList = response.Select(resource => new TopicAttributes(resource));
379374
return resourceList;
380375
}

0 commit comments

Comments
 (0)