19
19
# pylint: disable=unused-import,ungrouped-imports
20
20
from azure .core .credentials import TokenCredential
21
21
22
-
23
22
class WebSiteManagementClientConfiguration :
24
23
"""Configuration for WebSiteManagementClient.
25
24
@@ -32,30 +31,36 @@ class WebSiteManagementClientConfiguration:
32
31
:type subscription_id: str
33
32
"""
34
33
35
- def __init__ (self , credential : "TokenCredential" , subscription_id : str , ** kwargs : Any ):
34
+ def __init__ (
35
+ self ,
36
+ credential : "TokenCredential" ,
37
+ subscription_id : str ,
38
+ ** kwargs : Any
39
+ ):
36
40
if credential is None :
37
41
raise ValueError ("Parameter 'credential' must not be None." )
38
42
if subscription_id is None :
39
43
raise ValueError ("Parameter 'subscription_id' must not be None." )
40
44
41
45
self .credential = credential
42
46
self .subscription_id = subscription_id
43
- self .credential_scopes = kwargs .pop (" credential_scopes" , [" https://management.azure.com/.default" ])
44
- kwargs .setdefault (" sdk_moniker" , " azure-mgmt-web/{}" .format (VERSION ))
47
+ self .credential_scopes = kwargs .pop (' credential_scopes' , [' https://management.azure.com/.default' ])
48
+ kwargs .setdefault (' sdk_moniker' , ' azure-mgmt-web/{}' .format (VERSION ))
45
49
self .polling_interval = kwargs .get ("polling_interval" , 30 )
46
50
self ._configure (** kwargs )
47
51
48
- def _configure (self , ** kwargs : Any ):
49
- self .user_agent_policy = kwargs .get ("user_agent_policy" ) or policies .UserAgentPolicy (** kwargs )
50
- self .headers_policy = kwargs .get ("headers_policy" ) or policies .HeadersPolicy (** kwargs )
51
- self .proxy_policy = kwargs .get ("proxy_policy" ) or policies .ProxyPolicy (** kwargs )
52
- self .logging_policy = kwargs .get ("logging_policy" ) or policies .NetworkTraceLoggingPolicy (** kwargs )
53
- self .http_logging_policy = kwargs .get ("http_logging_policy" ) or ARMHttpLoggingPolicy (** kwargs )
54
- self .retry_policy = kwargs .get ("retry_policy" ) or policies .RetryPolicy (** kwargs )
55
- self .custom_hook_policy = kwargs .get ("custom_hook_policy" ) or policies .CustomHookPolicy (** kwargs )
56
- self .redirect_policy = kwargs .get ("redirect_policy" ) or policies .RedirectPolicy (** kwargs )
57
- self .authentication_policy = kwargs .get ("authentication_policy" )
52
+ def _configure (
53
+ self ,
54
+ ** kwargs : Any
55
+ ):
56
+ self .user_agent_policy = kwargs .get ('user_agent_policy' ) or policies .UserAgentPolicy (** kwargs )
57
+ self .headers_policy = kwargs .get ('headers_policy' ) or policies .HeadersPolicy (** kwargs )
58
+ self .proxy_policy = kwargs .get ('proxy_policy' ) or policies .ProxyPolicy (** kwargs )
59
+ self .logging_policy = kwargs .get ('logging_policy' ) or policies .NetworkTraceLoggingPolicy (** kwargs )
60
+ self .http_logging_policy = kwargs .get ('http_logging_policy' ) or ARMHttpLoggingPolicy (** kwargs )
61
+ self .retry_policy = kwargs .get ('retry_policy' ) or policies .RetryPolicy (** kwargs )
62
+ self .custom_hook_policy = kwargs .get ('custom_hook_policy' ) or policies .CustomHookPolicy (** kwargs )
63
+ self .redirect_policy = kwargs .get ('redirect_policy' ) or policies .RedirectPolicy (** kwargs )
64
+ self .authentication_policy = kwargs .get ('authentication_policy' )
58
65
if self .credential and not self .authentication_policy :
59
- self .authentication_policy = ARMChallengeAuthenticationPolicy (
60
- self .credential , * self .credential_scopes , ** kwargs
61
- )
66
+ self .authentication_policy = ARMChallengeAuthenticationPolicy (self .credential , * self .credential_scopes , ** kwargs )
0 commit comments