77
88from typing import Optional
99
10- from azure . mgmt . cdn .models import (Endpoint , SkuName , EndpointUpdateParameters , ProfileUpdateParameters ,
10+ from azext_cdn . vendored_sdks .models import (Endpoint , SkuName , EndpointUpdateParameters , ProfileUpdateParameters ,
1111 MinimumTlsVersion , EndpointPropertiesUpdateParametersDeliveryPolicy , DeliveryRule ,
1212 DeliveryRuleRemoteAddressCondition , RemoteAddressMatchConditionParameters ,
1313 DeliveryRuleRequestMethodCondition , RequestMethodMatchConditionParameters ,
4141 DeliveryRuleSslProtocolCondition , SslProtocolMatchConditionParameters ,
4242 SslProtocol , ResourceType )
4343
44- from azure . mgmt . cdn .models ._cdn_management_client_enums import CacheType
45- from azure . mgmt . cdn .operations import (OriginsOperations , OriginGroupsOperations )
44+ from azext_cdn . vendored_sdks .models ._cdn_management_client_enums import CacheType
45+ from azext_cdn . vendored_sdks .operations import (OriginsOperations , OriginGroupsOperations )
4646from azure .mgmt .core .tools import is_valid_resource_id
4747
4848from azure .cli .core .commands .client_factory import get_subscription_id
@@ -65,7 +65,7 @@ def _check_condition_allowed_opertors(conditon_name, operator):
6565 conditon_allowed_operators = ["Equal" ]
6666 else :
6767 try :
68- attr = getattr (sys .modules ["azure.mgmt.cdn .models" ], conditon_name + "Operator" )
68+ attr = getattr (sys .modules ["azext_cdn.vendored_sdks .models" ], conditon_name + "Operator" )
6969 conditon_allowed_operators = [operator .value for _ , operator in attr .__members__ .items ()]
7070 except AttributeError :
7171 pass
@@ -84,7 +84,7 @@ def _check_condition_allowed_match_values_opertors(conditon_name, match_values):
8484 else :
8585 try :
8686 attr = getattr (
87- sys .modules ["azure.mgmt.cdn .models" ],
87+ sys .modules ["azext_cdn.vendored_sdks .models" ],
8888 conditon_name + "MatchConditionParametersMatchValuesItem" )
8989 conditon_allowed_match_values = [match_value .value for _ , match_value in attr .__members__ .items ()]
9090 except AttributeError :
@@ -732,7 +732,7 @@ def enable_custom_https(cmd, client, resource_group_name, profile_name, endpoint
732732 user_cert_vault_name = None , user_cert_secret_name = None , user_cert_secret_version = None ,
733733 user_cert_protocol_type = None , min_tls_version = None ):
734734
735- from azure . mgmt . cdn .models import (CdnCertificateSourceParameters ,
735+ from azext_cdn . vendored_sdks .models import (CdnCertificateSourceParameters ,
736736 UserManagedHttpsParameters ,
737737 CdnManagedHttpsParameters ,
738738 KeyVaultCertificateSourceParameters ,
@@ -842,7 +842,7 @@ def update_origin(client: OriginsOperations,
842842 private_link_resource_id : Optional [str ] = None ,
843843 private_link_location : Optional [str ] = None ,
844844 private_link_approval_message : Optional [str ] = None ):
845- from azure . mgmt . cdn .models import OriginUpdateParameters
845+ from azext_cdn . vendored_sdks .models import OriginUpdateParameters
846846
847847 return client .begin_update (resource_group_name ,
848848 profile_name ,
@@ -876,7 +876,7 @@ def create_origin(client: OriginsOperations,
876876 private_link_resource_id : Optional [str ] = None ,
877877 private_link_location : Optional [str ] = None ,
878878 private_link_approval_message : Optional [str ] = None ):
879- from azure . mgmt . cdn .models import Origin
879+ from azext_cdn . vendored_sdks .models import Origin
880880
881881 return client .begin_create (resource_group_name ,
882882 profile_name ,
@@ -908,7 +908,7 @@ def update_profile(instance, tags=None):
908908def create_profile (client , resource_group_name , name ,
909909 sku = SkuName .standard_akamai .value ,
910910 location = None , tags = None ):
911- from azure . mgmt . cdn .models import (Profile , Sku )
911+ from azext_cdn . vendored_sdks .models import (Profile , Sku )
912912 profile = Profile (location = location , sku = Sku (name = sku ), tags = tags )
913913 return client .profiles .begin_create (resource_group_name , name , profile )
914914
@@ -917,7 +917,7 @@ def _parse_ranges(ranges: str):
917917 if ranges is None :
918918 return []
919919
920- from azure . mgmt . cdn .models import HttpErrorRangeParameters
920+ from azext_cdn . vendored_sdks .models import HttpErrorRangeParameters
921921
922922 def parse_range (error_range : str ):
923923 split = error_range .split ('-' )
@@ -952,7 +952,7 @@ def create_origin_group(cmd,
952952 response_error_detection_failover_threshold : Optional [int ] = None
953953 response_error_detection_status_code_ranges : Optional [str ] = None
954954
955- from azure . mgmt . cdn .models import (OriginGroup ,
955+ from azext_cdn . vendored_sdks .models import (OriginGroup ,
956956 HealthProbeParameters ,
957957 ResponseBasedOriginErrorDetectionParameters )
958958
@@ -1013,7 +1013,7 @@ def update_origin_group(cmd,
10131013 failover_threshold : Optional [int ] = None
10141014 status_code_ranges : Optional [str ] = None
10151015
1016- from azure . mgmt . cdn .models import (OriginGroupUpdateParameters ,
1016+ from azext_cdn . vendored_sdks .models import (OriginGroupUpdateParameters ,
10171017 HealthProbeParameters ,
10181018 ResponseBasedOriginErrorDetectionParameters )
10191019
0 commit comments