Skip to content

Added Powershell Cmdlets to support Enabling/Disabling GeoBackupPolicy for SQL Azure DataWarehouses #2811

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 7 commits into from
Aug 30, 2016

Conversation

alazad-msft
Copy link
Contributor

No description provided.

@azurecla
Copy link

Hi @alazad-msft, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.

TTYL, AZPRBOT;

@azuresdkci
Copy link

Can one of the admins verify this patch?

@markcowl
Copy link
Member

@akromm @yoavrubin Can you guys take a look at this and sign off if this looks OK and doesn't confliuct with planned changes this release?

@akromm-zz
Copy link
Contributor

looks good to me. What are the planned changes this might conflict with?

namespace Microsoft.Azure.Commands.Sql.Backup.Cmdlet
{
public abstract class AzureSqlDatabaseGeoBackupPolicyCmdletBase :
AzureSqlCmdletBase<IEnumerable<AzureSqlDatabaseGeoBackupPolicyModel>, AzureSqlDatabaseBackupAdapter>
Copy link
Member

Choose a reason for hiding this comment

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

Why aren't you inheriting from AzureSqlDatabaseCmdletBase, it already provides the server and database parameters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need a AzureSqlDatabaseBackupAdapter object to be returned with InitModelAdapter, so an override would be needed anyways.

protected override AzureSqlDatabaseBackupAdapter InitModelAdapter(AzureSubscription subscription) { return new AzureSqlDatabaseBackupAdapter(DefaultProfile.Context); }

Copy link
Member

Choose a reason for hiding this comment

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

Discussed offline, @alazad-msft will update the inheritance

@yoavrubin
Copy link
Member

LGTM

@cormacpayne
Copy link
Member

@azuresdkci test this please

@markcowl
Copy link
Member

@azuresdkci add to whitelist

@@ -1,4 +1,4 @@
## 2016.08.09 version 2.0.1
Copy link
Member

Choose a reason for hiding this comment

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

@alazad-msft Please revert changes to this file

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 Reverted ChangeLog.md

@cormacpayne
Copy link
Member

@alazad-msft Hey Alec, the build is failing because you are missing help for the two cmdlets that you have added.

@yoavrubin
Copy link
Member

yoavrubin commented Aug 25, 2016

In this PR #2824 I've made a change that affects all of AzureSQL's cmdlets. Please take a look there and make the relevant changes to your new cmdlets (changes that are related to using ConfirmAction).

@alazad-msft
Copy link
Contributor Author

@cormacpayne Thanks! I noticed it as well. I have made the needed updates and resolved the issues. Please continue with merge.

/// </summary>
[Cmdlet(VerbsCommon.Set, "AzureRmSqlDatabaseGeoBackupPolicy",
SupportsShouldProcess = true,
ConfirmImpact = ConfirmImpact.Low)]
Copy link
Member

Choose a reason for hiding this comment

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

Why confirmimpact.low? Normally, cmdlets that make changes would have the default confirmpmact (confirmimpact.medium)

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 Fixed - upgraded set cmdlet to ConfirmImpact.Medium.

@markcowl
Copy link
Member

@alazad-msft One nit + please pull (and rebase on using git pull --rebase the latest changes, as these include a test fix).

…t/set of geo backup policies on Azure SQL DBs:

- Get-AzureRmSqlDatabaseGeoBackupPolicy
- Set-AzureRmSqlDatabaseGeoBackupPolicy
…del an enum instead of string with Enabled/Disabled possible values. Reverted changelog.
…reSqlDatabaseCmdletBase instead of AzureSqlCmdletBase to inherit the ServerName and DatabaseName properties.
…act.Medium instead of Low since it makes changes to a SQL Azure resource.
@alazad-msft
Copy link
Contributor Author

@markcowl Fixed nit and rebased. Thanks for your kind review, Mark.

@cormacpayne
Copy link
Member

@markcowl markcowl merged commit 5f7d245 into Azure:dev Aug 30, 2016
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.

7 participants