@@ -224,11 +224,11 @@ func getComponents(rt *runtime.Runtime, opts *RuntimeInstallOptions) []string {
224
224
return componentNames
225
225
}
226
226
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 )
229
229
230
230
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 )
232
232
}
233
233
234
234
return runtimeCreationResponse .NewAccessToken , nil
@@ -256,13 +256,7 @@ func RunRuntimeInstall(ctx context.Context, opts *RuntimeInstallOptions) error {
256
256
257
257
componentNames := getComponents (rt , opts )
258
258
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 )
266
260
267
261
if err != nil {
268
262
return fmt .Errorf ("failed to create a new runtime: %w" , err )
0 commit comments