@@ -3027,13 +3027,10 @@ def set_up_network_profile(self, mc: ManagedCluster) -> ManagedCluster:
30273027 acns .security .advanced_network_policies = acns_advanced_networkpolicies
30283028 if acns_transit_encryption_type is not None :
30293029 if acns .security is None :
3030- acns .security = self .models .AdvancedNetworkingSecurity (
3031- transit_encryption = self .models .AdvancedNetworkingSecurityTransitEncryption (
3032- type = acns_transit_encryption_type
3033- )
3034- )
3035- else :
3036- acns .security .transit_encryption .type = acns_transit_encryption_type
3030+ acns .security = self .models .AdvancedNetworkingSecurity ()
3031+ if acns .security .transit_encryption is None :
3032+ acns .security .transit_encryption = self .models .AdvancedNetworkingSecurityTransitEncryption ()
3033+ acns .security .transit_encryption .type = acns_transit_encryption_type
30373034 network_profile .advanced_networking = acns
30383035 return mc
30393036
@@ -4142,13 +4139,10 @@ def update_acns_in_network_profile(self, mc: ManagedCluster) -> ManagedCluster:
41424139 acns .security .advanced_network_policies = acns_advanced_networkpolicies
41434140 if acns_transit_encryption_type is not None :
41444141 if acns .security is None :
4145- acns .security = self .models .AdvancedNetworkingSecurity (
4146- transit_encryption = self .models .AdvancedNetworkingSecurityTransitEncryption (
4147- type = acns_transit_encryption_type
4148- )
4149- )
4150- else :
4151- acns .security .transit_encryption .type = acns_transit_encryption_type
4142+ acns .security = self .models .AdvancedNetworkingSecurity ()
4143+ if acns .security .transit_encryption is None :
4144+ acns .security .transit_encryption = self .models .AdvancedNetworkingSecurityTransitEncryption ()
4145+ acns .security .transit_encryption .type = acns_transit_encryption_type
41524146 mc .network_profile .advanced_networking = acns
41534147 return mc
41544148
0 commit comments