Skip to content

Add migration cmdlets #2721

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

Conversation

DeepakRajendranMsft
Copy link
Contributor

No description provided.

@azurecla
Copy link

azurecla commented Aug 3, 2016

Hi @DeepakRajendranMsft, 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;

@DeepakRajendranMsft
Copy link
Contributor Author

@markcowl, CI is good now :)

@cormacpayne
Copy link
Member

@haitch
Copy link
Contributor

haitch commented Aug 3, 2016

it failed with this test (same test failed in my PR also), someone should fix this test
Microsoft.WindowsAzure.Commands.Test.Websites.SaveAzureWebsiteLogTests.SaveAzureWebsiteLogWithNoFileExtensionTest

/// <summary>
/// Migrate ASM Network Security Group to ARM
/// </summary>
[Cmdlet(VerbsCommon.Move, "AzureNetworkSecurityGroup"), OutputType(typeof(OperationStatusResponse))]
Copy link
Member

Choose a reason for hiding this comment

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

SupportsShouldProcess=true

@DeepakRajendranMsft
Copy link
Contributor Author

DeepakRajendranMsft commented Aug 3, 2016

@markcowl why do you think we need ShouldProcess() here? we do not need any confirmation of sorts from the user?

@DeepakRajendranMsft This is required for all new cmdlets. ShouldProcess does not normally print a prompt; it just allows the user to use -Confirm and -WhatIf to cotnrol / reflect over execution of the cmdlet.

@markcowl These cmdlets are not “new-” cmdlets. These are similar to Move-Azurestorage, and so I don’t believe we need ShouldProcess for these Move- cmdlets.

@DeepakRajendranMsft It is the same for substantially changed cmdlets, like these. If these are a major new set of cmdlets for migrating resources, we want to make sure that they are following best practices

Assert-Null $status.ValidationMessages

# Prepare move
Move-AzureRouteTable -RouteTableName $routeTableName -Prepare -Confirm
Copy link
Member

@markcowl markcowl Aug 4, 2016

Choose a reason for hiding this comment

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

Do not pass -Confirm

Yep. just fixed that. :)

@markcowl
Copy link
Member

markcowl commented Aug 4, 2016

@DeepakRajendranMsft It looks like you added the -Confirm parameter to each of your cmdlet invocatiosn in script. -Confirm tells the cmdlet to always prompt on ShouldProcess. Remove this parameter and these issues should go away

@markcowl yep, just fixed that

@cormacpayne
Copy link
Member

cormacpayne commented Aug 4, 2016

@DeepakRajendranMsft
Copy link
Contributor Author

@markcowl @cormacpayne are we good for the merge?

@cormacpayne cormacpayne merged commit b23c52e into Azure:release-2.0.0 Aug 4, 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.

5 participants