@@ -224,11 +224,11 @@ func getComponents(rt *runtime.Runtime, opts *RuntimeInstallOptions) []string {
224224 return componentNames
225225}
226226
227- func createRuntimeOnPlatform (ctx context.Context , opts * model. RuntimeInstallationArgs ) (string , error ) {
228- runtimeCreationResponse , err := cfConfig .NewClient ().V2 ().Runtime ().Create (ctx , opts )
227+ func createRuntimeOnPlatform (ctx context.Context , runtimeName string , server string , runtimeVersion string , ingressHost string , componentNames [] string ) (string , error ) {
228+ runtimeCreationResponse , err := cfConfig .NewClient ().V2 ().Runtime ().Create (ctx , runtimeName , server , runtimeVersion , ingressHost , componentNames )
229229
230230 if err != nil {
231- return "" , fmt .Errorf ("failed to create a new runtime: %s. Error: %w" , opts . RuntimeName , err )
231+ return "" , fmt .Errorf ("failed to create a new runtime: %s. Error: %w" , runtimeName , err )
232232 }
233233
234234 return runtimeCreationResponse .NewAccessToken , nil
@@ -256,13 +256,7 @@ func RunRuntimeInstall(ctx context.Context, opts *RuntimeInstallOptions) error {
256256
257257 componentNames := getComponents (rt , opts )
258258
259- token , err := createRuntimeOnPlatform (ctx , & model.RuntimeInstallationArgs {
260- RuntimeName : opts .RuntimeName ,
261- Cluster : server ,
262- RuntimeVersion : runtimeVersion ,
263- IngressHost : & opts .IngressHost ,
264- ComponentNames : componentNames ,
265- })
259+ token , err := createRuntimeOnPlatform (ctx , opts .RuntimeName , server , runtimeVersion , opts .IngressHost , componentNames )
266260
267261 if err != nil {
268262 return fmt .Errorf ("failed to create a new runtime: %w" , err )
0 commit comments