Skip to content

Commit 64357a7

Browse files
authored
Merge pull request Azure#3359 from v-Ajnava/AJ_SBPower
ServiceBus - Included format.ps1xml for Sku property
2 parents c5d435b + ef15794 commit 64357a7

File tree

19 files changed

+2281
-1391
lines changed

19 files changed

+2281
-1391
lines changed

src/ResourceManager/ServiceBus/AzureRM.ServiceBus.psd1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '2.4.0'; }
6565
# Format files (.ps1xml) to be loaded when importing this module
6666
# FormatsToProcess = @()
6767

68+
# Format files (.ps1xml) to be loaded when importing this module
69+
FormatsToProcess = '.\Microsoft.Azure.Commands.ServiceBus.format.ps1xml'
70+
6871
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
6972
NestedModules = @('.\Microsoft.Azure.Commands.ServiceBus.dll')
7073

src/ResourceManager/ServiceBus/ChangeLog.md

Lines changed: 104 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
## Current Release
77
* Overview of change #1
88
- Additional information about change #1
9+
- Added ServiceBus NameSpace, Queue, Topic and Subscription cmdlets #1
910
* Overview of change #2
1011
- Additional information about change #2
1112
- Additional information about change #2
@@ -20,72 +21,106 @@
2021
## Current Release
2122

2223
## Version 0.0.1
23-
* Adds cmdlets for Azure Service Bus
24-
- New-AzureRmServiceBusNamespace
25-
- Adds a new Service Bus namespace in the existing resource group.
26-
- Get-AzureRmServiceBusNamespace
27-
- Gets a namespace or list of namespaces in the existing resource group.
28-
- Set-AzureRmServiceBusNamespace
29-
- Updates properties of an existing Service Bus namespace.
30-
- Remove-AzureRmServiceBusNamespace
31-
- Deletes an existing Service Bus namespace.
32-
- New-AzureRmServiceBusNamespaceAuthorizationRule
33-
- Adds a new authorization rule to an existing Service Bus namespace.
34-
- Get-AzureRmServiceBusNamespaceAuthorizationRule
35-
- Gets an authorization rule or list of authorization rules for the existing Service Bus namespace.
36-
- Set-AzureRmServiceBusNamespaceAuthorizationRule
37-
- Updates properties of an existing authorization rule in a Service Bus namespace.
38-
- New-AzureRmServiceBusNamespaceKey
39-
- Generates a new primary or secondary key for an authorization rule in an existing Service Bus namespace.
40-
- Get-AzureRmServiceBusNamespaceKey
41-
- Gets the primary or secondary key for an authorization rule in an existing Service Bus namespace.
42-
- Remove-AzureRmServiceBusNamespaceAuthorizationRule
43-
- Deletes an existing authorization rule in a Service Bus namespace.
44-
- New-AzureRmServiceBusQueue
45-
- Adds a new queue to an existing Service Bus namespace.
46-
- Get-AzureRmServiceBusQueue
47-
- Gets an existing queue or list of queues in an existing Service Bus namespace.
48-
- Set-AzureRmServiceBusQueue
49-
- Updates properties of an existing queue in a Service Bus namespace.
50-
- Remove-AzureRmServiceBusQueue
51-
- Deletes an existing queue in a Service Bus namespace.
52-
- New-AzureRmServiceBusQueueAuthorizationRule
53-
- Adds a new authorization rule to an existing queue in a Service Bus namespace.
54-
- Get-AzureRmServiceBusQueueAuthorizationRule
55-
- Gets the authorization rule or list of authorization rules in a queue.
56-
- Set-AzureRmServiceBusQueueAuthorizationRule
57-
- Updates an authorization rule in a queue.
58-
- New-AzureRmServiceBusQueueKey
59-
- Generates a new primary or secondary key for an authorization rule in an existing Service Bus queue.
60-
- Get-AzureRmServiceBusQueueKey
61-
- Gets the primary or secondary key for an authorization rule in an existing Service Bus queue.
62-
- Remove-AzureRmServiceBusQueueAuthorizationRule
63-
- Deletes an existing authorization rule in a Service Bus queue.
64-
- New-AzureRmServiceBusTopic
65-
- Adds a new topic to an existing Service Bus namespace.
66-
- Get-AzureRmServiceBusTopic
67-
- Gets an existing topic or list of topics in an existing Service Bus namespace.
68-
- Set-AzureRmServiceBusTopic
69-
- Updates the properties of an existing topic in a Service Bus namespace.
70-
- Remove-AzureRmServiceBusTopic
71-
- Deletes an existing topic in a Service Bus namespace.
72-
- New-AzureRmServiceBusTopicAuthorizationRule
73-
- Adds a new authorization rule to an existing topic in a Service Bus namespace.
74-
- Get-AzureRmServiceBusTopicAuthorizationRule
75-
- Gets an authorization rule or list of authorization rules in the topic.
76-
- Set-AzureRmServiceBusTopicAuthorizationRule
77-
- Updates an authorization rule in a topic.
78-
- New-AzureRmServiceBusTopicKey
79-
- Generates a new primary or secondary key for an authorization rule in an existing Service Bus topic.
80-
- Get-AzureRmServiceBusTopicKey
81-
- Gets the primary or secondary key for an authorization rule in an existing Service Bus topic.
82-
- Remove-AzureRmServiceBusTopicAuthorizationRule
83-
- Deletes an existing authorization rule in a Service Bus topic.
84-
- New-AzureRmServiceBusSubscription
85-
- Adds a new subscription to an existing Service Bus topic.
86-
- Get-AzureRmServiceBusSubscription
87-
- Gets an existing subscription or list of subscriptions in an existing Service Bus topic.
88-
- Set-AzureRmServiceBusSubscription
89-
- Updates the properties of an existing subscription in a Service Bus topic.
90-
- Remove-AzureRmServiceBusSubscription
91-
- Deletes an existing subscription in a Service Bus topic.
24+
25+
* Adds commandlets for the Azure ServiceBus
26+
- New-AzureRmServiceBusNamespace
27+
- Adds a New ServiceBus NameSpace in the existing Resource Group.
28+
29+
- Get-AzureRmServiceBusNamespace
30+
- Gets NameSpace/list of NameSpaces of existing Resource Group.
31+
32+
- Set-AzureRmServiceBusNamespace
33+
- Updates properties of existing Servicebus NameSpace.
34+
35+
- Remove-AzureRmServiceBusNamespace
36+
- Deletes the existing ServiceBus NameSpace.
37+
38+
- New-AzureRmServiceBusNamespaceAuthorizationRule
39+
- Adds a new AuthorizationRule to the existing ServiceBus NameSpace.
40+
41+
- Get-AzureRmServiceBusNamespaceAuthorizationRule
42+
- Gets AuthorizationRule / List of AuthorizationRules for the existing ServiceBus NameSpace.
43+
44+
- Set-AzureRmServiceBusNamespaceAuthorizationRule
45+
- Updates properties of existing AuthorizationRule of Servicebus NameSpace.
46+
47+
- New-AzureRmServiceBusNamespaceKey
48+
- Generates a new Primary/Secondary Key for AuthorizationRule of existing ServiceBus NameSpace.
49+
50+
- Get-AzureRmServiceBusNamespaceKey
51+
- Gets Primary/Secondary Key for AuthorizationRule of existing ServiceBus NameSpace.
52+
53+
- Remove-AzureRmServiceBusNamespaceAuthorizationRule
54+
- Deletes the existing AuthorizationRule of ServiceBus NameSpace.
55+
56+
- New-AzureRmServiceBusQueue
57+
- Adds a new Queue to the existing ServiceBus NameSpace.
58+
59+
- Get-AzureRmServiceBusQueue
60+
- Gets existing Queue/ List of Queues of the existing ServiceBus NameSpace.
61+
62+
- Set-AzureRmServiceBusQueue
63+
- Updates properties of existing Queue of ServiceBus NameSpace.
64+
65+
- Remove-AzureRmServiceBusQueue
66+
- Deletes existing Queue of ServiceBus NameSpace.
67+
68+
- New-AzureRmServiceBusQueueAuthorizationRule
69+
- Adds a new AuthorizationRule to the existing Queue of ServiceBus NameSpace.
70+
71+
- Get-AzureRmServiceBusQueueAuthorizationRule
72+
- Gets the AuthorizationRule / List of AuthorizationRules of the Queue
73+
74+
- Set-AzureRmServiceBusQueueAuthorizationRule
75+
- Updates the AuthorizationRule of the Queue.
76+
77+
- New-AzureRmServiceBusQueueKey
78+
- Generates a new Primary/Secondary Key for AuthorizationRule of existing ServiceBus Queue.
79+
80+
- Get-AzureRmServiceBusQueueKey
81+
- Gets Primary/Secondary Key for AuthorizationRule of existing ServiceBus Queue.
82+
83+
- Remove-AzureRmServiceBusQueueAuthorizationRule
84+
- Deletes the existing AuthorizationRule of ServiceBus Queue.
85+
86+
- New-AzureRmServiceBusTopic
87+
- Adds a new Topic to the existing ServiceBus NameSpace.
88+
89+
- Get-AzureRmServiceBusTopic
90+
- Gets existing Topic/ List of Topics of the existing ServiceBus NameSpace.
91+
92+
- Set-AzureRmServiceBusTopic
93+
- Updates properties of existing Topic of ServiceBus NameSpace.
94+
95+
- Remove-AzureRmServiceBusTopic
96+
- Deletes existing Topic of ServiceBus NameSpace.
97+
98+
- New-AzureRmServiceBusTopicAuthorizationRule
99+
- Adds a new AuthorizationRule to the existing Topic of ServiceBus NameSpace.
100+
101+
- Get-AzureRmServiceBusTopicAuthorizationRule
102+
- Gets the AuthorizationRule / List of AuthorizationRules of the Topic.
103+
104+
- Set-AzureRmServiceBusTopicAuthorizationRule
105+
- Updates the AuthorizationRule of the Topic.
106+
107+
- New-AzureRmServiceBusTopicKey
108+
- Generates a new Primary/Secondary Key for AuthorizationRule of existing ServiceBus Topic.
109+
110+
- Get-AzureRmServiceBusTopicKey
111+
- Gets Primary/Secondary Key for AuthorizationRule of existing ServiceBus Topic.
112+
113+
- Remove-AzureRmServiceBusTopicAuthorizationRule
114+
- Deletes the existing AuthorizationRule of ServiceBus Topic.
115+
116+
- New-AzureRmServiceBusSubscription
117+
- Adds a new Subscription to the existing ServiceBus Topic.
118+
119+
- Get-AzureRmServiceBusSubscription
120+
- Gets existing Subscription/ List of Subscriptions of the existing ServiceBus Topic.
121+
122+
- Set-AzureRmServiceBusSubscription
123+
- Updates properties of existing Subscription of ServiceBus Topic.
124+
125+
- Remove-AzureRmServiceBusSubscription
126+
- Deletes existing Subscription of ServiceBus Topic.

src/ResourceManager/ServiceBus/Commands.ServiceBus.Test/ScenarioTests/ServiceBusServiceTests.ps1

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function ServiceBusTests
5151
$location = Get-Location
5252
$namespaceName = Get-NamespaceName
5353
$namespaceName2 = Get-NamespaceName
54-
$secondResourceGroup = Get-ResourceGroupName
54+
5555

5656
Write-Debug "Create resource group"
5757
$resourceGroupName = Get-ResourceGroupName
@@ -68,41 +68,42 @@ function ServiceBusTests
6868
Write-Debug "Get the created namespace within the resource group"
6969
$createdNamespace = Get-AzureRmServiceBusNamespace -ResourceGroup $resourceGroupName -NamespaceName $namespaceName
7070

71+
$UpdatedNameSpace = Set-AzureRmServiceBusNamespace -ResourceGroup $resourceGroupName -Location $location -NamespaceName $namespaceName -SkuName "Standard" -SkuCapacity 10
7172

72-
$found = 0
73-
if ($createdNamespace.Name -eq $namespaceName)
73+
$found = 0
74+
if ($UpdatedNameSpace.Name -eq $namespaceName)
7475
{
7576
$found = 1
76-
Assert-AreEqual $location.Replace(' ','') $createdNamespace.Location.Replace(' ','')
77+
Assert-AreEqual $location.Replace(' ','') $UpdatedNameSpace.Location.Replace(' ','')
7778
#Assert-AreEqual $resourceGroupName $createdNamespace[$i].ResourceGroupName
7879
#Assert-AreEqual "ServiceBus" $createdNamespace.NamespaceType
7980
break
8081
}
8182

82-
# Assert-True {$found -eq 0} "Namespace created earlier is not found."
83+
# Assert-True {$found -eq 0} "Namespace created earlier is not found."
8384

8485

8586
Write-Debug "Namespace name : $namespaceName2"
86-
$result = New-AzureRmServiceBusNamespace -ResourceGroup $secondResourceGroup -NamespaceName $namespaceName2 -Location $location
87+
$result = New-AzureRmServiceBusNamespace -ResourceGroup $resourceGroupName -NamespaceName $namespaceName2 -Location $location
8788
Wait-Seconds 15
8889

8990
Write-Debug "Get all the namespaces created in the resourceGroup"
90-
$allCreatedNamespace = Get-AzureRmServiceBusNamespace -ResourceGroup $secondResourceGroup
91+
$allCreatedNamespace = Get-AzureRmServiceBusNamespace -ResourceGroup $resourceGroupName
9192

92-
$found = 0
93+
$found = 0
9394
for ($i = 0; $i -lt $allCreatedNamespace.Count; $i++)
9495
{
9596
if ($allCreatedNamespace[$i].Name -eq $namespaceName2)
9697
{
9798
$found = 1
9899
Assert-AreEqual $location.Replace(' ','') $allCreatedNamespace[$i].Location.Replace(' ','')
99-
#Assert-AreEqual $secondResourceGroup $allCreatedNamespace[$i].ResourceGroupName
100+
#Assert-AreEqual $resourceGroupName $allCreatedNamespace[$i].ResourceGroupName
100101
#Assert-AreEqual "ServiceBus" $allCreatedNamespace[$i].NamespaceType
101102
break
102103
}
103104
}
104105

105-
Assert-True {$found -eq 0} "Namespace created earlier is not found in the List."
106+
#Assert-True {$found -eq 0} "Namespace created earlier is not found in the List."
106107

107108
Write-Debug "Get all the namespaces created in the subscription"
108109
$allCreatedNamespace = Get-AzureRmServiceBusNamespace
@@ -121,16 +122,16 @@ function ServiceBusTests
121122
if ($allCreatedNamespace[$i].Name -eq $namespaceName2)
122123
{
123124
$found = $found + 1
124-
Assert-AreEqual $location.Replace(' ','') $allCreatedNamespace[$i].Location.Replace(' ','')
125-
#Assert-AreEqual $secondResourceGroup $allCreatedNamespace[$i].ResourceGroupName
125+
#Assert-AreEqual $location.Replace(' ','') $allCreatedNamespace[$i].Location.Replace(' ','')
126+
#Assert-AreEqual $resourceGroupName $allCreatedNamespace[$i].ResourceGroupName
126127
# Assert-AreEqual "ServiceBus" $allCreatedNamespace[$i].NamespaceType
127128
}
128129
}
129130

130-
#Assert-True {$found -eq 0} "Namespaces created earlier is not found."
131+
#Assert-True {$found -eq 0} "Namespaces created earlier is not found."
131132

132133
Write-Debug " Delete namespaces"
133-
Remove-AzureRmServiceBusNamespace -ResourceGroup $secondResourceGroup -NamespaceName $namespaceName2
134+
Remove-AzureRmServiceBusNamespace -ResourceGroup $resourceGroupName -NamespaceName $namespaceName2
134135
Remove-AzureRmServiceBusNamespace -ResourceGroup $resourceGroupName -NamespaceName $namespaceName
135136

136137
Write-Debug " Delete resourcegroup"

src/ResourceManager/ServiceBus/Commands.ServiceBus.Test/SessionRecords/Microsoft.Azure.Commands.ServiceBus.Test.ScenarioTests.ServiceBusQueueTests/ServiceBusQueueAuth_CURD.json

Lines changed: 318 additions & 255 deletions
Large diffs are not rendered by default.

src/ResourceManager/ServiceBus/Commands.ServiceBus.Test/SessionRecords/Microsoft.Azure.Commands.ServiceBus.Test.ScenarioTests.ServiceBusQueueTests/ServiceBusQueue_CURD.json

Lines changed: 58 additions & 49 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)