24
24
import lombok .extern .slf4j .Slf4j ;
25
25
import org .eclipse .xpanse .tofu .maker .async .TaskConfiguration ;
26
26
import org .eclipse .xpanse .tofu .maker .models .OpenTofuMakerSystemStatus ;
27
- import org .eclipse .xpanse .tofu .maker .models .enums .DeploymentScenario ;
28
27
import org .eclipse .xpanse .tofu .maker .models .enums .HealthStatus ;
29
28
import org .eclipse .xpanse .tofu .maker .models .exceptions .OpenTofuExecutorException ;
30
29
import org .eclipse .xpanse .tofu .maker .models .exceptions .OpenTofuHealthCheckException ;
@@ -145,9 +144,7 @@ public OpenTofuResult deployFromDirectory(OpenTofuDeployFromDirectoryRequest req
145
144
result .setCommandStdError (tfEx .getMessage ());
146
145
}
147
146
String workspace = executor .getModuleFullPath (moduleDirectory );
148
- OpenTofuResult openTofuResult =
149
- transSystemCmdResultToOpenTofuResult (result , workspace ,
150
- request .getDeploymentScenario ());
147
+ OpenTofuResult openTofuResult = transSystemCmdResultToOpenTofuResult (result , workspace );
151
148
if (cleanWorkspaceAfterDeployment ) {
152
149
deleteWorkspace (workspace );
153
150
}
@@ -176,8 +173,7 @@ public OpenTofuResult modifyFromDirectory(OpenTofuModifyFromDirectoryRequest req
176
173
}
177
174
String workspace = executor .getModuleFullPath (moduleDirectory );
178
175
OpenTofuResult openTofuResult =
179
- transSystemCmdResultToOpenTofuResult (result , workspace ,
180
- request .getDeploymentScenario ());
176
+ transSystemCmdResultToOpenTofuResult (result , workspace );
181
177
if (cleanWorkspaceAfterDeployment ) {
182
178
deleteWorkspace (workspace );
183
179
}
@@ -200,8 +196,7 @@ public OpenTofuResult destroyFromDirectory(OpenTofuDestroyFromDirectoryRequest r
200
196
result .setCommandStdError (tfEx .getMessage ());
201
197
}
202
198
String workspace = executor .getModuleFullPath (moduleDirectory );
203
- OpenTofuResult openTofuResult = transSystemCmdResultToOpenTofuResult (
204
- result , workspace , request .getDeploymentScenario ());
199
+ OpenTofuResult openTofuResult = transSystemCmdResultToOpenTofuResult (result , workspace );
205
200
deleteWorkspace (workspace );
206
201
return openTofuResult ;
207
202
}
@@ -228,7 +223,6 @@ public void asyncDeployWithScripts(
228
223
result = deployFromDirectory (asyncDeployRequest , moduleDirectory );
229
224
} catch (RuntimeException e ) {
230
225
result = OpenTofuResult .builder ()
231
- .deploymentScenario (asyncDeployRequest .getDeploymentScenario ())
232
226
.commandStdOutput (null )
233
227
.commandStdError (e .getMessage ())
234
228
.isCommandSuccessful (false )
@@ -252,7 +246,6 @@ public void asyncModifyWithScripts(
252
246
result = modifyFromDirectory (asyncModifyRequest , moduleDirectory );
253
247
} catch (RuntimeException e ) {
254
248
result = OpenTofuResult .builder ()
255
- .deploymentScenario (asyncModifyRequest .getDeploymentScenario ())
256
249
.commandStdOutput (null )
257
250
.commandStdError (e .getMessage ())
258
251
.isCommandSuccessful (false )
@@ -276,7 +269,6 @@ public void asyncDestroyWithScripts(OpenTofuAsyncDestroyFromDirectoryRequest req
276
269
result = destroyFromDirectory (request , moduleDirectory );
277
270
} catch (RuntimeException e ) {
278
271
result = OpenTofuResult .builder ()
279
- .deploymentScenario (request .getDeploymentScenario ())
280
272
.commandStdOutput (null )
281
273
.commandStdError (e .getMessage ())
282
274
.isCommandSuccessful (false )
@@ -291,12 +283,9 @@ public void asyncDestroyWithScripts(OpenTofuAsyncDestroyFromDirectoryRequest req
291
283
}
292
284
293
285
private OpenTofuResult transSystemCmdResultToOpenTofuResult (SystemCmdResult result ,
294
- String workspace ,
295
- DeploymentScenario
296
- deploymentScenario ) {
286
+ String workspace ) {
297
287
OpenTofuResult openTofuResult = OpenTofuResult .builder ().build ();
298
288
BeanUtils .copyProperties (result , openTofuResult );
299
- openTofuResult .setDeploymentScenario (deploymentScenario );
300
289
openTofuResult .setTerraformState (getTerraformState (workspace ));
301
290
openTofuResult .setImportantFileContentMap (getImportantFilesContent (workspace ));
302
291
return openTofuResult ;
0 commit comments