Skip to content

Commit f82b261

Browse files
authored
Improve code InfrastructureManager.java
1 parent 9bf9bf6 commit f82b261

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/es/upv/i3m/grycap/im/InfrastructureManager.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class InfrastructureManager {
5252
private static final String REST_PARAMETER_NAME_CONTEXT = "context";
5353
private static final String REST_PARAMETER_NAME_ASYNC = "async";
5454
private static final String REST_PARAMETER_NAME_VMLIST = "vm_list";
55+
private static final String REST_PARAMETER_NAME_FORCE = "force";
5556

5657
private final ImClient imClient;
5758

@@ -276,11 +277,12 @@ public void destroyInfrastructure(String infId) throws ImClientException {
276277
* @param infId
277278
* : infrastructure id
278279
* @param force
279-
* : force parameter
280+
* : flag to specify that the infra will be from the IM although not
281+
all resources are deleted
280282
*/
281283
public void destroyInfrastructureAsync(String infId, boolean force) throws ImClientException {
282284
RestParameter asyncParameter = createCallParameters(REST_PARAMETER_NAME_ASYNC, true);
283-
RestParameter forceParameter = createCallParameters("force", force);
285+
RestParameter forceParameter = createCallParameters(REST_PARAMETER_NAME_FORCE, force);
284286
getImClient().delete(PATH_INFRASTRUCTURES + PATH_SEPARATOR + infId,
285287
String.class, asyncParameter, forceParameter);
286288
}

0 commit comments

Comments
 (0)