Skip to content

[Azure Analysis Services] Enable associate/dissociate gateway with AS. #6043

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 12 commits into from
May 11, 2018

Conversation

taiwu
Copy link
Contributor

@taiwu taiwu commented Apr 25, 2018

Description

Checklist

@@ -82,6 +82,18 @@ public class NewAnalysisServicesServer : AnalysisServicesCmdletBase
HelpMessage = "Firewall configuration")]
public PsAzureAnalysisServicesFirewallConfig FirewallConfig { get; set; }

[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false,
HelpMessage = "Gateway resource name")]
Copy link
Member

Choose a reason for hiding this comment

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

You should allow them to specify the gateway by resource ID instead, they are much more likely to have this value

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We construct the resource ID internally, but sure.

@@ -88,6 +88,22 @@ public int ReadonlyReplicaCount
HelpMessage = "Firewall configuration")]
public PsAzureAnalysisServicesFirewallConfig FirewallConfig { get; set; }

[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false,
Copy link
Member

Choose a reason for hiding this comment

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

same comment

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 updated, please review again.

Copy link
Member

Choose a reason for hiding this comment

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

These should be in separate parameter sets.

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 updated

@taiwu
Copy link
Contributor Author

taiwu commented Apr 26, 2018

ping @markcowl

@taiwu
Copy link
Contributor Author

taiwu commented May 1, 2018

ping @markcowl and @maddieclayton

@markcowl
Copy link
Member

markcowl commented May 1, 2018

@taiwu You need to have a cmdlet review for any public api changes: https://github.com/azure/azure-powershell-cmdlet-review-pr/issues

@@ -88,6 +88,22 @@ public int ReadonlyReplicaCount
HelpMessage = "Firewall configuration")]
public PsAzureAnalysisServicesFirewallConfig FirewallConfig { get; set; }

[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false,
Copy link
Member

Choose a reason for hiding this comment

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

These should be in separate parameter sets.

@taiwu
Copy link
Contributor Author

taiwu commented May 1, 2018

cmdlet review already added last week. https://github.com/Azure/azure-powershell-pr/wiki/Cmdlet-Reviews

@taiwu
Copy link
Contributor Author

taiwu commented May 4, 2018

Updated the parameter sets and help doc, cmdlet review is https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/67

@taiwu
Copy link
Contributor Author

taiwu commented May 7, 2018

@azuresdkci retest this please

@@ -21,6 +21,7 @@

## Version 0.6.7
* Set minimum dependency of module to PowerShell 5.0
* Enable Gateway assocaite/disassociate operations on AS.
Copy link
Contributor

Choose a reason for hiding this comment

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

This should go directly under Current Release... We will move it to under a new version header when we generate the release version.

$resourceGroupName = Get-ResourceGroupName
$serverName = Get-AnalysisServicesServerName
$gatewayName = $env:GATEWAY_NAME
$gateway = Get-AzureRmResource -ResourceName $gatewayName -ResourceGroupName $resourceGroupName
Copy link
Contributor

Choose a reason for hiding this comment

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

So, this test assumes that the gateway server already exists in the subscription/RG... Is it possible to create the gateway server as part of the test?

Otherwise some one (lets say a person in the PS team) would not be able to re-record the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This have to be a pre-setup azure resource, which requires user to install unified gateway on their on-premise server and generate an gateway azure resource associated on it. It is not possible to automate the procedure in few lines of powershell scripts. This is LiveOnly test.

Copy link
Contributor

@praries880 praries880 May 8, 2018

Choose a reason for hiding this comment

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

ok... can you add a comment to the test case that describes what all needs to be done for one to be able to set up the gateway server , the documentation could be as simple as pointing the person to follow an online guide on how to get it done as well ;) )?
That way the person running the test will have the instructions to do so....

AnalysisServicesServer updatedServer = AnalysisServicesClient.CreateOrUpdateServer(ResourceGroupName, Name, location, Sku, Tag, Administrator, currentServer, BackupBlobContainerUri, ReadonlyReplicaCount, DefaultConnectionMode, setting);
if (DisassociateGateway.IsPresent)
{
GatewayResourceId = "-";
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to see this special value, namely "-" defined in a common file as a constant in some common codethat can be comsumed from the various places this is used.

@@ -87,6 +88,16 @@ public AnalysisServicesClient()
}
}

GatewayDetails gatewayDetails = null;
if (gatewayResourceId == "-")
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to see this special value, namely "-" defined in a common file as a constant in some common codethat can be comsumed from the various places this is used.

@taiwu
Copy link
Contributor Author

taiwu commented May 9, 2018

@markcowl Please take a look, the parameter sets are updated.

@maddieclayton
Copy link
Contributor

@praries880 praries880 merged commit 17b6a03 into Azure:preview May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants