No networkconfig needed with DHCP agent config
@@ -90,7 +90,12 @@ func RegisterInfraEnv(ctx context.Context, log *log.Logger, bmInventory *client.
return nil, infraenvErr
}
+ infraEnvParams := controllers.CreateInfraEnvParams(&infraEnv, models.ImageType(imageTypeISO), pullSecret, modelsCluster.ID, modelsCluster.OpenshiftVersion)
+
var nmStateConfig aiv1beta1.NMStateConfig
+
+ fileInfo, _ := os.Stat(nmStateConfigPath)
+ if fileInfo != nil {
if nmStateErr := getFileData(nmStateConfigPath, &nmStateConfig); nmStateErr != nil {
return nil, nmStateErr
}
@@ -100,12 +105,11 @@ func RegisterInfraEnv(ctx context.Context, log *log.Logger, bmInventory *client.
return nil, processErr
}
- infraEnvParams := controllers.CreateInfraEnvParams(&infraEnv, models.ImageType(imageTypeISO), pullSecret, modelsCluster.ID, modelsCluster.OpenshiftVersion)
-
if len(staticNetworkConfig) > 0 {
log.Infof("Added %d nmstateconfigs", len(staticNetworkConfig))
infraEnvParams.InfraenvCreateParams.StaticNetworkConfig = staticNetworkConfig
}
+ }
clientInfraEnvParams := &installer.RegisterInfraEnvParams{
InfraenvCreateParams: infraEnvParams.InfraenvCreateParams,
