Skip to content

Commit 9bc0b22

Browse files
committed
Review comments
- Administrators to Administrator - Included AnalysisServices module in AzureRM
1 parent d462714 commit 9bc0b22

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Test/ScenarioTests/AsTests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function Test-AnalysisServicesServer
1616
$serverName = Get-AnalysisServicesServerName
1717
New-AzureRmResourceGroup -Name $resourceGroupName -Location $location
1818

19-
$serverCreated = New-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName -Location $location -Sku 'S1' -Administrators '[email protected],[email protected]'
19+
$serverCreated = New-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName -Location $location -Sku 'S1' -Administrator '[email protected],[email protected]'
2020

2121
Assert-AreEqual $serverName $serverCreated.Name
2222
Assert-AreEqual $location $serverCreated.Location
@@ -42,8 +42,8 @@ function Test-AnalysisServicesServer
4242
Assert-NotNull $serverUpdated.Tag "Tag do not exists"
4343
Assert-NotNull $serverUpdated.Tag["TestTag"] "The updated tag 'TestTag' does not exist"
4444

45-
$serverUpdated = Set-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName -Administrators '[email protected]' -PassThru
46-
Assert-NotNull $serverUpdated.AsAdministrators "Server Administrators list is empty"
45+
$serverUpdated = Set-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName -Administrator '[email protected]' -PassThru
46+
Assert-NotNull $serverUpdated.AsAdministrators "Server Administrator list is empty"
4747
Assert-AreEqual $serverUpdated.AsAdministrators.Count 1
4848

4949
Assert-AreEqual $serverName $serverUpdated.Name
@@ -135,7 +135,7 @@ function Test-NegativeAnalysisServicesServer
135135
$resourceGroupName = Get-ResourceGroupName
136136
$serverName = Get-AnalysisServicesServerName
137137
New-AzureRmResourceGroup -Name $resourceGroupName -Location $location
138-
$serverCreated = New-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName -Location $location -Sku 'S1' -Administrators '[email protected],[email protected]'
138+
$serverCreated = New-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName -Location $location -Sku 'S1' -Administrator '[email protected],[email protected]'
139139

140140
Assert-AreEqual $serverName $serverCreated.Name
141141
Assert-AreEqual $location $serverCreated.Location

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands/NewAzureRmAnalysisServicesServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class NewAnalysisServicesServer : AnalysisServicesCmdletBase
6060
[Parameter(ValueFromPipelineByPropertyName = true, Position = 4, Mandatory = false,
6161
HelpMessage = "A comma separated server names to set as administrators on the server")]
6262
[ValidateNotNull]
63-
public string Administrators { get; set; }
63+
public string Administrator { get; set; }
6464

6565
public override void ExecuteCmdlet()
6666
{
@@ -92,7 +92,7 @@ public override void ExecuteCmdlet()
9292
}
9393
}
9494

95-
var createdServer = AnalysisServicesClient.CreateOrUpdateServer(ResourceGroupName, Name, Location, Sku, Tag, Administrators);
95+
var createdServer = AnalysisServicesClient.CreateOrUpdateServer(ResourceGroupName, Name, Location, Sku, Tag, Administrator);
9696
WriteObject(AzureAnalysisServicesServer.FromAnalysisServicesServer(createdServer));
9797
}
9898
}

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands/SetAzureRmAnalysisServicesServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class SetAzureAnalysisServicesServer : AnalysisServicesCmdletBase
5252
[Parameter(ValueFromPipelineByPropertyName = true, Position = 4, Mandatory = false,
5353
HelpMessage = "A comma separated server names to set as administrators on the server")]
5454
[ValidateNotNull]
55-
public string Administrators { get; set; }
55+
public string Administrator { get; set; }
5656

5757
[Parameter(Mandatory = false)]
5858
public SwitchParameter PassThru { get; set; }
@@ -78,7 +78,7 @@ public override void ExecuteCmdlet()
7878
Tag = TagsConversionHelper.CreateTagHashtable(currentServer.Tags);
7979
}
8080

81-
AnalysisServicesServer updatedServer = AnalysisServicesClient.CreateOrUpdateServer(ResourceGroupName, Name, location, Sku, Tag, Administrators, currentServer);
81+
AnalysisServicesServer updatedServer = AnalysisServicesClient.CreateOrUpdateServer(ResourceGroupName, Name, location, Sku, Tag, Administrator, currentServer);
8282

8383
if(PassThru.IsPresent)
8484
{

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Microsoft.Azure.Commands.AnalysisServices.dll-help.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
<command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue>
157157
</command:parameter>
158158
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
159-
<maml:name>Administrators</maml:name>
159+
<maml:name>Administrator</maml:name>
160160
<maml:description>
161161
<maml:para>A string representing a comma separated list of users or groups to be set as administrators on the server. The users or groups need to be specified UPN format e.g. [email protected] or [email protected]</maml:para>
162162
</maml:description>
@@ -240,7 +240,7 @@
240240
<dev:defaultValue></dev:defaultValue>
241241
</command:parameter>
242242
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
243-
<maml:name>Administrators</maml:name>
243+
<maml:name>Administrator</maml:name>
244244
<maml:description>
245245
<maml:para>A string representing a comma separated list of users or groups to be set as administrators on the server. The users or groups need to be specified UPN format e.g. [email protected] or [email protected]</maml:para>
246246
</maml:description>
@@ -680,7 +680,7 @@
680680
<command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue>
681681
</command:parameter>
682682
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
683-
<maml:name>Administrators</maml:name>
683+
<maml:name>Administrator</maml:name>
684684
<maml:description>
685685
<maml:para>A string representing a comma separated list of users or groups to be set as administrators on the server. The users or groups need to be specified UPN format e.g. [email protected] or [email protected]</maml:para>
686686
</maml:description>
@@ -759,7 +759,7 @@
759759
<dev:defaultValue></dev:defaultValue>
760760
</command:parameter>
761761
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
762-
<maml:name>Administrators</maml:name>
762+
<maml:name>Administrator</maml:name>
763763
<maml:description>
764764
<maml:para>A string representing a comma separated list of users or groups to be set as administrators on the server. The users or groups need to be specified UPN format e.g. [email protected] or [email protected]</maml:para>
765765
</maml:description>

tools/AzureRM/AzureRM.psd1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ ProcessorArchitecture = 'None'
5151
RequiredModules = @(
5252
@{ ModuleName = 'AzureRM.Profile'; RequiredVersion = '2.2.0'},
5353
@{ ModuleName = 'Azure.Storage'; RequiredVersion = '2.2.0'},
54+
@{ ModuleName = 'AzureRM.AnalysisServices'; RequiredVersion = '0.0.1'},
5455
@{ ModuleName = 'AzureRM.ApiManagement'; RequiredVersion = '3.0.0'},
5556
@{ ModuleName = 'AzureRM.Automation'; RequiredVersion = '2.2.0'},
5657
@{ ModuleName = 'AzureRM.Backup'; RequiredVersion = '2.2.0'},

0 commit comments

Comments
 (0)