Skip to content

Add property State in additional to ProvisioningState #3406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Feb 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/ResourceManager/AnalysisServices/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
- Additional information about change #1
-->
## Current Release
* Added State property in additional to ProvisioningState
Copy link
Member

Choose a reason for hiding this comment

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

You need to be more specific about this change. Which cmdlets will be affected, how would the user use the new State property. How is it different than Provinsioning State?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@markcowl , I have added more information about this change.
Currently ASPAAS service still return same for both State and ProvisioningState, we could not tell the user the actual different example until service side make change in future.

I already provided the difference in intention

- All the cmdlet returning AnalysisService would have a new property 'State' used outside of provisioing.
- The 'State' is intended to check status outside of provisioning, while 'ProvisioningState' is intended to check status related to Provisioning.
- ProvisioningState and State are same in service side at this moment, the service side would differenciate ProvisioningState and State in future

## Version 0.0.3
* Added two new dataplane APIs in a separate module Azure.AnalysisServices.psd1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package id="Hyak.Common" version="1.0.3" targetFramework="net45" />
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Analysis" version="1.0.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Analysis" version="1.0.2-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<HintPath>..\..\..\packages\Microsoft.Azure.Gallery.2.6.2-preview\lib\net40\Microsoft.Azure.Gallery.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.Analysis, Version=1.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Analysis.1.0.1-preview\lib\net45\Microsoft.Azure.Management.Analysis.dll</HintPath>
<Reference Include="Microsoft.Azure.Management.Analysis, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Analysis.1.0.2-preview\lib\net45\Microsoft.Azure.Management.Analysis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.Authorization">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function Test-AnalysisServicesServer
)

try
{
{
# Creating server
$resourceGroupName = Get-ResourceGroupName
$serverName = Get-AnalysisServicesServerName
Expand All @@ -22,11 +22,14 @@ function Test-AnalysisServicesServer
Assert-AreEqual $location $serverCreated.Location
Assert-AreEqual "Microsoft.AnalysisServices/servers" $serverCreated.Type
Assert-True {$serverCreated.Id -like "*$resourceGroupName*"}
Assert-True {$serverCreated.ServerFullName -ne $null -and $serverCreated.ServerFullName.Contains("*$serverName*")}
Assert-True {$serverCreated.ServerFullName -ne $null -and $serverCreated.ServerFullName.Contains("$serverName")}

[array]$serverGet = Get-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName
$serverGetItem = $serverGet[0]

Assert-True {$serverGetItem.ProvisioningState -like "Succeeded"}
Assert-True {$serverGetItem.State -like "Succeeded"}

Assert-AreEqual $serverName $serverGetItem.Name
Assert-AreEqual $location $serverGetItem.Location
Assert-AreEqual "Microsoft.AnalysisServices/servers" $serverGetItem.Type
Expand All @@ -36,7 +39,7 @@ function Test-AnalysisServicesServer
Assert-True {Test-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName}
# Test it without specifying a resource group
Assert-True {Test-AzureRmAnalysisServicesServer -Name $serverName}

# Updating server
$tagsToUpdate = @{"TestTag" = "TestUpdate"}
$serverUpdated = Set-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName -Tag $tagsToUpdate -PassThru
Expand All @@ -55,7 +58,7 @@ function Test-AnalysisServicesServer
# List all servers in resource group
[array]$serversInResourceGroup = Get-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName
Assert-True {$serversInResourceGroup.Count -ge 1}

$found = 0
for ($i = 0; $i -lt $serversInResourceGroup.Count; $i++)
{
Expand Down Expand Up @@ -95,13 +98,16 @@ function Test-AnalysisServicesServer
Suspend-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName
[array]$serverGet = Get-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName
$serverGetItem = $serverGet[0]
# this is to ensure backward compatibility compatibility. The servie side would make change to differenciate state and provisioningState in future
Assert-True {$serverGetItem.State -like "Paused"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment saying that this is to ensure backward compatibility. The breaking server changes will be done after this is released.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Assert-True {$serverGetItem.ProvisioningState -like "Paused"}

# Resume Analysis Servicesserver
Resume-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName
[array]$serverGet = Get-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName
$serverGetItem = $serverGet[0]
Assert-True {$serverGetItem.ProvisioningState -like "Succeeded"}
Assert-True {$serverGetItem.State -like "Succeeded"}

# Delete Analysis Servicesserver
Remove-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName -PassThru
Expand All @@ -124,6 +130,7 @@ Tests Analysis Services server lifecycle Failure scenarios (Create, Update, Get
#>
function Test-NegativeAnalysisServicesServer
{

param
(
$location = "West US",
Expand Down Expand Up @@ -193,6 +200,7 @@ function Test-AnalysisServicesServerRestart

$serverCreated = New-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName -Location $location -Sku 'S1' -Administrators '[email protected],[email protected]'
Assert-True {$serverCreated.ProvisioningState -like "Succeeded"}
Assert-True {$serverCreated.State -like "Succeeded"}

$asAzureProfile = Login-AzureAsAccount -RolloutEnvironment $rolloutEnvironment
Assert-NotNull $asAzureProfile "Login-AzureAsAccount $rolloutEnvironment must not return null"
Expand Down
Loading