Skip to content

Adding subnet delegation cmdlets #7220

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 11 commits into from
Sep 14, 2018

Conversation

rupalivohra
Copy link

@rupalivohra rupalivohra commented Sep 12, 2018

Description

Adding PS support for CRUD operations for delegations on subnets

Checklist

@praries880
Copy link
Contributor

@rupalivohra

  • We need a design review link for the PR, information here on how to open one.

  • There are no tests in the PR, we would need all the cmdlets to be tested.

  • Help file generation documentation here.

@rupalivohra
Copy link
Author

@praries880 Can you please review the code that is here in parallel? I'm in the process of getting through the cmdlet review and adding tests.

@rupalivohra rupalivohra force-pushed the delegation branch 2 times, most recently from fe79b8e to ea5e1ff Compare September 13, 2018 01:09
@praries880
Copy link
Contributor

@rupalivohra Follow instructions inthis document to add alias mappings for netcore.

Remove the file tools/AzureRM/AzureRM.psm1

@rupalivohra rupalivohra force-pushed the delegation branch 7 times, most recently from 8b0b261 to 9375cd9 Compare September 13, 2018 17:28
Copy link
Contributor

@praries880 praries880 left a comment

Choose a reason for hiding this comment

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

@rupalivohra yuou need to fix the following static analysis errors :

AssemblyFileName ClassName Target Severity ProblemId Description Remediation
c:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.Azure.Commands.Network.dll Microsoft.Azure.Commands.Network.AddAzureSubnetDelegation Add-AzureRmDelegation 1 8100 Add-AzureRmDelegation Does not support ShouldProcess but the cmdlet verb Add indicates that it should. Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue
c:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.Azure.Commands.Network.dll Microsoft.Azure.Commands.Network.VirtualNetwork.Subnet.RemoveAzureSubnetDelegation Remove-AzureRmDelegation 1 8100 Remove-AzureRmDelegation Does not support ShouldProcess but the cmdlet verb Remove indicates that it should. Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue
c:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.Azure.Commands.Network.dll Microsoft.Azure.Commands.Network.VirtualNetwork.Subnet.NewAzureDelegationCommand New-AzureRmDelegation 1 8100 New-AzureRmDelegation Does not support ShouldProcess but the cmdlet verb New indicates that it should. Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue
c:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.Azure.Commands.Network.dll Microsoft.Azure.Commands.Network.AddAzureSubnetDelegation Add-AzureRmDelegation 1 8100 Add-AzureRmDelegation Does not support ShouldProcess but the cmdlet verb Add indicates that it should. Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue
c:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.Azure.Commands.Network.dll Microsoft.Azure.Commands.Network.VirtualNetwork.Subnet.RemoveAzureSubnetDelegation Remove-AzureRmDelegation 1 8100 Remove-AzureRmDelegation Does not support ShouldProcess but the cmdlet verb Remove indicates that it should. Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue
c:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.Azure.Commands.Network.dll Microsoft.Azure.Commands.Network.VirtualNetwork.Subnet.NewAzureDelegationCommand New-AzureRmDelegation 1 8100 New-AzureRmDelegation Does not support ShouldProcess but the cmdlet verb New indicates that it should. Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue

.DESCRIPTION
SmokeTest
#>
function Test-subnetDelegationCRUD
Copy link
Contributor

Choose a reason for hiding this comment

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

you need to add the test recodings for the tests to both git and the project. Example here and here](https://github.com/Azure/azure-powershell/blob/preview/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj#L321).

Copy link
Author

Choose a reason for hiding this comment

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

static analysis errors should be fixed in the latest build.
Running a local build to re-run tests before I add the recordings. Should be there soon.

Copy link
Author

Choose a reason for hiding this comment

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

I added these cmdlets to the exception, but I'm still experiencing build failures :(

@praries880
Copy link
Contributor

@rupalivohra can you pull the latest changes in Azure:network-september-release

I am not sure why is this failing : https://travis-ci.org/Azure/azure-powershell/builds/428268315#L1652

@rupalivohra rupalivohra force-pushed the delegation branch 3 times, most recently from 87c5aaf to 9850ea2 Compare September 13, 2018 21:20
@maddieclayton maddieclayton changed the base branch from network-september-release to release-2018-09-17 September 14, 2018 04:37
@maddieclayton
Copy link
Contributor

@rupalivohra retargeted the PR, please resolve the merge conflict when making other changes

@rupalivohra rupalivohra force-pushed the delegation branch 2 times, most recently from 46426ea to 08843c5 Compare September 14, 2018 04:50
@maddieclayton
Copy link
Contributor

@rupalivohra Fixed the build failure and update two more of the delegation descriptions with the update description. Should be good to go as long as the build passes this time. Will check either late tonight or tomorrow morning.

@rupalivohra
Copy link
Author

rupalivohra commented Sep 14, 2018

@maddieclayton thanks for the fix. It looks like unrelated tests are failing in the default build. Can we ignore those and check in regardless?
I also see these signature issues again, but I've already added them to exceptions. Is there anything else I need to do? If the ci build succeeded, does that mean these can be ignored?

Add-AzureRmDelegation   Does not support ShouldProcess but the cmdlet verb Add indicates that it   should.
Remove-AzureRmDelegation Does not support   ShouldProcess but the cmdlet verb Remove indicates that it should.
New-AzureRmDelegation Does not support   ShouldProcess but the cmdlet verb New indicates that it should.

@rupalivohra rupalivohra added this to the 2018-09-17 - Ignite milestone Sep 14, 2018
@maddieclayton
Copy link
Contributor

@rupalivohra Looks like the names of the paths changed since the last time the signature issues were ran - fixed it. Letting CI run now, hopefully all the tests will pass as they seem to be unrelated. We cannot merge this without CI passing, but I will gate creating the second release candidate on merging this PR so no need to worry about that.

@maddieclayton
Copy link
Contributor

@rupalivohra Looking at the test failures now

@rupalivohra
Copy link
Author

Failing tests in build:
From Microsoft.Azure.Commands.Profile.Test: Microsoft.Azure.Commands.ResourceManager.Common.Test.AzureRMProfileTests.LoadingProfileWorks<br clear="all" /><pre>System.IO.DirectoryNotFoundException : Could not find a part of the path 'C:\Users\fxsign\AppData\Roaming\.Azure\TokenCache.dat'

From Microsoft.WindowsAzure.Commands.Test:
Azure Authoring Tools are not installed and are required

@MikhailTryakhov
Copy link
Contributor

@maddieclayton @praries880 ready for merge

@maddieclayton maddieclayton merged commit b797ada into Azure:release-2018-09-17 Sep 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants