Skip to content

To support an input for RG name#494

Merged
williexu merged 13 commits intoAzure:masterfrom
carpenike:master
Feb 26, 2019
Merged

To support an input for RG name#494
williexu merged 13 commits intoAzure:masterfrom
carpenike:master

Conversation

@carpenike
Copy link
Copy Markdown
Contributor

Our environment does not allow users to create new RGs. Therefore, the RG needs to exist and be provided as an input for the temporary storage account location.

Added support for additional temporary RG location.
Updated the temporary rg name to be dynamic input.
@msftclas
Copy link
Copy Markdown

msftclas commented Jan 26, 2019

CLA assistant check
All CLA requirements met.

@azuresdkci
Copy link
Copy Markdown

If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR:

docker run -it microsoft/azure-cli:latest
export EXT=<NAME>
pip install --upgrade --target ~/.azure/cliextensions/$EXT "git+https://github.com/carpenike/azure-cli-extensions.git@master#subdirectory=src/$EXT&egg=$EXT"

@williexu williexu requested a review from tamirkamara January 28, 2019 06:51
@williexu
Copy link
Copy Markdown
Contributor

williexu commented Feb 1, 2019

@tamirkamara can you review?

@tamirkamara
Copy link
Copy Markdown
Contributor

tamirkamara commented Feb 5, 2019

I'll will take care of it this week

Copy link
Copy Markdown
Contributor

@tamirkamara tamirkamara left a comment

Choose a reason for hiding this comment

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

Just making sure you're aware that in the scenario where the executing identity doesn't have permission to create the temp resource group, you won't be able to ask for a cleanup

c.argument('timeout', options_list=['--timeout'], type=int, default=3600,
help='Time in seconds for the copy operation to finish. Increase this time if '
'you are going to copy large images (disks) like 512GB or more.')
c.argument('temporary_rg_name', options_list=['--temp-rg-name'], default='image-copy-rg',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please rename the option and var name without abbreviations: temporary_resource_group_name

# pylint: disable=too-many-locals
def imagecopy(source_resource_group_name, source_object_name, target_location,
target_resource_group_name, source_type='image', cleanup='false',
temporary_rg_name, target_resource_group_name, source_type='image', cleanup='false',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. I think it makes sense to have both target parameters together, so please move the new temporary_rg_name parameter after target_resource_group_name
  2. Shouldn't the new parameter have a default value set here too, like all others have?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry, not really sure what I did with 'approve these changes.' :) thought that was approving them for my PR.

I believe it should have a default value as well as the other ones. Do I need to make these changes within my source and re-submit the PR or can it be changed within this view directly?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You should make changes in your source code and push to you fork. The PR will be updated automatically without the need to re-submit it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

BTW, looks like you also need to do a merge with the latest changes on the master branch

@williexu
Copy link
Copy Markdown
Contributor

@ryholt @carpenike ping for updates

@tamirkamara
Copy link
Copy Markdown
Contributor

@ryholt I'm ok with your changes but the CI is failing and blocks my approval

@carpenike
Copy link
Copy Markdown
Contributor Author

Yup going to try to get it fixed this morning. The lint is failing because the line is too long.

Copy link
Copy Markdown
Contributor

@tamirkamara tamirkamara left a comment

Choose a reason for hiding this comment

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

Thank you!
@williexu lets merge this (with squash if possible...)

@williexu williexu merged commit 06d67f4 into Azure:master Feb 26, 2019
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