@@ -1144,8 +1144,11 @@ def deploy_ocs_via_operator(self, image=None):
1144
1144
node_obj .exec_oc_debug_cmd (node = node , cmd_list = [ip_link_cmd ])
1145
1145
1146
1146
if create_public_net :
1147
+ nad_to_load = constants .MULTUS_PUBLIC_NET_YAML
1147
1148
logger .info ("Creating Multus public network" )
1148
- public_net_data = templating .load_yaml (constants .MULTUS_PUBLIC_NET_YAML )
1149
+ if config .DEPLOYMENT .get ("ipv6" ):
1150
+ nad_to_load = constants .MULTUS_PUBLIC_NET_IPV6_YAML
1151
+ public_net_data = templating .load_yaml (nad_to_load )
1149
1152
public_net_data ["metadata" ]["name" ] = config .ENV_DATA .get (
1150
1153
"multus_public_net_name"
1151
1154
)
@@ -1157,9 +1160,14 @@ def deploy_ocs_via_operator(self, image=None):
1157
1160
public_net_config_dict ["master" ] = config .ENV_DATA .get (
1158
1161
"multus_public_net_interface"
1159
1162
)
1160
- public_net_config_dict ["ipam" ]["range" ] = config .ENV_DATA .get (
1161
- "multus_public_net_range"
1162
- )
1163
+ if not config .DEPLOYMENT .get ("ipv6" ):
1164
+ public_net_config_dict ["ipam" ]["range" ] = config .ENV_DATA .get (
1165
+ "multus_public_net_range"
1166
+ )
1167
+ else :
1168
+ public_net_config_dict ["ipam" ]["range" ] = config .ENV_DATA .get (
1169
+ "multus_public_ipv6_net_range"
1170
+ )
1163
1171
public_net_config_dict ["type" ] = config .ENV_DATA .get (
1164
1172
"multus_public_net_type"
1165
1173
)
@@ -1175,6 +1183,10 @@ def deploy_ocs_via_operator(self, image=None):
1175
1183
1176
1184
if create_cluster_net :
1177
1185
logger .info ("Creating Multus cluster network" )
1186
+ if config .DEPLOYMENT .get ("ipv6" ):
1187
+ constants .MULTUS_CLUSTER_NET_YAML = (
1188
+ constants .MULTUS_CLUSTER_NET_IPV6_YAML
1189
+ )
1178
1190
cluster_net_data = templating .load_yaml (
1179
1191
constants .MULTUS_CLUSTER_NET_YAML
1180
1192
)
@@ -1189,12 +1201,14 @@ def deploy_ocs_via_operator(self, image=None):
1189
1201
cluster_net_config_dict ["master" ] = config .ENV_DATA .get (
1190
1202
"multus_cluster_net_interface"
1191
1203
)
1192
- cluster_net_config_dict ["ipam" ]["range" ] = config .ENV_DATA .get (
1193
- "multus_cluster_net_range"
1194
- )
1195
- cluster_net_config_dict ["type" ] = config .ENV_DATA .get (
1196
- "multus_cluster_net_type"
1197
- )
1204
+ if not config .DEPLOYMENT .get ("ipv6" ):
1205
+ cluster_net_config_dict ["ipam" ]["range" ] = config .ENV_DATA .get (
1206
+ "multus_cluster_net_range"
1207
+ )
1208
+ else :
1209
+ cluster_net_config_dict ["type" ] = config .ENV_DATA .get (
1210
+ "multus_cluster_ipv6_net_type"
1211
+ )
1198
1212
cluster_net_config_dict ["mode" ] = config .ENV_DATA .get (
1199
1213
"multus_cluster_net_mode"
1200
1214
)
0 commit comments