Skip to content
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

use refresh token setting from credential #12278

Closed
wants to merge 2 commits into from

Conversation

xiangyan99
Copy link
Member

It depends on #12136

try:
token_refresh_options = self._credential.get_token_refresh_options()
self._token_refresh_offset = int(token_refresh_options.get("token_refresh_offset", 300))
except Exception: # pylint: disable=broad-except
Copy link
Member

Choose a reason for hiding this comment

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

I would just catch AttributeError (if get_token_refresh_options is not defined), and let a potential "NotANumber" throw from the int conversion

@xiangyan99 xiangyan99 marked this pull request as draft July 7, 2020 16:26
@xiangyan99 xiangyan99 closed this Jul 20, 2020
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this pull request Jan 6, 2021
Network august release (Azure#12278)

* Adds base for updating Microsoft.Network from version stable/2020-07-01 to version 2020-08-01

* Updates readme

* Updates API version in new specs and examples

* add patch operation for express route gateway (Azure#11553)

* add patch

* fix example

* Added new cloud service NIC and PIP APIs (Azure#11650)

Co-authored-by: Richa Jain <ricjain@microsoft.com>

* Adding support for Vpn Link Connection Mode (Azure#11574)

Co-authored-by: Abhishek Shah <shabhis@microsoft.com>

* Reverting the changes made for address space update as the changes in service code are not in yet (Azure#11754)

Co-authored-by: Hari Prasad Perabattula <haperaba@microsoft.com>

* VPN NAT for Virtual WAN feature changes (Azure#11815)

* VPN NAT for Virtual WAN feature changes

* PrettierCheck fixes

* Incorporate review comments and update examples

* Add edge zone parameters for networking resources and add extendedLocation property to customIpPrefix (Azure#11933)

* Add extendedLocation property to customIpPrefix

* Fix the directory

* Address linting errors

* Fix another linting error

* Add edge zone parameter for network interfaces

* Looks like edgeZone parameter is working when creating network interfaces

* EdgeZone parameter for load balancer

* Add edge zone parameter for public IP address

* Add edge zone parameter for public IP prefix

* Add edgeZone parameter for virtual networks

* Add edge zone parameter for custom IP prefix

Co-authored-by: Will Ehrich <william.ehrich@microsoft.com>

* Add location parameter to Loadbalancer Backend Address Pool Properties Format (Azure#11919)

* adding location parameter to backendaddresspoolpropertiesformat

* ran prettier

* Support for Listing IKE Security Associations for Virtual Network Gateway Connections (Azure#11572)

* Support to List IKE SAs on VNG Connection

* Updating GetIkeSas

* Update virtualNetworkGateway.json

* Added location headers

* Update virtualNetworkGateway.json

* Prettier fix

* Update custom-words.txt

* Update virtualNetworkGateway.json

* Update custom-words.txt

* Update virtualNetworkGateway.json

* Update virtualNetworkGateway.json

* Update virtualNetworkGateway.json

Co-authored-by: Abhishek Shah <shabhis@microsoft.com>

* [Fix] GetIkeSas returns result as string (Azure#12225)

* Removing IkeSaParameters

* Update custom-words.txt

* Update virtualNetworkGateway.json

* Update virtualNetworkGateway.json

* Update VirtualNetworkGatewayConnectionGetIkeSas.json

* Update virtualNetworkGateway.json

* Update VirtualNetworkGatewayConnectionGetIkeSas.json

Co-authored-by: Abhishek Shah <shabhis@microsoft.com>

* Add extended location properties for private link service and private endpoints and remove edge zone properties (Azure#12039)

* Remove edge zone parameter

* Add extended location for private endpoint and private link service

* Add examples

* Capitalization

* Prettier

Co-authored-by: Will Ehrich <william.ehrich@microsoft.com>

* Add missing properties of SecurityRule, Route and RouteTable (Azure#12215)

* Add missing properties of SecurityRule Route and RouteTable

* Set resourceGuid field to be read only

Co-authored-by: Xu Wang <wax@microsoft.com>

* Added placeholder instead of password (Azure#12299)

Co-authored-by: nimaller <71352534+nimaller@users.noreply.github.com>
Co-authored-by: Richa Jain <richa.jain1912@gmail.com>
Co-authored-by: Richa Jain <ricjain@microsoft.com>
Co-authored-by: Abhishek Shah <shah.abhi7860@gmail.com>
Co-authored-by: Abhishek Shah <shabhis@microsoft.com>
Co-authored-by: Hari Prasad Perabattula <harics24@users.noreply.github.com>
Co-authored-by: Hari Prasad Perabattula <haperaba@microsoft.com>
Co-authored-by: Nilambari <nilamd@microsoft.com>
Co-authored-by: William Ehrich <wdehrich@gmail.com>
Co-authored-by: Will Ehrich <william.ehrich@microsoft.com>
Co-authored-by: Kayden Wilkinson <69224099+Kawilki-M@users.noreply.github.com>
Co-authored-by: Xu Wang <wangxu724@gmail.com>
Co-authored-by: Xu Wang <wax@microsoft.com>
@xiangyan99 xiangyan99 deleted the core_token_refresh_option branch May 20, 2021 16:07
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.

2 participants