Skip to content

Add new cmdlet Reset-AzHubRouter #12094

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 18 commits into from
Jun 15, 2020

Conversation

nagula-ritvika
Copy link
Contributor

@nagula-ritvika nagula-ritvika commented Jun 9, 2020

Description

Expose Reset-HubRouter cmdlet to allow users to reset the routing state of the virtual hub.

Design Review Link : https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/588

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
    • the markdown help files have been regenerated using the commands listed here

@adxsdkps
Copy link
Collaborator

adxsdkps commented Jun 9, 2020

Can one of the admins verify this patch?

@nagula-ritvika nagula-ritvika changed the title Reset hubrouter Add new cmdlet Reset-HubRouter Jun 9, 2020
@nagula-ritvika nagula-ritvika added this to the S171 (2020-06-23) milestone Jun 9, 2020
@VeryEarly VeryEarly self-assigned this Jun 9, 2020
Copy link
Collaborator

@VeryEarly VeryEarly left a comment

Choose a reason for hiding this comment

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

  • please add and record test for new added cmdlet

  • please export new cmdlet in Network.psd1

@nagula-ritvika
Copy link
Contributor Author

  • please add and record test for new added cmdlet
  • please export new cmdlet in Network.psd1
  1. This cmdlet can be used only when the RoutingState of the hub is not provisioned, which i dont think i can simulate, but i can still add it the tests. Need to wait for SDK to get merged in before i record it.
  2. Done

@VeryEarly
Copy link
Collaborator

you can try pull latest changes from network-may branch, this should fix most build issue

@VeryEarly
Copy link
Collaborator

  • please re-record TestCortexCRUD

  • please regenerate help-markdown: Reset-AzHubRouter.md
    cmdlet names are incorrect in this file

@VeryEarly
Copy link
Collaborator

VeryEarly commented Jun 12, 2020

Hi @number213 @nagula-ritvika ,

Just want to confirm, it looks like this new cmdlet, "Reset-AzHubRouter" is actually doing "Set-AzVirtualHub",

It basically get the existing VirtualHub and perform PUT operation to Overwrite the existing one.

Sorry it might be confusing since you have approved design, but this cmdlet name doesn't accurate to me, can you help me understand why using this cmdlet name?

It looks to me Reset-AzVirtualHub could be a more proper name

@nagula-ritvika
Copy link
Contributor Author

Hi @number213 @nagula-ritvika ,

Just want to confirm, it looks like this new cmdlet, "Reset-AzHubRouter" is actually doing "Set-AzVirtualHub",

It basically get the existing VirtualHub and perform PUT operation to Overwrite the existing one.

Sorry it might be confusing since you have approved design, but this cmdlet name doesn't accurate to me, can you help me understand why using this cmdlet name?

It looks to me Reset-AzVirtualHub could be a more proper name

Hi, we have an internal Routing entity in the hub which we do not expose to the customer but we have started exposed a property called routingState which indicates the state of the routing entity. The name Reset-AzHubRouter was decided by our PMs and managers so that we have the consistent name across PS, CLI and Portal. The use of this cmdlet is to retrigger a put on the hub only when the routing state is not Provisioned. We also do not want to accidentally take in any change in the hub if the cx uses the input object and hence explicitly do a Get and then the Put.

@nagula-ritvika
Copy link
Contributor Author

Regarding the test recording: I am hitting errors due to local build failure : can you please take a look :
image

@VeryEarly
Copy link
Collaborator

Hi @number213 @nagula-ritvika ,
Just want to confirm, it looks like this new cmdlet, "Reset-AzHubRouter" is actually doing "Set-AzVirtualHub",
It basically get the existing VirtualHub and perform PUT operation to Overwrite the existing one.
Sorry it might be confusing since you have approved design, but this cmdlet name doesn't accurate to me, can you help me understand why using this cmdlet name?
It looks to me Reset-AzVirtualHub could be a more proper name

Hi, we have an internal Routing entity in the hub which we do not expose to the customer but we have started exposed a property called routingState which indicates the state of the routing entity. The name Reset-AzHubRouter was decided by our PMs and managers so that we have the consistent name across PS, CLI and Portal. The use of this cmdlet is to retrigger a put on the hub only when the routing state is not Provisioned. We also do not want to accidentally take in any change in the hub if the cx uses the input object and hence explicitly do a Get and then the Put.

Got it

@VeryEarly
Copy link
Collaborator

Regarding the test recording: I am hitting errors due to local build failure : can you please take a look :
image

can you try pull latest changes from network-may branch? this should fix most build issue

@VeryEarly VeryEarly changed the title Add new cmdlet Reset-HubRouter Add new cmdlet Reset-AzHubRouter Jun 12, 2020
@nagula-ritvika
Copy link
Contributor Author

Regarding the test recording: I am hitting errors due to local build failure : can you please take a look :
image

can you try pull latest changes from network-may branch? this should fix most build issue

Doesnt seem to be helping, tried git clean -xfd and then msbuild and still see the same errors.

@nagula-ritvika
Copy link
Contributor Author

@VeryEarly : updated the test recording. please take a look and merge it in :)

@VeryEarly VeryEarly merged commit 69a8d24 into Azure:network-may Jun 15, 2020
VeryEarly added a commit that referenced this pull request Jun 16, 2020
* PR: LoadBalancerBackendAddressPool powershell Cmdlets (#11734)

* lb backend address pool create/update/delete operations

* adding tests with draft

* making some updates for design review PR to powershell team

* adding .md files

* -adding tests
-updating help files
-addressing feedback

* pulling in sdk changes for network-may branch for validation errors

* Addressing comments and updating output format for PsLoadBalancerBackendAddress

* updating .md files and making final changes

Co-authored-by: Ali Egal <[email protected]>

* Adding new optional parameter to specify dns servers for Virtual Wan P2SVpnGateway and P2SClients (#12006)

* Adding new optional parameter to specify dns servers for Virtual Wan-P2SVpnGateway and P2SClients

* Incorporate code review comments and added test record

* Suppress warnings

* Suppress cred scan errors

* updating help files examples (#12068)

Co-authored-by: Ali Egal <[email protected]>

* multipip changes

* Do not pass new fields with default values unless configured explicitly (#12076)

* multi pip changes

* ps tests

* generating help files

* help files changes

* help file

* regenerating help files

* updated markdown file

* renaming the cmdlets

* name change

* tests

* renaming a help file

* updating the recordings

* test

* Used signed Network SDK with API version 2020-05-01 (#12100)

* Network SDK for 2020-05-01

* Fixes for FirewallPolicy

* Recs

* Recs

* SDK package

* Ignore Network API version in Batch tests

* CredScan suppression

* clean up

* updatid recordings

* clean up

* clean up

* Vpn gateway commandlet update (#12108)

* commit1

* commit2

* Fix1

Co-authored-by: Khushboo Baheti <[email protected]>

* addressing comments

* added exceptions

* correcting the exceptions

* Change RuleGroup, RuleCollectionGroup, and RuleType and add support for Multiple DNAT Rule Collections (#12095)

* Change RuleGroup and RuleCollectionGroup based on swagger change. Also,
add support for NAT Rule Collections containing multiple NAT Rule
Collections

* PR Comments

* Updated the SDK

* StaticAnalysis

* Previous changes got removed in rebase

* update to vnet reference id only

* Use Network SDK from NuGet (#12114)

* Use Network SDK from NuGet

* Additional mappings

* Firewall Policy ThreatIntelWhitelist (#12078)

* ti whitelist changes

* build fix

* help files

* added examples for help files

* adding the online version

* recordings done

* changed to markdown files

* fixed statis analysis

* added exception for static analysis

* addressing comments

* updated recordings

* new recordings

* updating due to validation error on CICD pipeline

* refreshing test files, updating to remove id from variable to fix casting error

* DNS Proxy in Firewall Policy (#12120)

* merge conflict

* fixes

* tejas review

Co-authored-by: Ishani Gupta <[email protected]>

* Add support for IPGroups in Firewall Policy Rules (#12118)

* Add support for IPGroups in Firewall Policy Rules

* Pr Comments

* Resolved merge conflicts

* Update ChangeLog.md

* Update ChangeLog.md

Co-authored-by: Yabo Hu <[email protected]>

* Application Gateway Private Link Cmdlets (#12133)

* Application Gateway Private Link Cmdlets

* add change log

* Add new cmdlet Reset-AzHubRouter (#12094)

* add routing state and expose reset-hubrouter

* update help

* updated

* Update ChangeLog.md

* update help file name

* export cmdlet

* update test

* fix

* update md file

* update tests

* updated help

* Update Reset-AzHubRouter.md

* test recorded

Co-authored-by: Yabo Hu <[email protected]>

* Fixes after merge

* Revert HPCCache.Test.csproj

Co-authored-by: aegal <[email protected]>
Co-authored-by: Ali Egal <[email protected]>
Co-authored-by: Nilambari <[email protected]>
Co-authored-by: Sai Mankala <[email protected]>
Co-authored-by: tejasshah7 <[email protected]>
Co-authored-by: Khushboo Baheti <[email protected]>
Co-authored-by: Khushboo Baheti <[email protected]>
Co-authored-by: Ishani Gupta <[email protected]>
Co-authored-by: Ishani Gupta <[email protected]>
Co-authored-by: Yabo Hu <[email protected]>
Co-authored-by: jaishals <[email protected]>
Co-authored-by: Ritvika Reddy Nagula <[email protected]>
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.

4 participants